[llvm-commits] [llvm] r114012 - /llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
Jim Grosbach
grosbach at apple.com
Wed Sep 15 12:45:02 PDT 2010
Author: grosbach
Date: Wed Sep 15 14:44:57 2010
New Revision: 114012
URL: http://llvm.org/viewvc/llvm-project?rev=114012&view=rev
Log:
Refactor uses of getRegisterNumbering() to not need the isSPVFP argument. Check
if the register is a member of the SPR register class directly instead.
Modified:
llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp?rev=114012&r1=114011&r2=114012&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp Wed Sep 15 14:44:57 2010
@@ -1356,8 +1356,8 @@
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 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 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 {
More information about the llvm-commits
mailing list