aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorVinay Kumar <vinay.g@kpit.com>2015-10-27 15:24:40 +0000
committerNick Clifton <nickc@redhat.com>2015-10-27 15:24:40 +0000
commitc2f2875869a3e427435ea04bcd416ee2f99e7ee9 (patch)
treeaa46e5203bb211b028f561355b2ec855628b157f /gas
parent709b551853919f47b58aafbb95fd00a98bcaf76c (diff)
downloadgdb-c2f2875869a3e427435ea04bcd416ee2f99e7ee9.zip
gdb-c2f2875869a3e427435ea04bcd416ee2f99e7ee9.tar.gz
gdb-c2f2875869a3e427435ea04bcd416ee2f99e7ee9.tar.bz2
Fix RL78 disassembly of DE+offset addressing to always show the offset, even when zero.
PR binutils/19159 opcodes * rl78-decode.opc (MOV): Added offset to DE register in index addressing mode. * rl78-decode.c: Regenerate. test * gas/rl78/pr19159.s: New test source file. * gas/rl78/pr19159.d: New test case. * gas/rl78/rl78.exp: Run the new test.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/rl78/pr19157.d2
-rw-r--r--gas/testsuite/gas/rl78/pr19159.d15
-rw-r--r--gas/testsuite/gas/rl78/pr19159.s13
-rw-r--r--gas/testsuite/gas/rl78/rl78.exp1
5 files changed, 37 insertions, 1 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 08303ee..02b82df 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2015-10-27 Nick Clifton <nickc@redhat.com>
+ PR binutils/19159
+ * gas/rl78/pr19159.s: New test source file.
+ * gas/rl78/pr19159.d: New test case.
+ * gas/rl78/rl78.exp: Run the new test.
+
+2015-10-27 Nick Clifton <nickc@redhat.com>
+
PR binutils/19158
* gas/rl78/pr19158.s: New test source file.
* gas/rl78/pr19158.d: New test case.
diff --git a/gas/testsuite/gas/rl78/pr19157.d b/gas/testsuite/gas/rl78/pr19157.d
index 9bbbc10..5416457 100644
--- a/gas/testsuite/gas/rl78/pr19157.d
+++ b/gas/testsuite/gas/rl78/pr19157.d
@@ -1,5 +1,5 @@
#objdump: -d --prefix-addresses --show-raw-insn
-#name: PR19157: RL78: zero offset omitted
+#name: PR19157: RL78: zero offset omitted in stack based addressing
.*: +file format .*rl78.*
diff --git a/gas/testsuite/gas/rl78/pr19159.d b/gas/testsuite/gas/rl78/pr19159.d
new file mode 100644
index 0000000..f9bfd24
--- /dev/null
+++ b/gas/testsuite/gas/rl78/pr19159.d
@@ -0,0 +1,15 @@
+#objdump: -d --prefix-addresses --show-raw-insn
+#name: PR19159: RL78: zero offset omitted in DE based addressing
+
+.*: +file format .*rl78.*
+
+Disassembly of section .text:
+0x0+000 89[ ]+mov[ ]+a, \[de\]
+0x0+001 8a 00[ ]+mov[ ]+a, \[de\+0\]
+0x0+003 8a 01[ ]+mov[ ]+a, \[de\+1\]
+0x0+005 99[ ]+mov[ ]+\[de], a
+0x0+006 9a 00[ ]+mov[ ]+\[de\+0\], a
+0x0+008 9a 01[ ]+mov[ ]+\[de\+1\], a
+0x0+00a a9[ ]+movw[ ]+ax, \[de\]
+0x0+00b aa 00[ ]+movw[ ]+ax, \[de\+0\]
+0x0+00d aa 01[ ]+movw[ ]+ax, \[de\+1\]
diff --git a/gas/testsuite/gas/rl78/pr19159.s b/gas/testsuite/gas/rl78/pr19159.s
new file mode 100644
index 0000000..b4be196
--- /dev/null
+++ b/gas/testsuite/gas/rl78/pr19159.s
@@ -0,0 +1,13 @@
+ .text
+
+ mov a, [de]
+ mov a, [de + 0]
+ mov a, [de + 1]
+ mov [de], a
+ mov [de + 0], a
+ mov [de + 1], a
+ movw ax, [de]
+ movw ax, [de + 0]
+ movw ax, [de + 1]
+
+ .end
diff --git a/gas/testsuite/gas/rl78/rl78.exp b/gas/testsuite/gas/rl78/rl78.exp
index 2ec0209..e3d2c40 100644
--- a/gas/testsuite/gas/rl78/rl78.exp
+++ b/gas/testsuite/gas/rl78/rl78.exp
@@ -21,4 +21,5 @@
if [expr [istarget "rl78-*-*"]] then {
run_dump_test "pr19157"
run_dump_test "pr19158"
+ run_dump_test "pr19159"
}