diff options
author | Nick Clifton <nickc@redhat.com> | 2016-04-13 15:09:25 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-04-13 15:09:25 +0100 |
commit | accc018020dd329d99b50335ad168d35650b7f09 (patch) | |
tree | c0ee440aa0eaccf620b4950393e8270e254a28a4 /gas | |
parent | 45e3745ed0e034fdec5beee0738f383bd6e2e045 (diff) | |
download | gdb-accc018020dd329d99b50335ad168d35650b7f09.zip gdb-accc018020dd329d99b50335ad168d35650b7f09.tar.gz gdb-accc018020dd329d99b50335ad168d35650b7f09.tar.bz2 |
Fix disassembly of the V850's LD.BU instruction.
PR target/19937
opcode * v850-opc.c (v850_opcodes): Correct masks for long versions of
the LD.B and LD.BU instructions.
gas * testsuite/gas/v850/pr19937.s: New test.
* testsuite/gas/v850/pr19937.d: New test control file.
* testsuite/gas/v850/basic.exp: Run the new test.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/gas/v850/basic.exp | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/v850/pr19937.d | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/v850/pr19937.s | 17 |
3 files changed, 33 insertions, 0 deletions
diff --git a/gas/testsuite/gas/v850/basic.exp b/gas/testsuite/gas/v850/basic.exp index aa73303..ff0f603 100644 --- a/gas/testsuite/gas/v850/basic.exp +++ b/gas/testsuite/gas/v850/basic.exp @@ -437,4 +437,5 @@ if [istarget v850*-*-*] then { gas_test_error "range.s" "-mwarn-signed-overflow" "Check for range error on byte load/store" run_dump_test "v850e1" run_dump_test "split-lo16" + run_dump_test "pr19937" } diff --git a/gas/testsuite/gas/v850/pr19937.d b/gas/testsuite/gas/v850/pr19937.d new file mode 100644 index 0000000..ccc93fd --- /dev/null +++ b/gas/testsuite/gas/v850/pr19937.d @@ -0,0 +1,15 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: Disassembly of LD.BU 0x4[rN], rM +#as: -mv850e3v5 + +.*: +file format .*v850.* + +Disassembly of section .text: +0+000 <.*> 8a a7 01 00[ ]+ld.bu[ ]+0\[r10\], r20 +0+004 <.*> 8a a7 05 00[ ]+ld.bu[ ]+4\[r10\], r20 +0+008 <.*> 8a a7 09 00[ ]+ld.bu[ ]+8\[r10\], r20 +0+00c <.*> 0a a7 00 00[ ]+ld.b[ ]+0\[r10\], r20 +0+010 <.*> 0a a7 04 00[ ]+ld.b[ ]+4\[r10\], r20 +0+014 <.*> 0a a7 08 00[ ]+ld.b[ ]+8\[r10\], r20 +#pass + diff --git a/gas/testsuite/gas/v850/pr19937.s b/gas/testsuite/gas/v850/pr19937.s new file mode 100644 index 0000000..f3a0405 --- /dev/null +++ b/gas/testsuite/gas/v850/pr19937.s @@ -0,0 +1,17 @@ +.text +.globl _start +_start: + # ld.bu FMT14 + ld.bu 0x0[r10], r20 + ld.bu 0x4[r10], r20 + ld.bu 0x8[r10], r20 + + ld.b 0x0[r10], r20 + ld.b 0x4[r10], r20 + ld.b 0x8[r10], r20 + +exit: + mov r0, r1 + +.data +data: |