diff options
author | Yufeng Zhang <yufeng.zhang@arm.com> | 2013-11-05 20:54:22 +0000 |
---|---|---|
committer | Yufeng Zhang <yufeng.zhang@arm.com> | 2013-11-05 20:54:22 +0000 |
commit | 49eec19300ff80969c1e9a19e971b48ffa59ef16 (patch) | |
tree | 74bfa52d6d6fd41bac6df92700f9b519b27a4d3a /gas | |
parent | 68a642838267d9971f77f9eb487d32044a499c82 (diff) | |
download | gdb-49eec19300ff80969c1e9a19e971b48ffa59ef16.zip gdb-49eec19300ff80969c1e9a19e971b48ffa59ef16.tar.gz gdb-49eec19300ff80969c1e9a19e971b48ffa59ef16.tar.bz2 |
gas/
* config/tc-aarch64.c (parse_sys_reg): Update to use aarch64_sys_reg;
call aarch64_sys_reg_deprecated_p and warn about the deprecated
system registers.
gas/testsuite/
* gas/aarch64/deprecated.d: New file.
* gas/aarch64/deprecated.l: New file.
* gas/aarch64/deprecated.s: New file.
* gas/aarch64/sysreg-1.s: Add tests.
* gas/aarch64/sysreg-1.d: Add tests.
include/opcode/
* aarch64.h (aarch64_sys_reg): New typedef.
(aarch64_sys_regs): Change to define with the new type.
(aarch64_sys_reg_deprecated_p): Declare.
opcodes/
* aarch64-opc.c (F_DEPRECATED): New macro.
(aarch64_sys_regs): Update; flag "spsr_svc" and "spsr_hyp" with
F_DEPRECATED.
(aarch64_print_operand): Call aarch64_sys_reg_deprecated_p on
AARCH64_OPND_SYSREG.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-aarch64.c | 9 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/deprecated.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/deprecated.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/deprecated.s | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/sysreg-1.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/sysreg-1.s | 4 |
8 files changed, 43 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 371326a..60c355c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2013-11-05 Yufeng Zhang <yufeng.zhang@arm.com> + * config/tc-aarch64.c (parse_sys_reg): Update to use aarch64_sys_reg; + call aarch64_sys_reg_deprecated_p and warn about the deprecated + system registers. + +2013-11-05 Yufeng Zhang <yufeng.zhang@arm.com> + * config/tc-aarch64.c (parse_operands): Handle AARCH64_OPND_COND1. 2013-11-05 Will Newton <will.newton@linaro.org> diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 4febbdc..c230b1e 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -3277,7 +3277,7 @@ parse_sys_reg (char **str, struct hash_control *sys_regs, int imple_defined_p) { char *p, *q; char buf[32]; - const struct aarch64_name_value_pair *o; + const aarch64_sys_reg *o; int value; p = buf; @@ -3313,7 +3313,12 @@ parse_sys_reg (char **str, struct hash_control *sys_regs, int imple_defined_p) } } else - value = o->value; + { + if (aarch64_sys_reg_deprecated_p (o)) + as_warn (_("system register name '%s' is deprecated and may be " +"removed in a future release"), buf); + value = o->value; + } *str = q; return value; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 8a44216..c0f5fc36d 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,13 @@ 2013-11-05 Yufeng Zhang <yufeng.zhang@arm.com> + * gas/aarch64/deprecated.d: New file. + * gas/aarch64/deprecated.l: New file. + * gas/aarch64/deprecated.s: New file. + * gas/aarch64/sysreg-1.s: Add tests. + * gas/aarch64/sysreg-1.d: Add tests. + +2013-11-05 Yufeng Zhang <yufeng.zhang@arm.com> + * gas/aarch64/alias.s: Add tests. * gas/aarch64/alias.d: Update. * gas/aarch64/no-aliases.d: Update. diff --git a/gas/testsuite/gas/aarch64/deprecated.d b/gas/testsuite/gas/aarch64/deprecated.d new file mode 100644 index 0000000..9199697 --- /dev/null +++ b/gas/testsuite/gas/aarch64/deprecated.d @@ -0,0 +1,4 @@ +#name: Deprecated Support +#source: deprecated.s +#error-output: deprecated.l +#as: --warn diff --git a/gas/testsuite/gas/aarch64/deprecated.l b/gas/testsuite/gas/aarch64/deprecated.l new file mode 100644 index 0000000..a2327f7 --- /dev/null +++ b/gas/testsuite/gas/aarch64/deprecated.l @@ -0,0 +1,3 @@ +[^:]*: Assembler messages: +[^:]*:4: Warning: system register name 'spsr_svc' is deprecated and may be removed in a future release +[^:]*:5: Warning: system register name 'spsr_hyp' is deprecated and may be removed in a future release diff --git a/gas/testsuite/gas/aarch64/deprecated.s b/gas/testsuite/gas/aarch64/deprecated.s new file mode 100644 index 0000000..442a492 --- /dev/null +++ b/gas/testsuite/gas/aarch64/deprecated.s @@ -0,0 +1,5 @@ +// deprecated.s Test file for diagnostics on deprecated features. + +.text + mrs x0, spsr_svc + msr spsr_hyp, x15 diff --git a/gas/testsuite/gas/aarch64/sysreg-1.d b/gas/testsuite/gas/aarch64/sysreg-1.d index 75f75b7..81717c1 100644 --- a/gas/testsuite/gas/aarch64/sysreg-1.d +++ b/gas/testsuite/gas/aarch64/sysreg-1.d @@ -4277,3 +4277,9 @@ Disassembly of section \.text: 42b4: d53cc04f mrs x15, rmr_el2 42b8: d51ec04f msr rmr_el3, x15 42bc: d53ec04f mrs x15, rmr_el3 + 42c0: d518400f msr spsr_el1, x15 + 42c4: d538400f mrs x15, spsr_el1 + 42c8: d51c400f msr spsr_el2, x15 + 42cc: d53c400f mrs x15, spsr_el2 + 42d0: d51e400f msr spsr_el3, x15 + 42d4: d53e400f mrs x15, spsr_el3 diff --git a/gas/testsuite/gas/aarch64/sysreg-1.s b/gas/testsuite/gas/aarch64/sysreg-1.s index a2fcef4..a803191 100644 --- a/gas/testsuite/gas/aarch64/sysreg-1.s +++ b/gas/testsuite/gas/aarch64/sysreg-1.s @@ -162,3 +162,7 @@ rw_sys_reg sys_reg=rmr_el1 xreg=x15 r=1 w=1 rw_sys_reg sys_reg=rmr_el2 xreg=x15 r=1 w=1 rw_sys_reg sys_reg=rmr_el3 xreg=x15 r=1 w=1 + + rw_sys_reg sys_reg=spsr_el1 xreg=x15 r=1 w=1 + rw_sys_reg sys_reg=spsr_el2 xreg=x15 r=1 w=1 + rw_sys_reg sys_reg=spsr_el3 xreg=x15 r=1 w=1 |