[PATCH] D133914: [InlineAsm][bugfix] Correct function addressing in inline asm

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 05:03:22 PDT 2022


jonpa added a reviewer: uweigand.
jonpa added inline comments.


================
Comment at: llvm/test/CodeGen/X86/inline-asm-p-constraint.ll:14
+; CHECK-NEXT: lea -8(%rsp), %rax
 ; CHECK-NEXT: #NO_APP
   ret ptr %1
----------------
xiangzhangllvm wrote:
> @jonpa I think here you may mis-understand lea, so I updated here.
> And I think the mov (%rdi) should be mov %rdi in constrain of "p" you add before.
> 
> At first I updated the 'p' action to "direct action" (without load: mov %rdi), but it affect systemZ tests which I am not familiar with. So I want to discuss with you about the action of "p" here.
> 
> "p" should be address which equal with "direct mem (without load)".
>  So in DAG build (pls refer the change in SelectionDAGBuilder.cpp) the OpInfo.isIndirect should always be false;
Yes, as far as I understand "p" (address) is not "indirect" - the address is specified at the source level and not used to access memory. It's when you pass an address to a memory operand the "indirect" flag is added.



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133914/new/

https://reviews.llvm.org/D133914



More information about the llvm-commits mailing list