All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] 64 byte alignment
@ 2002-08-30 23:43 Will Newton
  2002-08-30 23:57 ` Randolph Chung
  0 siblings, 1 reply; 4+ messages in thread
From: Will Newton @ 2002-08-30 23:43 UTC (permalink / raw)
  To: parisc-linux

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,

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-31  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-30 23:43 [parisc-linux] 64 byte alignment Will Newton
2002-08-30 23:57 ` Randolph Chung
2002-08-31  0:10   ` Will Newton
2002-08-31  1:12   ` John David Anglin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.