[PATCH] D65550: [AArch64] Do not emit '#' before immediates in inline asm
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 18:07:40 PST 2019
vsk added a comment.
Hi @pirama, I've bisected an internal build break down to this commit. We have code that pushes a `.ascii` directive through inline asm, then expects to find the `.ascii` directive in the resulting assembly (for weird rewriting purposes) [1]. Trouble is, with the '#' missing, the asm writer (MCAsmStreamer?) prefers to emit a `.byte` directive instead of the usual `.ascii`, breaking the weird makefile. Any idea how the old behavior might be recovered? (of course we'll try to just change the makefile, it's just that that can be slow)
[1]
// generator
#define DECLARE(SYM, VAL) \
__asm("DEFINITION__define__" SYM ":\t .ascii \"%0\"" : : "i" ((u_long)(VAL)))
// makefile
assym.s: genassym.o
$(_v)sed -e '/^[[:space:]]*DEFINITION__define__/!d;{N;s/\n//;}' -e 's/^[[:space:]]*DEFINITION__define__\([^:]*\):.*ascii.*\"[\$$]*\([-0-9\#]*\)\".*$$/#define \1 \2/' -e 'p' -e 's/#//2' -e 's/^[[:space:]]*#define \([A-Za-z0-9_]*\)[[:space:]]*[\$$#]*\([-0-9]*\).*$$/#define \1_NUM \2/' genassym.o > $@
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65550/new/
https://reviews.llvm.org/D65550
More information about the llvm-commits
mailing list