PA64 longjmp bug

Jeffrey A Law law@redhat.com
Fri Mar 9 17:36:00 GMT 2001


Any attempt to use longjmp for PA64 is currently failing because of bugs
in the longjmp expander in the PA backend.  It hardcoded offsets to the
items and didn't take into account that the size of the items varies
depending on PA32 vs PA64 compilation.

This patch fixes that problem.  As a result the builtin setjmp test in 
c-torture now works for PA64.  Hopefully it will have a positive impact
on the C++ tests which use exception handling for PA64.

	* pa.md (builtin_longjmp): Rework slightly to work for PA64 too.

Index: pa.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/pa/pa.md,v
retrieving revision 1.81.2.2
diff -c -3 -p -r1.81.2.2 pa.md
*** pa.md	2001/02/27 23:44:27	1.81.2.2
--- pa.md	2001/03/10 01:29:40
***************
*** 6246,6253 ****
  {
    /* The elements of the buffer are, in order:  */
    rtx fp = gen_rtx_MEM (Pmode, operands[0]);
!   rtx lab = gen_rtx_MEM (Pmode, plus_constant (operands[0], 4));
!   rtx stack = gen_rtx_MEM (Pmode, plus_constant (operands[0], 8));
    rtx pv = gen_rtx_REG (Pmode, 1);
  
    /* This bit is the same as expand_builtin_longjmp.  */
--- 6246,6255 ----
  {
    /* The elements of the buffer are, in order:  */
    rtx fp = gen_rtx_MEM (Pmode, operands[0]);
!   rtx lab = gen_rtx_MEM (Pmode, plus_constant (operands[0],
! 			 POINTER_SIZE / BITS_PER_UNIT));
!   rtx stack = gen_rtx_MEM (Pmode, plus_constant (operands[0],
! 			   (POINTER_SIZE * 2) / BITS_PER_UNIT));
    rtx pv = gen_rtx_REG (Pmode, 1);
  
    /* This bit is the same as expand_builtin_longjmp.  */









More information about the Gcc-patches mailing list