diff options
author | Jan Beulich <jbeulich@novell.com> | 2013-04-10 13:18:33 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2013-04-10 13:18:33 +0000 |
commit | ccb84d658f5d626c1cbc09024da88faecbb4bbf3 (patch) | |
tree | 94f44a60ce56af337c335e2ae0ac5c1e74590242 | |
parent | edb2fa9a965edcd8c747be6fe6e9d8a75397708d (diff) | |
download | gdb-ccb84d658f5d626c1cbc09024da88faecbb4bbf3.zip gdb-ccb84d658f5d626c1cbc09024da88faecbb4bbf3.tar.gz gdb-ccb84d658f5d626c1cbc09024da88faecbb4bbf3.tar.bz2 |
gas/
2013-04-10 Jan Beulich <jbeulich@suse.com>
* gas/config/tc-arm.c (parse_operands): Re-write
po_barrier_or_imm().
(do_barrier): Remove bogus constraint().
(do_t_barrier): Remove.
gas/testsuite/
2013-04-10 Jan Beulich <jbeulich@suse.com>
* gas/arm/barrier-bad.d: Change title.
* gas/arm/barrier-bad.s: Add immediate form of ISB and DSB as
well as one symbolic form of DSB.
* gas/arm/barrier-bad.l: Update accordingly.
* gas/arm/barrier-bad-thumb.d: Adjust title. Use barrier-bad.s as
source. Pass -mthumb to gas.
* gas/arm/barrier-bad-thumb.l: Remove.
* gas/arm/barrier-bad-thumb.s: Remove.
* gas/arm/barrier-thumb.d: Adjust title. Use barrier.s as source.
Pass -mthumb to gas.
* gas/arm/barrier-thumb.s: Remove.
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 53 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/barrier-bad-thumb.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/barrier-bad-thumb.l | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/barrier-bad-thumb.s | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/barrier-bad.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/barrier-bad.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/barrier-bad.s | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/barrier-thumb.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/barrier-thumb.s | 74 |
11 files changed, 48 insertions, 139 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 37954ea..3818536 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2013-04-10 Jan Beulich <jbeulich@suse.com> + + * gas/config/tc-arm.c (parse_operands): Re-write + po_barrier_or_imm(). + (do_barrier): Remove bogus constraint(). + (do_t_barrier): Remove. + 2013-04-09 Joerg Wunsch <joerg.wunsch@atmel.com> * gas/config/tc-avr.c (mcu_types): Add ATmega64RFR2, diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 78fa733..10399d6 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -6338,22 +6338,16 @@ parse_operands (char *str, const unsigned int *pattern, bfd_boolean thumb) do \ { \ val = parse_barrier (&str); \ - if (val == FAIL) \ + if (val == FAIL && ! ISALPHA (*str)) \ + goto immediate; \ + if (val == FAIL \ + /* ISB can only take SY as an option. */ \ + || ((inst.instruction & 0xf0) == 0x60 \ + && val != 0xf)) \ { \ - if (ISALPHA (*str)) \ - goto failure; \ - else \ - goto immediate; \ - } \ - else \ - { \ - if ((inst.instruction & 0xf0) == 0x60 \ - && val != 0xf) \ - { \ - /* ISB can only take SY as an option. */ \ - inst.error = _("invalid barrier type"); \ - goto failure; \ - } \ + inst.error = _("invalid barrier type"); \ + backtrack_pos = 0; \ + goto failure; \ } \ } \ while (0) @@ -7541,13 +7535,7 @@ static void do_barrier (void) { if (inst.operands[0].present) - { - constraint ((inst.instruction & 0xf0) != 0x40 - && inst.operands[0].imm > 0xf - && inst.operands[0].imm < 0x0, - _("bad barrier type")); - inst.instruction |= inst.operands[0].imm; - } + inst.instruction |= inst.operands[0].imm; else inst.instruction |= 0xf; } @@ -10051,21 +10039,6 @@ do_t_arit3c (void) } static void -do_t_barrier (void) -{ - if (inst.operands[0].present) - { - constraint ((inst.instruction & 0xf0) != 0x40 - && inst.operands[0].imm > 0xf - && inst.operands[0].imm < 0x0, - _("bad barrier type")); - inst.instruction |= inst.operands[0].imm; - } - else - inst.instruction |= 0xf; -} - -static void do_t_bfc (void) { unsigned Rd; @@ -18510,9 +18483,9 @@ static const struct asm_opcode insns[] = #undef THUMB_VARIANT #define THUMB_VARIANT & arm_ext_barrier - TUF("dmb", 57ff050, f3bf8f50, 1, (oBARRIER_I15), barrier, t_barrier), - TUF("dsb", 57ff040, f3bf8f40, 1, (oBARRIER_I15), barrier, t_barrier), - TUF("isb", 57ff060, f3bf8f60, 1, (oBARRIER_I15), barrier, t_barrier), + TUF("dmb", 57ff050, f3bf8f50, 1, (oBARRIER_I15), barrier, barrier), + TUF("dsb", 57ff040, f3bf8f40, 1, (oBARRIER_I15), barrier, barrier), + TUF("isb", 57ff060, f3bf8f60, 1, (oBARRIER_I15), barrier, barrier), /* ARM V7 instructions. */ #undef ARM_VARIANT diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index ba42c25..28aa947 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,17 @@ +2013-04-10 Jan Beulich <jbeulich@suse.com> + + * gas/arm/barrier-bad.d: Change title. + * gas/arm/barrier-bad.s: Add immediate form of ISB and DSB as + well as one symbolic form of DSB. + * gas/arm/barrier-bad.l: Update accordingly. + * gas/arm/barrier-bad-thumb.d: Adjust title. Use barrier-bad.s as + source. Pass -mthumb to gas. + * gas/arm/barrier-bad-thumb.l: Remove. + * gas/arm/barrier-bad-thumb.s: Remove. + * gas/arm/barrier-thumb.d: Adjust title. Use barrier.s as source. + Pass -mthumb to gas. + * gas/arm/barrier-thumb.s: Remove. + 2013-04-09 Jan Beulich <jbeulich@suse.com> * gas/arm/vfp1xD.s: Add VMRS/VMSR tests with FPINST, FPINST2, diff --git a/gas/testsuite/gas/arm/barrier-bad-thumb.d b/gas/testsuite/gas/arm/barrier-bad-thumb.d index 3df3f76..384b7ef 100644 --- a/gas/testsuite/gas/arm/barrier-bad-thumb.d +++ b/gas/testsuite/gas/arm/barrier-bad-thumb.d @@ -1,3 +1,5 @@ -#name: All options expect SY are reserved for ISB +#name: Bad barrier options (Thumb) #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd -#error-output: barrier-bad-thumb.l +#source: barrier-bad.s +#as: -mthumb +#error-output: barrier-bad.l diff --git a/gas/testsuite/gas/arm/barrier-bad-thumb.l b/gas/testsuite/gas/arm/barrier-bad-thumb.l deleted file mode 100644 index a03a9e7..0000000 --- a/gas/testsuite/gas/arm/barrier-bad-thumb.l +++ /dev/null @@ -1,8 +0,0 @@ -[^:]*: Assembler messages: -[^:]*:4: Error: invalid barrier type -- `isb st' -[^:]*:5: Error: invalid barrier type -- `isb ish' -[^:]*:6: Error: invalid barrier type -- `isb ishst' -[^:]*:7: Error: invalid barrier type -- `isb nsh' -[^:]*:8: Error: invalid barrier type -- `isb nshst' -[^:]*:9: Error: invalid barrier type -- `isb osh' -[^:]*:10: Error: invalid barrier type -- `isb oshst' diff --git a/gas/testsuite/gas/arm/barrier-bad-thumb.s b/gas/testsuite/gas/arm/barrier-bad-thumb.s deleted file mode 100644 index 67fc40a..0000000 --- a/gas/testsuite/gas/arm/barrier-bad-thumb.s +++ /dev/null @@ -1,11 +0,0 @@ -.syntax unified -.thumb -.arch armv7a -isb st -isb ish -isb ishst -isb nsh -isb nshst -isb osh -isb oshst - diff --git a/gas/testsuite/gas/arm/barrier-bad.d b/gas/testsuite/gas/arm/barrier-bad.d index 1e351bc..6e19717 100644 --- a/gas/testsuite/gas/arm/barrier-bad.d +++ b/gas/testsuite/gas/arm/barrier-bad.d @@ -1,3 +1,3 @@ -#name: All options expect SY are reserved for ISB +#name: Bad barrier options (ARM) #skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd #error-output: barrier-bad.l diff --git a/gas/testsuite/gas/arm/barrier-bad.l b/gas/testsuite/gas/arm/barrier-bad.l index 045ef47..fc91fd2 100644 --- a/gas/testsuite/gas/arm/barrier-bad.l +++ b/gas/testsuite/gas/arm/barrier-bad.l @@ -6,3 +6,6 @@ [^:]*:7: Error: invalid barrier type -- `isb nshst' [^:]*:8: Error: invalid barrier type -- `isb osh' [^:]*:9: Error: invalid barrier type -- `isb oshst' +[^:]*:10: Error: immediate value out of range -- `isb #23' +[^:]*:11: Error: invalid barrier type -- `dsb xyz' +[^:]*:12: Error: immediate value out of range -- `dsb #34' diff --git a/gas/testsuite/gas/arm/barrier-bad.s b/gas/testsuite/gas/arm/barrier-bad.s index 3dfae78..fb7dfb8 100644 --- a/gas/testsuite/gas/arm/barrier-bad.s +++ b/gas/testsuite/gas/arm/barrier-bad.s @@ -7,4 +7,6 @@ isb nsh isb nshst isb osh isb oshst - +isb #23 +dsb xyz +dsb #34 diff --git a/gas/testsuite/gas/arm/barrier-thumb.d b/gas/testsuite/gas/arm/barrier-thumb.d index 075a663..5929946 100644 --- a/gas/testsuite/gas/arm/barrier-thumb.d +++ b/gas/testsuite/gas/arm/barrier-thumb.d @@ -1,6 +1,7 @@ #objdump: -dr --prefix-addresses --show-raw-insn -#name: Barrier Instruction Operands -#as: -mcpu=cortex-a8 +#name: Barrier Instruction Operands (Thumb) +#source: barrier.s +#as: -mcpu=cortex-a8 -mthumb # This test is only valid on ELF based ports. #not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd diff --git a/gas/testsuite/gas/arm/barrier-thumb.s b/gas/testsuite/gas/arm/barrier-thumb.s deleted file mode 100644 index cc42076..0000000 --- a/gas/testsuite/gas/arm/barrier-thumb.s +++ /dev/null @@ -1,74 +0,0 @@ -@ Test case to validate barrier instruction operands for T2 -.thumb -.section .text -.syntax unified - @Tests to verify dsb, dmb and isb operand acceptance - dmb sy - dmb st - dmb ish - dmb sh - dmb ishst - dmb shst - dmb nsh - dmb un - dmb nshst - dmb unst - dmb osh - dmb oshst - dsb sy - dsb st - dsb ish - dsb sh - dsb ishst - dsb shst - dsb nsh - dsb un - dsb nshst - dsb unst - dsb osh - isb sy - isb - - @Sanity checks for operands in upper case - dmb SY - dmb ST - dmb ISH - dmb SH - dmb ISHST - dmb SHST - dmb NSH - dmb UN - dmb NSHST - dmb UNST - dmb OSH - dmb OSHST - dsb SY - dsb ST - dsb ISH - dsb SH - dsb ISHST - dsb SHST - dsb NSH - dsb UN - dsb NSHST - dsb UNST - dsb OSH - isb SY - - @Tests to verify immediate operands - dsb 0 - dsb #15 - - dmb 0 - dmb #15 - - isb 0 - isb #14 - isb #11 - isb #10 - isb #7 - isb #6 - isb #3 - isb #2 - - isb #15 |