diff options
author | Chung-Ju Wu <jasonwucj@gmail.com> | 2018-05-19 15:10:08 +0000 |
---|---|---|
committer | Chung-Ju Wu <jasonwucj@gcc.gnu.org> | 2018-05-19 15:10:08 +0000 |
commit | b28c01ab9aa51aaa9329af2bdb581afd67a6a639 (patch) | |
tree | 5d3bd7296c8e3a7143d0ff8a1aa3926a00012f0b /gcc/config | |
parent | 8c9babb8517b548d5a1e398228c630cdc552455f (diff) | |
download | gcc-b28c01ab9aa51aaa9329af2bdb581afd67a6a639.zip gcc-b28c01ab9aa51aaa9329af2bdb581afd67a6a639.tar.gz gcc-b28c01ab9aa51aaa9329af2bdb581afd67a6a639.tar.bz2 |
[NDS32] New option -minline-asm-r15.
gcc/
* config/nds32/nds32.c
(nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
* config/nds32/nds32.opt (minline-asm-r15): New option.
From-SVN: r260400
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/nds32/nds32.c | 7 | ||||
-rw-r--r-- | gcc/config/nds32/nds32.opt | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index b705ae6..632a544 100644 --- a/gcc/config/nds32/nds32.c +++ b/gcc/config/nds32/nds32.c @@ -4066,8 +4066,11 @@ nds32_md_asm_adjust (vec<rtx> &outputs 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); + if (!flag_inline_asm_r15) + { + clobbers.safe_push (gen_rtx_REG (SImode, TA_REGNUM)); + SET_HARD_REG_BIT (clobbered_regs, TA_REGNUM); + } return NULL; } diff --git a/gcc/config/nds32/nds32.opt b/gcc/config/nds32/nds32.opt index 9e48154..a9cd72c 100644 --- a/gcc/config/nds32/nds32.opt +++ b/gcc/config/nds32/nds32.opt @@ -446,3 +446,7 @@ Always save $lp in the stack. munaligned-access Target Report Var(flag_unaligned_access) Init(0) Enable unaligned word and halfword accesses to packed data. + +minline-asm-r15 +Target Report Var(flag_inline_asm_r15) Init(0) +Allow use r15 for inline ASM. |