[NDS32] Fix wrong data flow when building nds32 target with --enable-checking=yes.
authorChung-Ju Wu <jasonwucj@gmail.com>
Fri, 16 Jan 2015 06:02:11 +0000 (06:02 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Fri, 16 Jan 2015 06:02:11 +0000 (06:02 +0000)
gcc/
* config/nds32/constants.md (UNSPEC_VOLATILE_POP25_RETURN): New.
* config/nds32/nds32.md (pop25return): New.
* config/nds32/nds32.c (nds32_expand_epilogue_v3pop): Emit
pop25return pattern.

From-SVN: r219710

gcc/ChangeLog
gcc/config/nds32/constants.md
gcc/config/nds32/nds32.c
gcc/config/nds32/nds32.md

index 5ef518b3d22a93824741f2dd47ae39399256c29f..1d998d02fb7328a8a2623c228fd9bd3d20f07733 100644 (file)
@@ -1,3 +1,10 @@
+2015-01-16  Chung-Ju Wu  <jasonwucj@gmail.com>
+
+       * config/nds32/constants.md (UNSPEC_VOLATILE_POP25_RETURN): New.
+       * config/nds32/nds32.md (pop25return): New.
+       * config/nds32/nds32.c (nds32_expand_epilogue_v3pop): Emit
+       pop25return pattern.
+
 2015-01-16  Chung-Ju Wu  <jasonwucj@gmail.com>
 
        * doc/invoke.texi (NDS32 Options): Remove -mforce-fp-as-gp,
index 1c37c5fd72466e5519cb7328bf7e30c158d9927d..ea1cd4cf52b1122883bea2b656c902dc975917a7 100644 (file)
@@ -41,6 +41,7 @@
   UNSPEC_VOLATILE_MTUSR
   UNSPEC_VOLATILE_SETGIE_EN
   UNSPEC_VOLATILE_SETGIE_DIS
+  UNSPEC_VOLATILE_POP25_RETURN
 ])
 
 ;; ------------------------------------------------------------------------
index f7d5e706e56a00a985d576b6c614ee83382cbb72..d38ea896d79cf062694e404ff67aacece8b4b14b 100644 (file)
@@ -3449,6 +3449,9 @@ nds32_expand_epilogue_v3pop (void)
       nds32_emit_stack_v3pop (Rb, Re,
                              GEN_INT (14), GEN_INT (0));
     }
+
+  /* Generate return instruction.  */
+  emit_jump_insn (gen_pop25return ());
 }
 
 /* ------------------------------------------------------------------------ */
index 8302969fcabf9512df241d7f833e76a58111a891..01faa681cad5f03a18400480ec400db1b0b479d5 100644 (file)
@@ -2253,3 +2253,15 @@ create_template:
    (set_attr "length" "4")])
 
 ;; ----------------------------------------------------------------------------
+
+;; Pseudo NOPs
+
+(define_insn "pop25return"
+  [(return)
+   (unspec_volatile:SI [(reg:SI LP_REGNUM)] UNSPEC_VOLATILE_POP25_RETURN)]
+  ""
+  "! return for pop 25"
+  [(set_attr "length" "0")]
+)
+
+;; ----------------------------------------------------------------------------