[PATCH] D133914: [InlineAsm][bugfix] Correct function addressing in inline asm
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 16 08:48:13 PDT 2022
pengfei added a subscriber: nickdesaulniers.
pengfei added a comment.
+ @nickdesaulniers who once worked for branch issue of inline asm.
================
Comment at: clang/test/CodeGen/ms-inline-asm-functions.c:25
__asm call kimport;
- // CHECK: calll *({{.*}})
+ // CHECK: calll __imp__kimport
----------------
Why is it affected? Is missing a `*` before the label?
================
Comment at: clang/test/CodeGen/ms-inline-asm-functions.c:35
// CHECK-LABEL: _bar:
__asm jmp k;
// CHECK: jmp _k
----------------
> Due to currently inline asm didn't support jmp the outsider lable, this patch
> mainly focus on fix the function call addressing bugs in inline asm.
This seems a counter example.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8761
+ SmallVector<StringRef> AsmStrs;
+ IA->collectAsmStrs(AsmStrs);
+
----------------
No need to define function that only called once.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8811
+ // Some targets may see function as direct address not indirect mem.
+ if (IsFunc && TLI.isInlineAsmTargetBranch(AsmStrs, ArgNo)) {
+ OpInfo.isIndirect = false;
----------------
Can we just pass the string and handle it in the function?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133914/new/
https://reviews.llvm.org/D133914
More information about the llvm-commits
mailing list