]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/32335 (libgcc build failure, ICE in cselib_record_set, at cselib.c:1508)
authorRask Ingemann Lambertsen <rask@sygehus.dk>
Tue, 19 Jun 2007 17:35:16 +0000 (19:35 +0200)
committerRask Ingemann Lambertsen <rask@gcc.gnu.org>
Tue, 19 Jun 2007 17:35:16 +0000 (17:35 +0000)
2007-06-19  Rask Ingemann Lambertsen  <rask@sygehus.dk>

PR target/32335
* config/m32c/m32c.c: Include dataflow header file.
(m32c_emit_prologue): Adjust for prologue insn change.
* config/m32c/prologue.md (prologue_enter_16): Only modify SP_REGNO
once inside a PARALLEL. Assume frame size passed in operand 0
includes space to save the fb register.
(prologue_enter_24): Likewise.
(epilogue_exitd): Only modify SP_REGNO once inside a PARALLEL.

From-SVN: r125853

gcc/ChangeLog
gcc/config/m32c/m32c.c
gcc/config/m32c/prologue.md

index a4b7d5d25a1a69110a25799779dca0b753548982..3bf6aba6043b22368439a650e741202b979661de 100644 (file)
@@ -1,3 +1,14 @@
+2007-06-19  Rask Ingemann Lambertsen  <rask@sygehus.dk>
+
+       PR target/32335
+       * config/m32c/m32c.c: Include dataflow header file.
+       (m32c_emit_prologue): Adjust for prologue insn change.
+       * config/m32c/prologue.md (prologue_enter_16): Only modify SP_REGNO
+       once inside a PARALLEL. Assume frame size passed in operand 0
+       includes space to save the fb register.
+       (prologue_enter_24): Likewise.
+       (epilogue_exitd): Only modify SP_REGNO once inside a PARALLEL.
+
 2007-06-19  David Daney  <ddaney@avtrex.com
 
        PR target/32313
index f48b252926e05d7062c28631cca799779e6de62b..097c3a3a83d5b9608a5127db90174ea9a41f1b8c 100644 (file)
@@ -49,6 +49,7 @@
 #include "tm_p.h"
 #include "langhooks.h"
 #include "tree-gimple.h"
+#include "df.h"
 
 /* Prototypes */
 
@@ -3977,8 +3978,8 @@ m32c_emit_prologue (void)
   if (cfun->machine->use_rts == 0)
     F (emit_insn (m32c_all_frame_related
                  (TARGET_A16
-                  ? gen_prologue_enter_16 (GEN_INT (frame_size))
-                  : gen_prologue_enter_24 (GEN_INT (frame_size)))));
+                  ? gen_prologue_enter_16 (GEN_INT (frame_size + 2))
+                  : gen_prologue_enter_24 (GEN_INT (frame_size + 4)))));
 
   if (extra_frame_size)
     {
index 98c40acc3ca19515f772821cb4c118de7a862737..81d35a1c965f12925e51edcc078bc6d56be5e899 100644 (file)
@@ -1,5 +1,5 @@
 ;; Machine Descriptions for R8C/M16C/M32C
-;; Copyright (C) 2005
+;; Copyright (C) 2005, 2007
 ;; Free Software Foundation, Inc.
 ;; Contributed by Red Hat.
 ;;
@@ -33,7 +33,7 @@
 
 ; We assume dwarf2out will process each set in sequence.
 (define_insn "prologue_enter_16"
-  [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNO)))
+  [(set (mem:HI (plus:HI (reg:HI SP_REGNO) (const_int -2)))
        (reg:HI FB_REGNO))
    (set (reg:HI FB_REGNO)
        (reg:HI SP_REGNO))
                   (match_operand 0 "const_int_operand" "i")))
    ]
   "TARGET_A16"
-  "enter\t%0"
+  {
+    /* This is due to binutils bug gas/4659.  */
+    if (INTVAL (operands[0]) == 2)
+      return "enter\t#0";
+    return "enter\t%0-2";
+  }
   [(set_attr "flags" "x")]
   )
 
 (define_insn "prologue_enter_24"
-  [(set (mem:SI (pre_dec:PSI (reg:PSI SP_REGNO)))
+  [(set (mem:SI (plus:PSI (reg:PSI SP_REGNO) (const_int -4)))
        (reg:SI FB_REGNO))
    (set (reg:PSI FB_REGNO)
        (reg:PSI SP_REGNO))
                   (match_operand 0 "const_int_operand" "i")))
    ]
   "TARGET_A24"
-  "enter\t%0"
+  {
+    /* This is due to binutils bug gas/4659.  */
+    if (INTVAL (operands[0]) == 4)
+      return "enter\t#0";
+    return "enter\t%0-4";
+  }
   [(set_attr "flags" "x")]
   )
 
 
 (define_insn "epilogue_exitd"
   [(set (reg:PSI SP_REGNO)
-       (reg:PSI FB_REGNO))
-   (set (reg:PSI FB_REGNO)
-       (mem:PSI (reg:PSI SP_REGNO)))
-   (set (reg:PSI SP_REGNO)
-       (plus:PSI (reg:PSI SP_REGNO)
+       (plus:PSI (reg:PSI FB_REGNO)
              (match_operand 0 "const_int_operand" "i")))
+   (set (reg:PSI FB_REGNO)
+       (mem:PSI (reg:PSI FB_REGNO)))
    (return)
    ]
   ""