mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 18:31:23 +00:00
ok, the "ia64 has a boatload of registers" joke stopped being funny today ;)
* fix overallocation of integer (stacked) registers: we can't allocate registers for local use if they are required as output registers this fixes 'toast' in the test suite, and all sorts of larger programs like bzip2 etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af4ab1b103
commit
e00e5ded51
@ -254,7 +254,12 @@ def GR : RegisterClass<i64, 64,
|
|||||||
{
|
{
|
||||||
let Methods = [{
|
let Methods = [{
|
||||||
iterator allocation_order_end(MachineFunction &MF) const {
|
iterator allocation_order_end(MachineFunction &MF) const {
|
||||||
return end()-7; // 7 special registers
|
int numReservedRegs=7; // the 7 special registers r0,r1,r2,r12,r13 etc
|
||||||
|
// we also can't allocate registers for use as locals if they're
|
||||||
|
// already required as 'out' registers
|
||||||
|
numReservedRegs+=MF.getInfo<IA64FunctionInfo>()->outRegsUsed;
|
||||||
|
|
||||||
|
return end()-numReservedRegs; // hide registers appropriately
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user