mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
[mips] Simplify LowerFormalArguments using getRegClassFor.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193540 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1df3e17fde
commit
5956bed699
@ -2598,22 +2598,9 @@ MipsTargetLowering::LowerFormalArguments(SDValue Chain,
|
|||||||
|
|
||||||
// Arguments stored on registers
|
// Arguments stored on registers
|
||||||
if (IsRegLoc) {
|
if (IsRegLoc) {
|
||||||
EVT RegVT = VA.getLocVT();
|
MVT RegVT = VA.getLocVT();
|
||||||
unsigned ArgReg = VA.getLocReg();
|
unsigned ArgReg = VA.getLocReg();
|
||||||
const TargetRegisterClass *RC;
|
const TargetRegisterClass *RC = getRegClassFor(RegVT);
|
||||||
|
|
||||||
if (RegVT == MVT::i32)
|
|
||||||
RC = Subtarget->inMips16Mode()? &Mips::CPU16RegsRegClass :
|
|
||||||
&Mips::GPR32RegClass;
|
|
||||||
else if (RegVT == MVT::i64)
|
|
||||||
RC = &Mips::GPR64RegClass;
|
|
||||||
else if (RegVT == MVT::f32)
|
|
||||||
RC = &Mips::FGR32RegClass;
|
|
||||||
else if (RegVT == MVT::f64)
|
|
||||||
RC = Subtarget->isFP64bit() ? &Mips::FGR64RegClass :
|
|
||||||
&Mips::AFGR64RegClass;
|
|
||||||
else
|
|
||||||
llvm_unreachable("RegVT not supported by FormalArguments Lowering");
|
|
||||||
|
|
||||||
// Transform the arguments stored on
|
// Transform the arguments stored on
|
||||||
// physical registers into virtual ones
|
// physical registers into virtual ones
|
||||||
|
Loading…
x
Reference in New Issue
Block a user