aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2019-10-09 13:48:06 +0100
committerNick Clifton <nickc@redhat.com>2019-10-09 13:48:06 +0100
commit1d3787499d6edd07b30f3fc7b26962a1c695b8a4 (patch)
tree1d09c665560e756e49860f513820650db3095226 /gas/testsuite
parent8610e0fd93ea253f9beb9ebb6e50e8807ed83327 (diff)
downloadgdb-1d3787499d6edd07b30f3fc7b26962a1c695b8a4.zip
gdb-1d3787499d6edd07b30f3fc7b26962a1c695b8a4.tar.gz
gdb-1d3787499d6edd07b30f3fc7b26962a1c695b8a4.tar.bz2
Fix the disassembly of the LDS and STS instructions of the AVR architecture.
PR 25041 opcodes * avr-dis.c (avr_operand): Fix construction of address for lds/sts instructions. gas * testsuite/gas/avr/pr25041.s: New test. * testsuite/gas/avr/pr25041.d: New test driver.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/avr/pr25041.d9
-rw-r--r--gas/testsuite/gas/avr/pr25041.s4
2 files changed, 13 insertions, 0 deletions
diff --git a/gas/testsuite/gas/avr/pr25041.d b/gas/testsuite/gas/avr/pr25041.d
new file mode 100644
index 0000000..086fe0a
--- /dev/null
+++ b/gas/testsuite/gas/avr/pr25041.d
@@ -0,0 +1,9 @@
+#name: PR 25041 (correct generation of lds/sts addresses)
+#as: -m "attiny10"
+#target: avr-*-*
+#objdump: -Dm"avr:100"
+
+#...
+00000000 <_start>:
+ 0: 00 a0 lds r16, 0x80 ; 0x800080 <_start\+0x800080>
+ 2: 00 a8 sts 0x80, r16 ; 0x800080 <_start\+0x800080>
diff --git a/gas/testsuite/gas/avr/pr25041.s b/gas/testsuite/gas/avr/pr25041.s
new file mode 100644
index 0000000..b5745b4
--- /dev/null
+++ b/gas/testsuite/gas/avr/pr25041.s
@@ -0,0 +1,4 @@
+
+_start:
+ lds r16, 0x80
+ sts 0x80, r16