[PATCH] D91460: [AsmParser] make .ascii/.asciz/.string support multiple strings
Jian Cai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 21:03:58 PST 2020
jcai19 added a comment.
> In which case I assume `.asciz "foo" "bar"` is equivalent to `.asciz "foobar"` rather than `.asciz "foo\0bar"` (same for `.string`), just like C string concatenation, and hence why both syntaxes exist?
I think GNU assembler would produce the same disassembly with `.asciz "foo" "bar"` and `.asciz "foo", "bar"`.
$ cat test.s
.asciz "foo" "bar"
.asciz "foo", "bar"
$ arm-linux-gnueabihf-gcc test.s -c -o test.o
$ arm-linux-gnueabihf-objdump -dr test.o
gcc.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <.text>:
0: 006f6f66 .word 0x006f6f66
4: 00726162 .word 0x00726162
8: 006f6f66 .word 0x006f6f66
c: 00726162 .word 0x00726162
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91460/new/
https://reviews.llvm.org/D91460
More information about the llvm-commits
mailing list