[PATCH] D122220: [InlineAsm] Add support for address operands ("p").

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 02:57:25 PDT 2022


jonpa marked an inline comment as done.
jonpa added inline comments.


================
Comment at: clang/lib/Basic/Targets/X86.cpp:1494
+  case 'p': // Keep 'p' constraint (address).
+    return std::string("p");
   case 't': // top of floating point stack.
----------------
xiangzhangllvm wrote:
> Did you check the difference with the previous constraint "im" at llvm end.
> Looks the C_Address is mostly same with C_Memory, but no relation with C_Immediate.
No I have not: there are no tests failing due to this change, and what's more is that the previous handling of "p" was actually incorrect (as showed earlier with example), with wrong code resulting.

I would also hope that the address handling in the X86 backend can handle an immediate if it is accepted as an address...




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

https://reviews.llvm.org/D122220



More information about the llvm-commits mailing list