Hi Richard, Attached is the revised patch with the changes you suggested. Regressed with glibc tests on ARMV8 Foundation model running open embedded image. ChangeLog.aarch64: ----------------------------- 2013-12-26 Venkataramanan Kumar * sysdeps/aarch64/__longjmp.S (__longjmp): Demangle sp and lr when restoring register values. * sysdeps/aarch64/setjmp.S (__sigsetjmp): Mangle sp and lr before storing register values. * sysdeps/arm/jmpbuf-unwind.h (_jmpbuf_sp): Remove. * sysdeps/aarch64/jmpbuf- offsets.h (_jmpbuf_sp): Add. (JB_FRAME_ADDRESS): call _jmpbuf_sp. * sysdeps/aarch64/sysdep.h (LDST_PCREL) : New macros. (LDST_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h (PTR_MANGLE): New macro. (PTR_DEMANGLE): Likewise. (PTR_MANGLE2): Likewise. (PTR_DEMANGLE2): Likewise. On 27 December 2013 20:39, Richard Henderson wrote: > On 12/26/2013 11:48 PM, Venkataramanan Kumar wrote: >> +/* Load or store to/from a pc-relative EXPR into/from R, using T. */ >> +#define LDST_PCREL(OP, R, T, EXPR)\ >> + adrp T, EXPR; \ >> + add T, T, #:lo12:EXPR;\ >> + OP R, [T]; > > Is T supposed to be live after the macro? Otherwise the whole point of the > 12-bit offset is that it can be used inside the memory operation offset. > > As you in fact do with the LDST_GLOBAL macro just below. > > > r~ regards, Venkat.