[NDS32] Implement TARGET_MD_ASM_ADJUST hook.
authorChung-Ju Wu <jasonwucj@gcc.gnu.org>
Mon, 12 Mar 2018 01:29:34 +0000 (01:29 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Mon, 12 Mar 2018 01:29:34 +0000 (01:29 +0000)
gcc/
* config/nds32/nds32.c (nds32_md_asm_adjust): New function.
(TARGET_MD_ASM_ADJUST): Define.

From-SVN: r258443

gcc/ChangeLog
gcc/config/nds32/nds32.c

index aad7f0e0697fe317bc01852e9617cdb5f22ecaf6..59aa9f388e23d783ac3275cb5158c86f3b14b7c3 100644 (file)
@@ -1,4 +1,9 @@
-2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
+2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
+
+       * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
+       (TARGET_MD_ASM_ADJUST): Define.
+
+2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
            Kito Cheng  <kito.cheng@gmail.com>
            Chung-Ju Wu  <jasonwucj@gmail.com>
 
index 2d644b77d159f6b7f3e65e053322bc1775e37f09..80b00f147dd7110698bc9728dea3075fc9b8ace5 100644 (file)
@@ -2750,6 +2750,17 @@ nds32_option_override (void)
 \f
 /* Miscellaneous Parameters.  */
 
+static rtx_insn *
+nds32_md_asm_adjust (vec<rtx> &outputs ATTRIBUTE_UNUSED,
+                    vec<rtx> &inputs ATTRIBUTE_UNUSED,
+                    vec<const char *> &constraints ATTRIBUTE_UNUSED,
+                    vec<rtx> &clobbers, HARD_REG_SET &clobbered_regs)
+{
+  clobbers.safe_push (gen_rtx_REG (SImode, TA_REGNUM));
+  SET_HARD_REG_BIT (clobbered_regs, TA_REGNUM);
+  return NULL;
+}
+
 static void
 nds32_init_builtins (void)
 {
@@ -3800,6 +3811,9 @@ nds32_target_alignment (rtx_insn *label)
 \f
 /* Miscellaneous Parameters.  */
 
+#undef TARGET_MD_ASM_ADJUST
+#define TARGET_MD_ASM_ADJUST nds32_md_asm_adjust
+
 #undef TARGET_INIT_BUILTINS
 #define TARGET_INIT_BUILTINS nds32_init_builtins