[PATCH] D121785: The [3/3] Fix mangle problem when variable used in inline asm (Support ARR[BaseReg+IndexReg+..] in PIC model)

Xiang Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 03:10:50 PDT 2022


xiangzhangllvm created this revision.
xiangzhangllvm added reviewers: craig.topper, pengfei, LuoYuanke, skan, efriedma.
Herald added subscribers: arphaman, hiraditya.
Herald added a project: All.
xiangzhangllvm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch is base on D120886 <https://reviews.llvm.org/D120886> and D120887 <https://reviews.llvm.org/D120887>

These 2 patches let Global Value inline asm operand visible in inline asm code string.
But they bring some problems in building inline asm in PIC model. 
(Some problems of building inline asm in PIC model are always existed for a long time.)

This patch support building Global Value inline asm operand (for example: ARR[BaseReg+IndexReg+..] ) in PIC model.


https://reviews.llvm.org/D121785

Files:
  llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
  llvm/lib/Target/X86/X86AsmPrinter.cpp
  llvm/test/CodeGen/X86/ms-inline-asm-variables-x64-1.ll
  llvm/test/CodeGen/X86/ms-inline-asm-variables-x64-2.ll
  llvm/test/CodeGen/X86/ms-inline-asm-variables-x86-1.ll
  llvm/test/CodeGen/X86/ms-inline-asm-variables-x86-2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121785.415750.patch
Type: text/x-patch
Size: 25173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220316/d9be3e2b/attachment-0001.bin>


More information about the llvm-commits mailing list