From: Chung-Ju Wu Date: Mon, 12 Mar 2018 01:29:34 +0000 (+0000) Subject: [NDS32] Implement TARGET_MD_ASM_ADJUST hook. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=823835a99d4e88d38b436c1b409e574398d3a34f;p=gcc.git [NDS32] Implement TARGET_MD_ASM_ADJUST hook. gcc/ * config/nds32/nds32.c (nds32_md_asm_adjust): New function. (TARGET_MD_ASM_ADJUST): Define. From-SVN: r258443 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aad7f0e0697..59aa9f388e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,9 @@ -2018-03-11 Monk Chiang +2018-03-12 Chung-Ju Wu + + * config/nds32/nds32.c (nds32_md_asm_adjust): New function. + (TARGET_MD_ASM_ADJUST): Define. + +2018-03-12 Monk Chiang Kito Cheng Chung-Ju Wu diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index 2d644b77d15..80b00f147dd 100644 --- a/gcc/config/nds32/nds32.c +++ b/gcc/config/nds32/nds32.c @@ -2750,6 +2750,17 @@ nds32_option_override (void) /* Miscellaneous Parameters. */ +static rtx_insn * +nds32_md_asm_adjust (vec &outputs ATTRIBUTE_UNUSED, + vec &inputs ATTRIBUTE_UNUSED, + vec &constraints ATTRIBUTE_UNUSED, + vec &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) /* 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