File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ class TargetRegisterInfo : public MCRegisterInfo {
277277
278278 // / Return the size in bytes of the stack slot allocated to hold a spilled
279279 // / copy of a register from class RC.
280- unsigned getSpillSize (const TargetRegisterClass &RC) const {
280+ virtual unsigned getSpillSize (const TargetRegisterClass &RC) const {
281281 return getRegClassInfo (RC).SpillSize / 8 ;
282282 }
283283
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ Z80RegisterInfo::Z80RegisterInfo(const Triple &TT)
3636 StackPtr = Is24Bit ? Z80::SPL : Z80::SPS;
3737}
3838
39+ unsigned Z80RegisterInfo::getSpillSize (const TargetRegisterClass &RC) const {
40+ unsigned SpillSize = TargetRegisterInfo::getSpillSize (RC);
41+ if (Is24Bit && SpillSize == 2 )
42+ SpillSize = 3 ;
43+ return SpillSize;
44+ }
45+
3946const TargetRegisterClass *
4047Z80RegisterInfo::getPointerRegClass (const MachineFunction &MF,
4148 unsigned Kind) const {
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ class Z80RegisterInfo final : public Z80GenRegisterInfo {
3434public:
3535 Z80RegisterInfo (const Triple &TT);
3636
37+ unsigned getSpillSize (const TargetRegisterClass &RC) const override ;
38+
3739 // / Code Generation virtual methods...
3840 // /
3941 bool trackLivenessAfterRegAlloc (const MachineFunction &MF) const override {
You can’t perform that action at this time.
0 commit comments