Am 03.02.21 um 21:02 schrieb Bill Gaylord:
> I haven't made much progress on my attempt to write my own target for
> SDCC yet. Mostly because I sat down and re-designed my CPU from the
> bottom up. Mostly in the instruction set and not really in the
> architecture itself, although it is now primarily a 16-bit CPU with
> instructions for interacting with 8-bit data. It still has 16 registers
> and a full 64Kb of RAM. (Although I do have a simple MMU with paging I
> am designing.) I also still have a specific push and pop instruction
> although I am thinking of replacing that and dedicating one of my
> registers as the Stack Pointer if that makes things easier.
> 
> Is there a simple way to know what is required (like what functions and
> files are actually required in a target.) to have a valid target?
> 
> 

Check some port directory, such as src/pdk, src/hc08, src/z80 etc.

You'll need the main.c The port structure is a must, the functions can
mostly be stubs. peep.c is for the peephole optimizer. Intially, stub s
will be good enough. gen.c is the code generator. You'll need something
working in there to get anywhere. Similar for register allocation in
ralloc.c. Alls note that the stuff in gen.c usually gets called from
ralloc.c.

Philipp


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to