[PATCH] [AArch64] Allow negative immediates for ADD/SUB in asm
Renato Golin
renato.golin at linaro.org
Mon Jun 29 11:43:09 PDT 2015
Hi t.p.northover, jmolloy, john.brawn,
Allow assembly code (either in an asm file or inline asm) to have negative
offsets for ADD/SUB, and convert them to their inverse instructions as per
the ARMv8 Instruction Set Overview, section 5.4.1.
I'm not really sure of a few things:
1. If I accept negative numbers in isAddSubImm(), will this break other stuff?
2. The manual doesn't say specifically, but I'm assuming we can't swap ADDS/SUBS.
3. The error message may not be in the best of places, nor the best of texts. I'm open to suggestions.
4. Is this really the best way to modify the MCInst?
5. Adding support for #-4096 and higher powers of two may be trivial. I'll check while this review goes on.
6. Changing the parser like this seems a lot better than both printers (as I had in bugzilla).
Fixes PR20978.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D10810
Files:
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
test/MC/AArch64/addsub-inline-asm.ll
test/MC/AArch64/addsub.s
test/MC/AArch64/basic-a64-diagnostics.s
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10810.28691.patch
Type: text/x-patch
Size: 6339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150629/8ccc11ee/attachment.bin>
More information about the llvm-commits
mailing list