[PATCH] [ARM64] Re-work parsing of ADD/SUB shifted immediate operands
Tim Northover
t.p.northover at gmail.com
Thu May 8 07:45:58 PDT 2014
Hi Bradley,
Fair enough. The difference is marginal either way on that one. I did spot another nit-pick though:
================
Comment at: lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp:588
@@ +587,3 @@
+ int64_t Addend;
+ if (ARM64AsmParser::classifySymbolRef(ShiftedImm.Val, ELFRefKind,
+ DarwinRefKind, Addend)) {
----------------
I think this might be undefined behaviour if we're actually in the isImm case: accessing a union via a member that wasn't most recently written, or whatever.
If it was me I'd handle isShiftedImm entirely within its if block and reserve the rest of the function for the non-shifted case.
http://reviews.llvm.org/D3665
More information about the llvm-commits
mailing list