[PATCH] D68764: [ARM][AsmParser] handles offset expression in parentheses
Jian Cai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 17:04:13 PDT 2019
jcai19 marked 6 inline comments as done.
jcai19 added inline comments.
================
Comment at: llvm/test/MC/ARM/gas-compl.s:17
+.syntax unified
+ ldr r12, [sp, (15+5*5)]
+
----------------
nickdesaulniers wrote:
> Does gas support multiple parens, ie. `((15+5))`? Do we?
Good question! Just verified GAS does, and we do too thanks to getParser().parseExpression(Offset) taking care of parentheses.
$ cat sample.s
.syntax unified
ldr r12, [sp, $(((15+5)*5))]
$ armv7a-cros-linux-gnueabihf-as sample.s -o sample.o; armv7a-cros-linux-gnueabihf-objdump -d sample.o
sample.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <.text>:
0: e59dc064 ldr ip, [sp, #100] ; 0x64
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68764/new/
https://reviews.llvm.org/D68764
More information about the llvm-commits
mailing list