[libcxx-commits] [libc] [lldb] [mlir] [clang-tools-extra] [flang] [clang] [llvm] [compiler-rt] [libcxx] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)
Fangrui Song via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jan 14 00:53:14 PST 2024
================
@@ -1418,6 +1418,14 @@ bool X86TargetInfo::validateAsmConstraint(
case 'O':
Info.setRequiresImmediate(0, 127);
return true;
+ case 'W':
+ switch (*++Name) {
+ default:
+ return false;
+ case 's':
+ Info.setAllowsRegister();
----------------
MaskRay wrote:
`setAllowsRegister` is somewhat confusing but its use is correct here (also used by aarch64/riscv `S`).
`setAllowsMemory` seems to not add extra checks.
https://github.com/llvm/llvm-project/pull/77886
More information about the libcxx-commits
mailing list