Port-sparc64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: sethi and 64-bit constants
On Monday 31 March 2008 16:21:18 Martin Husemann wrote:
> On Mon, Mar 31, 2008 at 02:53:09PM +0100, raymond.meyer%rambler.ru@localhost
> wrote:
> > Say I have a 64-bit pointer, I would like to load this address into a
> > register. Sparc sethi instruction has space for 22-bit constants, so how
> > can I use it to load 64-bit data?
>
> For imediate values, you use the
>
> setx value, tempreg, destreg
>
> pseudo instruction, which (depending on the value) may generate upto 6
> instructions.
>
So do you know the rules by which those instructions are generated?
> For the address of a pointer, the answer depends on your memory model.
> On NetBSD, by default we assume that both text and data segmants are < 2GB,
> so a 32 bit constant is enough to load the address of a pointer.
>
What if you need to mmap() a 4GB memory region. Is it possible on NetBSD or
there are restrictions?
Home |
Main Index |
Thread Index |
Old Index