diff options
author | Cooper Qu <cooper.qu@linux.alibaba.com> | 2020-08-31 10:55:06 +0800 |
---|---|---|
committer | Lifang Xia <lifang_xia@c-sky.com> | 2020-08-31 11:16:21 +0800 |
commit | dd221981c470f4fcb3164ce6d47bcd7726b559a4 (patch) | |
tree | 136700f36796c676169dcb4d63e7fad63effd654 /gas | |
parent | 18856f435ea415100464cc3219ec10cf4d037dcc (diff) | |
download | gdb-dd221981c470f4fcb3164ce6d47bcd7726b559a4.zip gdb-dd221981c470f4fcb3164ce6d47bcd7726b559a4.tar.gz gdb-dd221981c470f4fcb3164ce6d47bcd7726b559a4.tar.bz2 |
CSKY: Add warning when -mdsp and -mcpu=ck803ern are both added.
gas/
* config/tc-csky.c (md_begin): Add warning when -mdsp and
-mcpu=ck803ern are both added.
(parse_ldst_imm): Fix error message.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-csky.c | 19 |
2 files changed, 22 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 9115267..1f30a6b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2020-08-31 Cooper Qu <cooper.qu@linux.alibaba.com> + + * config/tc-csky.c (md_begin): Add warning when -mdsp and + -mcpu=ck803ern are both added. + (parse_ldst_imm): Fix error message. + 2020-08-30 Alan Modra <amodra@gmail.com> * testsuite/gas/cr16/cbitb_test.d: Update expected output. diff --git a/gas/config/tc-csky.c b/gas/config/tc-csky.c index 9f2975e..6fc24ac 100644 --- a/gas/config/tc-csky.c +++ b/gas/config/tc-csky.c @@ -1359,8 +1359,20 @@ md_begin (void) { if ((dsp_flag & CSKY_DSP_FLAG_V1)) { - isa_flag |= (CSKY_ISA_MAC_DSP | CSKY_ISA_DSP); - isa_flag &= ~CSKY_ISA_DSP_ENHANCE; + if (isa_flag & CSKY_ISA_DSP_ENHANCE) + { + /* Option -mdsp conflicts with -mcpu=ck803ern, + CPU already indicates the dsp version. */ + as_warn ("Option -mdsp conflicts with -mcpu=ck803ern which " + "has indicated DSP version, ignoring -mdsp."); + isa_flag &= ~(CSKY_ISA_MAC_DSP | CSKY_ISA_DSP); + isa_flag |= CSKY_ISA_DSP_ENHANCE; + } + else + { + isa_flag |= (CSKY_ISA_MAC_DSP | CSKY_ISA_DSP); + isa_flag &= ~CSKY_ISA_DSP_ENHANCE; + } } if ((dsp_flag & CSKY_DSP_FLAG_V2)) @@ -2938,7 +2950,8 @@ parse_ldst_imm (char **oper, struct csky_opcode_info *op ATTRIBUTE_UNUSED, if ((e.X_add_number % (1 << shift)) != 0) { /* Not aligned. */ - SET_ERROR_NUMBER (ERROR_OFFSET_UNALIGNED, ((unsigned long)1 << shift)); + SET_ERROR_NUMBER (ERROR_OFFSET_UNALIGNED, + (void *)"Operand format is error. eg. \"ld rz, (rx, n)\""); return FALSE; } |