[PATCH] D120887: The [2/2] Fix mangle problem when variable used in inline asm (non-rip for ARR[BaseReg+IndexReg+..])
Xiang Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 14 18:02:13 PDT 2022
xiangzhangllvm added inline comments.
================
Comment at: llvm/lib/MC/MCParser/AsmParser.cpp:6170-6172
+ if (AR.IntelExpRestricted)
+ OS << "${" << OutputIdx++ << ":P}";
+ else
----------------
skan wrote:
> This looks much better than the previous patch.
Here is similar with previous patch.
The only diff is use "if (AR.IntelExpRestricted)" replace of "if (function call)"
The previous patch can also fix the case "[ARR + ecx + eax * 4]".
The purpose I update the patch is let it more fit to fix PIC problem late.
================
Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:439
bool setSymRef(const MCExpr *Val, StringRef ID, StringRef &ErrMsg) {
- if (Sym) {
+ if (Sym/* && !isLabel(Val)*/) {
ErrMsg = "cannot use more than one symbol in memory operand";
----------------
skan wrote:
> accident change?
I mark here to fix PIC problem in win32, l am writing another patch to fix it. Let me update it and remove the unused "getAffected".
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120887/new/
https://reviews.llvm.org/D120887
More information about the llvm-commits
mailing list