diff options
author | Nick Clifton <nickc@redhat.com> | 2015-05-08 17:28:26 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-05-08 17:28:26 +0100 |
commit | ae8714c2712ef9a179cfa9158a289bd400c0ad97 (patch) | |
tree | 1b2ce963d4100fc1c99a6267f458e3ab16a09c40 /gas/testsuite | |
parent | dd9f02a0ca7a9873717933345e393edb3d5da6bc (diff) | |
download | gdb-ae8714c2712ef9a179cfa9158a289bd400c0ad97.zip gdb-ae8714c2712ef9a179cfa9158a289bd400c0ad97.tar.gz gdb-ae8714c2712ef9a179cfa9158a289bd400c0ad97.tar.bz2 |
Change ARM symbol name verification code so that it only triggers when the form "name = val" is used.
PR gas/18347
* config/tc-arm.h (TC_EQUAL_IN_INSN): Define.
* config/tc-arm.c (arm_tc_equal_in_insn): New function. Move
the symbol name checking code to here from...
(md_undefined_symbo): ... here.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/pr18347.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/pr18347.s | 11 |
3 files changed, 19 insertions, 1 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index d63f48a..b3efb8f 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2015-05-08 Nick Clifton <nickc@redhat.com> + + PR gas/18347 + * gas/arm/pr18347.s: Add tests of other symbol assignments which + should not generate the warning. + * gas/arm/pr18347.l: Update expected output. + 2015-05-08 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run relax-4 and x86-64-relax-3. diff --git a/gas/testsuite/gas/arm/pr18347.l b/gas/testsuite/gas/arm/pr18347.l index 12e223d..9ef0da8 100644 --- a/gas/testsuite/gas/arm/pr18347.l +++ b/gas/testsuite/gas/arm/pr18347.l @@ -1,2 +1,2 @@ [^:]*: Assembler messages: -[^:]*:2: Warning: \[-mwarn-syms\]: Symbol 'LDR' matches an ARM instruction - is this intentional \? +[^:]*:2: Warning: \[-mwarn-syms\]: Assignment makes a symbol match an ARM instruction: LDR diff --git a/gas/testsuite/gas/arm/pr18347.s b/gas/testsuite/gas/arm/pr18347.s index ac22b45..591d69b 100644 --- a/gas/testsuite/gas/arm/pr18347.s +++ b/gas/testsuite/gas/arm/pr18347.s @@ -1,3 +1,14 @@ MOV r1, r0 LDR =garbage // no destination register MOV r2, r3 + + // The warning should only be triggered by a "foo = bar" + // type of expression. Other ways of creating symbols + // should allow ARM instruction names. +b: + nop + +.set bx, fred +.equiv ldr, bar +.eqv nop, fred +.equ mov, foo |