public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* comprehensive porting howto...
@ 2003-02-10 14:27 Emmanuel Michon
  0 siblings, 0 replies; only message in thread
From: Emmanuel Michon @ 2003-02-10 14:27 UTC (permalink / raw)
  To: gcc-help

Hi,

I'm looking for some advice on the steps to take
to port gcc for a homemade risc 16bit controller.

`Using and Porting GNU CC' is the reference for this, and 
`porting gcc for dunces' by H.P.Nilsson is quite useful too. 

However I lack the `howto' (what is absolutely required at first, what
comes after when foundations are ok). They do not help to split the
process in elementary (partially useable and checkable) steps. It
seems like you have to work in the blind for two weeks then face all
bugs at once ;-)

I'm taking as a basis Matsushita MN10200 risc that looks a bit like
mine, excepted the fact that MN10200 does not seem to have a dedicated
stack register (no push/pop instruction) and makes subtleties when
handling pointers to single integers (PSImode).

I can isolate simple concepts like

- checking the ALU is ok with registers by introducing define_insn one
  by one in .md, in SImode, then HImode, then BImode,...
- checking the most basic function passes registers properly
- introducing use of the stack, prologues and epilogues
- handling base pointers (available only for load) and indexing (not available
  or at the price of a big fat multiplication involving three regs) 
  is still a dark area for me 
- having the recognition of neighbour memory areas ok (If 
  a3=0x2341, and you want to load [0x2348], better to go for [a3+7])
- optimization: good idea, but clumsy correct assembly would be great at first

- gdb/dwarf: not a priority
- profiling: not a priority 
- trampoline: I do not use this kind of things

I also have to introduce a `nop' in some defined cases of pipeline hazard,
looking a lot like the `fixing' code of delayed branches but in a very
simple case.

Paradoxally code generated with -O2 seems more clear than the -O0
code which spends a lot of instructions in moving x->y then y->x etc ;-)

Hoping for some mentoring, in the sense of: what should I do _first_.

Sincerely yours,

-- 
Emmanuel Michon
Chef de projet
REALmagic France SAS
Mobile: 0614372733 GPGkeyID: D2997E42  

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-10 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-10 14:27 comprehensive porting howto Emmanuel Michon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).