On Mon, 2013-01-14 at 08:00 +0100, Thomas Baier wrote:
> The operating system I'd like to use gcc for (OS-9, for the curious)
> requires an ABI, where global variables are only accessed through
> register indirect addressing. On the powerpc platform, r2 is used for
> indirect addressing. There is already a feature in gcc which can use
> register indirect addressing for the powerpc target for global variables
> using a special small data area, but unfortunately this is not enough.

If you look at the -mcmodel={small,medium,large} support we (IBM)
added to powerpc64-linux, you will see how one can generate larger
offsets to r2 (16-bit, 32-bit and 64-bit respectively).
Maybe you can borrow some of that code?

Peter



Reply via email to