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]

Re: Frame notes for pa.c


On Mon, 2 Apr 2001, Richard Henderson wrote:

> On Mon, Apr 02, 2001 at 07:07:14PM +1000, Alan Modra wrote:
> > It's more than a few tweaks, I think.  pa uses this sort of sequence to
> > adjust sp when frames > 8k.
> > 
> > (set (reg 1) (plus (reg sp) (high (const_int offset))))
> > (set (reg sp) (lo_sum (reg 1) (const_int offset)))
> 
> Yes, but so does Sparc, MIPS, and others.  It's supposed to work.

I'll bet it doesn't work on Sparc, MIPS etc. at the moment then.

	* dwarf2out.c (dwarf2out_frame_debug_expr): Move errant HIGH and
	LO_SUM cases to where they belong.

Alan Modra
-- 
Linuxcare

Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.258
diff -u -p -r1.258 dwarf2out.c
--- dwarf2out.c	2001/03/28 11:03:49	1.258
+++ dwarf2out.c	2001/04/03 00:37:14
@@ -1404,24 +1404,24 @@ dwarf2out_frame_debug_expr (expr, label)
 	  cfa_temp.offset |= INTVAL (XEXP (src, 1));
 	  break;
 
+	  /* Skip over HIGH, assuming it will be followed by a LO_SUM,
+	     which will fill in all of the bits.  */
+	  /* Rule 8 */
+	case HIGH:
+	  break;
+
+	  /* Rule 9 */
+	case LO_SUM:
+	  if (GET_CODE (XEXP (src, 1)) != CONST_INT)
+	    abort ();
+	  cfa_temp.reg = REGNO (dest);
+	  cfa_temp.offset = INTVAL (XEXP (src, 1));
+	  break;
+
 	default:
 	  abort ();
 	}
       def_cfa_1 (label, &cfa);
-      break;
-
-      /* Skip over HIGH, assuming it will be followed by a LO_SUM, which
-	 will fill in all of the bits.  */
-      /* Rule 8 */
-    case HIGH:
-      break;
-
-      /* Rule 9 */
-    case LO_SUM:
-      if (GET_CODE (XEXP (src, 1)) != CONST_INT)
-	abort ();
-      cfa_temp.reg = REGNO (dest);
-      cfa_temp.offset = INTVAL (XEXP (src, 1));
       break;
 
     case MEM:


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