This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c/9564: compiling sdiff causes ICE on powerpc


Segher.  Thanks so much for your patch, and my apologies for the delay.

I'm committing the patch below to mainline.  No changes from your version,
except a few whitespace mods.

2003-03-10  Segher Boessenkool  <segher at koffie dot nl>

	* testsuite/gcc.dg/altivec-9.c: New file.

	* config/rs6000/rs6000.c (altivec_frame_fixup): Remove.
	(rs6000_emit_prologue): Use rs6000_frame_related instead.
	
Index: testsuite/gcc.dg/altivec-9.c
===================================================================
RCS file: testsuite/gcc.dg/altivec-9.c
diff -N testsuite/gcc.dg/altivec-9.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- testsuite/gcc.dg/altivec-9.c	10 Mar 2003 19:32:52 -0000
***************
*** 0 ****
--- 1,13 ----
+ /* { dg-do compile { target powerpc-*-* } } */
+ /* { dg-options "-maltivec -mabi=altivec -g" } */
+ 
+ /* PR9564 */
+ 
+ extern int vfork(void);
+ 
+ void
+ boom (void)
+ {
+   char buf[65536];
+   vfork();
+ }
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.433
diff -c -p -r1.433 rs6000.c
*** config/rs6000/rs6000.c	10 Mar 2003 18:03:17 -0000	1.433
--- config/rs6000/rs6000.c	10 Mar 2003 19:32:53 -0000
*************** static int first_altivec_reg_to_save PAR
*** 267,273 ****
  static unsigned int compute_vrsave_mask PARAMS ((void));
  static void is_altivec_return_reg PARAMS ((rtx, void *));
  static rtx generate_set_vrsave PARAMS ((rtx, rs6000_stack_t *, int));
- static void altivec_frame_fixup PARAMS ((rtx, rtx, HOST_WIDE_INT));
  static int easy_vector_constant PARAMS ((rtx));
  static bool is_ev64_opaque_type PARAMS ((tree));
  static rtx rs6000_dwarf_register_span PARAMS ((rtx));
--- 267,272 ----
*************** rs6000_emit_allocate_stack (size, copy_r
*** 10102,10133 ****
  		       REG_NOTES (insn));
  }
  
- /* Add a RTX_FRAME_RELATED note so that dwarf2out_frame_debug_expr
-    knows that:
- 
-      (mem (plus (blah) (regXX)))
- 
-    is really:
- 
-      (mem (plus (blah) (const VALUE_OF_REGXX))).  */
- 
- static void
- altivec_frame_fixup (insn, reg, val)
-      rtx insn, reg;
-      HOST_WIDE_INT val;
- {
-   rtx real;
- 
-   real = copy_rtx (PATTERN (insn));
- 
-   real = replace_rtx (real, reg, GEN_INT (val));
- 
-   RTX_FRAME_RELATED_P (insn) = 1;
-   REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- 					real,
- 					REG_NOTES (insn));
- }
- 
  /* Add to 'insn' a note which is PATTERN (INSN) but with REG replaced
     with (plus:P (reg 1) VAL), and with REG2 replaced with RREG if REG2
     is not NULL.  It would be nice if dwarf2out_frame_debug_expr could
--- 10101,10106 ----
*************** rs6000_emit_prologue ()
*** 10494,10500 ****
  
  	    insn = emit_move_insn (mem, savereg);
  
! 	    altivec_frame_fixup (insn, areg, offset);
  	  }
      }
  
--- 10467,10474 ----
  
  	    insn = emit_move_insn (mem, savereg);
  
! 	    rs6000_frame_related (insn, frame_ptr_rtx, info->total_size,
! 				  areg, GEN_INT (offset));
  	  }
      }
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]