aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-09-27 11:41:00 +0200
committerJan Beulich <jbeulich@suse.com>2024-09-27 11:41:00 +0200
commit9a788db16aef1d87f61138b65a0763818a234a6c (patch)
treeb0ef9c8bb209c7c1e0b93a35030a6ec8e3b777cf /gas/testsuite
parent784e2ef54b443a4d0b95e97122934ca8eaa4155b (diff)
downloadgdb-9a788db16aef1d87f61138b65a0763818a234a6c.zip
gdb-9a788db16aef1d87f61138b65a0763818a234a6c.tar.gz
gdb-9a788db16aef1d87f61138b65a0763818a234a6c.tar.bz2
RISC-V: odd data padding vs mapping symbols
Odd data padding has a $d label inserted at its beginning. When a $x... label is removed instead, a replacement is inserted after the padding. The same, however, needs to also happen when there's no $x to replace.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/riscv/odd-padding.d17
-rw-r--r--gas/testsuite/gas/riscv/odd-padding.s8
2 files changed, 25 insertions, 0 deletions
diff --git a/gas/testsuite/gas/riscv/odd-padding.d b/gas/testsuite/gas/riscv/odd-padding.d
new file mode 100644
index 0000000..b445a74
--- /dev/null
+++ b/gas/testsuite/gas/riscv/odd-padding.d
@@ -0,0 +1,17 @@
+#as: -mrelax
+#as: -mno-relax
+#objdump: -d
+
+.*:[ ]+file format .*
+
+
+Disassembly of section \.text:
+
+0+000 <byte>:
+[ ]+0:[ ]+00000013[ ]+nop
+[ ]+4:[ ]+00[ ]+\.byte[ ]+0x00
+#...
+[ ]+9:[ ]+00[ ]+\.byte[ ]+0x00
+[ ]+a:[ ]+0001[ ]+\.insn[ ]+2, 0x0*1
+[ ]+c:[ ]+00000013[ ]+nop
+[ ]+10:[ ]+00008067[ ]+ret
diff --git a/gas/testsuite/gas/riscv/odd-padding.s b/gas/testsuite/gas/riscv/odd-padding.s
new file mode 100644
index 0000000..9e434ea
--- /dev/null
+++ b/gas/testsuite/gas/riscv/odd-padding.s
@@ -0,0 +1,8 @@
+ .text
+byte:
+ nop
+ .byte 0
+ nop
+ .p2align 2
+ nop
+ ret