[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
sethi and 64-bit constants
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?
As far as I understand, given a 64-bit register 'reg'
sethi const22, reg
will set bits 0-9 and 32-63 to zero
and set bits 10-31 to const22
So how can I use other instructions (or, xor) to load a 64-bit constant?
Also, if it takes 2 or 3 sparc instructions simply to load a 64-bit data,
doesn't this mean that 64-bit arithmetic is pretty inefficient?
Main Index |
Thread Index |