aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-arm/tls-thumb1.d
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-09-02 18:15:30 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-11-01 09:32:13 +0000
commit8cb6e17571f3fb66ccd4fa19f881602542cd06fc (patch)
treee55c7d09de4ee64ed49f0c9b8b345b2f666ce0de /ld/testsuite/ld-arm/tls-thumb1.d
parent1751ca43fdae8d19e13ae55430700a60eb0f30d3 (diff)
downloadfsf-binutils-gdb-8cb6e17571f3fb66ccd4fa19f881602542cd06fc.zip
fsf-binutils-gdb-8cb6e17571f3fb66ccd4fa19f881602542cd06fc.tar.gz
fsf-binutils-gdb-8cb6e17571f3fb66ccd4fa19f881602542cd06fc.tar.bz2
opcodes/arm: use '@' consistently for the comment character
Looking at the ARM disassembler output, every comment seems to start with a ';' character, so I assumed this was the correct character to start an assembler comment. I then spotted a couple of places where there was no ';', but instead, just a '@' character. I thought that this was a case of a missing ';', and proposed a patch to add the missing ';' characters. Turns out I was wrong, '@' is actually the ARM assembler comment character, while ';' is the statement separator. Thus this: nop ;@ comment is two statements, the first is the 'nop' instruction, while the second contains no instructions, just the '@ comment' comment text. This: nop @ comment is a single 'nop' instruction followed by a comment. And finally, this: nop ; comment is two statements, the first contains the 'nop' instruction, while the second contains the instruction 'comment', which obviously isn't actually an instruction at all. Why this matters is that, in the next commit, I would like to add libopcodes syntax styling support for ARM. The question then is how should the disassembler style the three cases above? As '@' is the actual comment start character then clearly the '@' and anything after it can be styled as a comment. But what about ';' in the second example? Style as text? Style as a comment? And the third example is even harder, what about the 'comment' text? Style as an instruction mnemonic? Style as text? Style as a comment? I think the only sensible answer is to move the disassembler to use '@' consistently as its comment character, and remove all the uses of ';'. Then, in the next commit, it's obvious what to do. There's obviously a *lot* of tests that get updated by this commit, the only actual code changes are in opcodes/arm-dis.c.
Diffstat (limited to 'ld/testsuite/ld-arm/tls-thumb1.d')
-rw-r--r--ld/testsuite/ld-arm/tls-thumb1.d36
1 files changed, 18 insertions, 18 deletions
diff --git a/ld/testsuite/ld-arm/tls-thumb1.d b/ld/testsuite/ld-arm/tls-thumb1.d
index 41d5f8c..13fa1c3 100644
--- a/ld/testsuite/ld-arm/tls-thumb1.d
+++ b/ld/testsuite/ld-arm/tls-thumb1.d
@@ -6,17 +6,17 @@ start address 0x.*
Disassembly of section .plt:
0000813c <.plt>:
-.*: e52de004 push {lr} ; .*
-.*: e59fe004 ldr lr, \[pc, #4\] ; .*
+.*: e52de004 push {lr} @ .*
+.*: e59fe004 ldr lr, \[pc, #4\] @ .*
.*: e08fe00e add lr, pc, lr
.*: e5bef008 ldr pc, \[lr, #8\]!
.*: 000080f0 .word 0x000080f0
.*: e08e0000 add r0, lr, r0
.*: e5901004 ldr r1, \[r0, #4\]
.*: e12fff11 bx r1
-.*: e52d2004 push {r2} ; .*
-.*: e59f200c ldr r2, \[pc, #12\] ; .*
-.*: e59f100c ldr r1, \[pc, #12\] ; .*
+.*: e52d2004 push {r2} @ .*
+.*: e59f200c ldr r2, \[pc, #12\] @ .*
+.*: e59f100c ldr r1, \[pc, #12\] @ .*
.*: e79f2002 ldr r2, \[pc, r2\]
.*: e081100f add r1, r1, pc
.*: e12fff12 bx r2
@@ -26,49 +26,49 @@ Disassembly of section .plt:
Disassembly of section .text:
00008180 <text>:
-.*: e59f0004 ldr r0, \[pc, #4\] ; .*
+.*: e59f0004 ldr r0, \[pc, #4\] @ .*
.*: ebfffff1 bl .* <\.plt\+0x14>
-.*: e1a00000 nop ; .*
+.*: e1a00000 nop @ .*
.*: 000080c0 .word 0x000080c0
-.*: 4801 ldr r0, \[pc, #4\] ; .*
+.*: 4801 ldr r0, \[pc, #4\] @ .*
.*: f000 f805 bl .* <__unnamed_veneer>
-.*: 46c0 nop ; .*
+.*: 46c0 nop @ .*
.*: 000080b1 .word 0x000080b1
.*: 00000000 .word 0x00000000
000081a0 <__unnamed_veneer>:
.*: 4778 bx pc
.*: e7fd b.n .+ <.+>
-.*: e59f1000 ldr r1, \[pc\] ; .*
+.*: e59f1000 ldr r1, \[pc\] @ .*
.*: e081f00f add pc, r1, pc
.*: ffffffa0 .word 0xffffffa0
Disassembly of section .foo:
04001000 <foo>:
-.*: e59f0004 ldr r0, \[pc, #4\] ; .*
+.*: e59f0004 ldr r0, \[pc, #4\] @ .*
.*: eb000009 bl 4001030 .*
-.*: e1a00000 nop ; .*
+.*: e1a00000 nop @ .*
.*: fc00f240 .word 0xfc00f240
-.*: e59f0004 ldr r0, \[pc, #4\] ; .*
+.*: e59f0004 ldr r0, \[pc, #4\] @ .*
.*: eb000005 bl 4001030 .*
-.*: e1a00000 nop ; .*
+.*: e1a00000 nop @ .*
.*: fc00f238 .word 0xfc00f238
-.*: 4801 ldr r0, \[pc, #4\] ; .*
+.*: 4801 ldr r0, \[pc, #4\] @ .*
.*: f000 f80b bl 400103c .*
-.*: 46c0 nop ; .*
+.*: 46c0 nop @ .*
.*: fc00f221 .word 0xfc00f221
.*: 00000000 .word 0x00000000
04001030 <__unnamed_veneer>:
-.*: e59f1000 ldr r1, \[pc\] ; .*
+.*: e59f1000 ldr r1, \[pc\] @ .*
.*: e08ff001 add pc, pc, r1
.*: fc007114 .word 0xfc007114
0400103c <__unnamed_veneer>:
.*: 4778 bx pc
.*: e7fd b.n .+ <.+>
-.*: e59f1000 ldr r1, \[pc\] ; .*
+.*: e59f1000 ldr r1, \[pc\] @ .*
.*: e081f00f add pc, r1, pc
.*: fc007104 .word 0xfc007104
.*: 00000000 .word 0x00000000