[clang] [llvm] [X86] Support reserving EDI and ESI on x86-32 (PR #186123)
Phoebe Wang via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 13 23:05:59 PDT 2026
================
@@ -256,6 +256,18 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo {
HasSizeMismatch = RegSize != 32;
return true;
}
+ if (RegName.contains("di")) {
+ if (getTargetOpts().FeatureMap.lookup("reserve-edi")) {
+ if (RegName == "edi") {
+ HasSizeMismatch = RegSize != 32;
+ } else if (RegName == "di") {
+ HasSizeMismatch = RegSize != 16;
+ } else if (RegName == "dil" || RegName == "dih") {
+ HasSizeMismatch = RegSize != 8;
----------------
phoebewang wrote:
32-bit cannot use `dil` and `dih`.
https://github.com/llvm/llvm-project/pull/186123
More information about the cfe-commits
mailing list