[parisc-linux] 64 byte alignment
Will Newton
will@misconception.org.uk
Sat, 31 Aug 2002 00:43:21 +0100
I'm trying to 64 byte align a stack pointer, unfortunately it's not working.
Here is my code:
ldi 0x03f,%r21 ; Load mask (b0111111)
and,<> %r3,%r21,%r21 ; Check alignment
addi 64,%r3,%r3 ; If not aligned round up
depwi 0x0,31,6,%r3 ; Clear low order bits
Basically the idea is:
and the low 6 bits with a mask to see if any are set.
if any are set, add 64 and clear the low order bits
I may be doing something horribly ignorant here, but PA-RISC assembly is not
the most widely documented of things. :)
Thanks,