[patch/hppa-linux] MD_FALLBACK_FRAME_STATE_FOR definition

John David Anglin dave@hiauly1.hia.nrc.ca
Thu May 6 04:27:00 GMT 2004


+   In 2.4, the signal trampoline is 4 bytes, and (CONTEXT)->ra should

4 bytes?

+   Note that with a 2.4 64-bit kernel, the signal context is not properly
+   passed back to userspace so the unwind will not work correctly.  */

Can this be detected?  I'm concerned that this failure causes
unacceptable behavior.  Can we fix this in the kernel or glibc?

+    unsigned long sp = (unsigned long)(CONTEXT)->ra & ~63;		\

It looks as if "63" is (PREFERRED_STACK_BOUNDARY / 8) - 1.

+    /* rt_sigreturn trampoline: */					\
+    /* 3419000x ldi 0, %r25 or ldi 1, %r25   (x = 0 or 2) */		\
+    /* 3414015a ldi __NR_rt_sigreturn, %r20 */				\
+    /* e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31 */			\
+    /* 08000240 nop  */							\

Get rid of the extra "/*" and "*/" character sequences in the comment.

+	pc += 5;							\
+        off = 10*4;							\

Consistently use tabs for indentation when possible.

+    if (*(pc + 1) != 0x3414015a 					\

pc[1]?

+    for (i = 0; i <= 31; i++)						\

i == 0?

+    for (i = 4; i <= 31; i++)						\

Do the floating point status and exception registers need to be restored?
I can see that there could be a problem restoring them as they need to
be restored with double word loads and stores.

Also, what about cr11 (SAR)?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)



More information about the Gcc-patches mailing list