This is the mail archive of the gcc@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: Nonlocal gotos: wrong frame pointer handling


Hi,

(In response to: http://gcc.gnu.org/ml/gcc/2003-11/msg00682.html)

> Notice that you are using stack_pointer_rtx (r15) in a MEM clobber, however, the instructions are 
> using something else, namely r11. Try using that register instead, which should be hard_frame_pointer_rtx.

Right. This was the point. I've just copied the lines without replacing the register. If I put in the
hard_frame_pointer_rtx instead of stack_pointer_rtx the testcase compiles well. The scheduler doesn't
exchange the insns anymore.

Thanks for your help!

Bootstrapped and regtested on s390x-ibm-linux. OK?

Bye,

Andreas


2003-11-13  Andreas Krebbel <krebbel1@de.ibm.com>

	* stmt.c (expand_goto): Memory clobbers added.


Index: gcc/stmt.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/stmt.c,v
retrieving revision 1.334
diff -p -c -r1.334 stmt.c
*** gcc/stmt.c  9 Oct 2003 05:44:51 -0000       1.334
--- gcc/stmt.c  13 Nov 2003 12:18:30 -0000
*************** expand_goto (tree label)
*** 646,651 ****
--- 646,658 ----
        else
  #endif
        {
+         emit_insn (gen_rtx_CLOBBER (VOIDmode,
+                                     gen_rtx_MEM (BLKmode,
+                                                  gen_rtx_SCRATCH (VOIDmode))));
+         emit_insn (gen_rtx_CLOBBER (VOIDmode,
+                                     gen_rtx_MEM (BLKmode,
+                                                  hard_frame_pointer_rtx)));
+
          /* Restore frame pointer for containing function.
             This sets the actual hard register used for the frame pointer
             to the location of the function's incoming static chain info.


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