-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[X86] Support EGPR (R16-R31) for APX #67702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,6 +158,10 @@ X86RegisterInfo::getLargestLegalSuperClass(const TargetRegisterClass *RC, | |
case X86::GR16RegClassID: | ||
case X86::GR32RegClassID: | ||
case X86::GR64RegClassID: | ||
case X86::GR8_NOREX2RegClassID: | ||
case X86::GR16_NOREX2RegClassID: | ||
case X86::GR32_NOREX2RegClassID: | ||
case X86::GR64_NOREX2RegClassID: | ||
Comment on lines
+161
to
+164
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not clear to me when we need to distinguish There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have comments in X86BaseInfo.h about when we need to distinguish them. Yes, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will you update in this patch or a follow up? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't look through one by one, but here seems have risk since it itrates different instructions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the risk?
The code calls In X86, (If I remember correctly) pseudo instruction |
||
case X86::RFP32RegClassID: | ||
case X86::RFP64RegClassID: | ||
case X86::RFP80RegClassID: | ||
|
@@ -610,6 +614,14 @@ BitVector X86RegisterInfo::getReservedRegs(const MachineFunction &MF) const { | |
} | ||
} | ||
|
||
// Reserve the extended general purpose registers. | ||
if (!Is64Bit || !MF.getSubtarget<X86Subtarget>().hasEGPR()) { | ||
for (unsigned n = 0; n != 16; ++n) { | ||
for (MCRegAliasIterator AI(X86::R16 + n, this, true); AI.isValid(); ++AI) | ||
Reserved.set(*AI); | ||
} | ||
} | ||
|
||
assert(checkAllSuperRegsMarked(Reserved, | ||
{X86::SIL, X86::DIL, X86::BPL, X86::SPL, | ||
X86::SIH, X86::DIH, X86::BPH, X86::SPH})); | ||
|
Uh oh!
There was an error while loading. Please reload this page.