mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-30 07:14:53 +00:00
Refactor uses of getRegisterNumbering() to not need the isSPVFP argument. Check
if the register is a member of the SPR register class directly instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114012 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d8be410d4b
commit
7e2c04fd05
@ -1356,8 +1356,8 @@ void ARMCodeEmitter::emitMiscBranchInstruction(const MachineInstr &MI) {
|
||||
static unsigned encodeVFPRd(const MachineInstr &MI, unsigned OpIdx) {
|
||||
unsigned RegD = MI.getOperand(OpIdx).getReg();
|
||||
unsigned Binary = 0;
|
||||
bool isSPVFP = false;
|
||||
RegD = ARMRegisterInfo::getRegisterNumbering(RegD, &isSPVFP);
|
||||
bool isSPVFP = ARM::SPRRegisterClass->contains(RegD);
|
||||
RegD = ARMRegisterInfo::getRegisterNumbering(RegD);
|
||||
if (!isSPVFP)
|
||||
Binary |= RegD << ARMII::RegRdShift;
|
||||
else {
|
||||
@ -1370,8 +1370,8 @@ static unsigned encodeVFPRd(const MachineInstr &MI, unsigned OpIdx) {
|
||||
static unsigned encodeVFPRn(const MachineInstr &MI, unsigned OpIdx) {
|
||||
unsigned RegN = MI.getOperand(OpIdx).getReg();
|
||||
unsigned Binary = 0;
|
||||
bool isSPVFP = false;
|
||||
RegN = ARMRegisterInfo::getRegisterNumbering(RegN, &isSPVFP);
|
||||
bool isSPVFP = ARM::SPRRegisterClass->contains(RegN);
|
||||
RegN = ARMRegisterInfo::getRegisterNumbering(RegN);
|
||||
if (!isSPVFP)
|
||||
Binary |= RegN << ARMII::RegRnShift;
|
||||
else {
|
||||
@ -1384,8 +1384,8 @@ static unsigned encodeVFPRn(const MachineInstr &MI, unsigned OpIdx) {
|
||||
static unsigned encodeVFPRm(const MachineInstr &MI, unsigned OpIdx) {
|
||||
unsigned RegM = MI.getOperand(OpIdx).getReg();
|
||||
unsigned Binary = 0;
|
||||
bool isSPVFP = false;
|
||||
RegM = ARMRegisterInfo::getRegisterNumbering(RegM, &isSPVFP);
|
||||
bool isSPVFP = ARM::SPRRegisterClass->contains(RegM);
|
||||
RegM = ARMRegisterInfo::getRegisterNumbering(RegM);
|
||||
if (!isSPVFP)
|
||||
Binary |= RegM;
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user