Stelian Pop wrote: >>> Do I need to define movsi3(), addsi3() etc. patterns manually or should GCC >>> figure those by itself ? >> Not sure I understand you. You always need to define movMM3 etc. GCC will >> correctly select between movhi3 and movsi3 based on your Pmode macro when >> handling pointers, but you still need to write the patterns. > > The thing is that this CPU does not have any real 32 bit registers, or > instructions to do assignments/additions/etc to 32 bit registers. So the 32 > bit > operations (on pointers) need to be emulated using the 16 bit components, and > I > thought that GCC can do this automatically for me ...
Ah. In theory GCC should move everything by pieces. In practice, you have to define mov patterns for SI and DI because rtl-level CSE isn't as smart as it should be. You can use expanders for these. cheers, DaveK