File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,12 @@ class Register {
42
42
// /
43
43
// / FIXME: remove in favor of member.
44
44
static constexpr bool isStackSlot (unsigned Reg) {
45
- return MCRegister::isStackSlot (Reg);
45
+ return MCRegister::FirstStackSlot <= Reg &&
46
+ Reg < MCRegister::VirtualRegFlag;
46
47
}
47
48
48
49
// / Return true if this is a stack slot.
49
- constexpr bool isStack () const { return MCRegister:: isStackSlot (Reg); }
50
+ constexpr bool isStack () const { return isStackSlot (Reg); }
50
51
51
52
// / Compute the frame index from a register value representing a stack slot.
52
53
static int stackSlot2Index (Register Reg) {
Original file line number Diff line number Diff line change @@ -54,14 +54,6 @@ class MCRegister {
54
54
static constexpr unsigned FirstStackSlot = 1u << 30 ;
55
55
static constexpr unsigned VirtualRegFlag = 1u << 31 ;
56
56
57
- // / This is the portion of the positive number space that is not a physical
58
- // / register. StackSlot values do not exist in the MC layer, see
59
- // / Register::isStackSlot() for the more information on them.
60
- // /
61
- static constexpr bool isStackSlot (unsigned Reg) {
62
- return FirstStackSlot <= Reg && Reg < VirtualRegFlag;
63
- }
64
-
65
57
// / Return true if the specified register number is in
66
58
// / the physical register namespace.
67
59
static constexpr bool isPhysicalRegister (unsigned Reg) {
You can’t perform that action at this time.
0 commit comments