Michael Meissner <meiss...@linux.vnet.ibm.com> wrote on 2010/10/07 20:21:38: > > On Thu, Oct 07, 2010 at 04:50:50PM +0200, Joakim Tjernlund wrote: > > Why not offer some of this on PowerPC32? mcmodel=small would probably be > > enough. > > Well as they say, contributions are welcome. Note, 32-bit mode doesn't need
Yes, but then I would have to know if such an contribution is welcome and how to go about it. As nobody has considered ppc32 when adding this functionality I wonder if ppc32 I developed anymore? ppc32 appears to fall into maintained instead. > this when compiling for the main program, since it does addis/addi already (or > moves the addi into the offset of the memory reference instructions) to load > up > addresses (in 32-bit mode, the addis/addi will form any address, but in 64-bit > mode, this can't be used, because addresses are loaded above the 32k limit). > > For pic code, it does need to use the GOT in traditional fashion. pic code as in shared lib? In my case the main program needs to be pic but it doesn't use shared libs. > > Note, the 64-bit ABI requires that r2 have the current function's GOT in it > when the function is called, while the 32-bit ABI uses r2 as a small data > pointer (and possibly r13 as a second small data pointer). So, in 32-bit mode > you have to get the GOT address by doing call to the next instruction to get > the address in the LR. Don't need/use small data so r2 should be fine. > > So, it isn't as simple as moving the the 64-bit stuff in 32-bit, since there > are different assumptions. I see, this may very well be over my head then. Jocke