[PATCH] D121785: The [3/3] Fix mangle problem when variable used in inline asm (Support ARR[BaseReg+IndexReg+..] in PIC model)
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 20:59:54 PDT 2022
skan added inline comments.
================
Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:840-853
+ // The InineAsm can also be parsed from emitInlineAsm (not from FE)
+ // which may generate "Sym - BaseSym" for pic-base-offset addressing
+ // model (e.g. i386-darwin).
+ // Here we remove "- BaseSym" in inlineasm if it exists.
+ // TODO(RefineMe): Here is an architecture defect for both FE parser
+ // and BE emitInlineAsm share the same way to parse the inline asm.
+ // So the 2 symbol syntax checking may not be always right.
----------------
Split this workaround to another patch and add a negative test for StubPIC . We'd better to remind the user that something goes wrong here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121785/new/
https://reviews.llvm.org/D121785
More information about the llvm-commits
mailing list