mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-29 14:40:39 +00:00
add FCPYS and FCPYD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30995 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5059dda6bd
commit
199dd67c50
@ -212,6 +212,11 @@ def fcmpd : InstARM<(ops DFPRegs:$a, DFPRegs:$b),
|
|||||||
"fcmpd $a, $b",
|
"fcmpd $a, $b",
|
||||||
[(armcmp DFPRegs:$a, DFPRegs:$b)]>;
|
[(armcmp DFPRegs:$a, DFPRegs:$b)]>;
|
||||||
|
|
||||||
|
// Floating Point Copy
|
||||||
|
def FCPYS : InstARM<(ops FPRegs:$dst, FPRegs:$src), "fcpys $dst, $src", []>;
|
||||||
|
|
||||||
|
def FCPYD : InstARM<(ops DFPRegs:$dst, DFPRegs:$src), "fcpyd $dst, $src", []>;
|
||||||
|
|
||||||
// Floating Point Conversion
|
// Floating Point Conversion
|
||||||
// We use bitconvert for moving the data between the register classes.
|
// We use bitconvert for moving the data between the register classes.
|
||||||
// The format conversion is done with ARM specific nodes
|
// The format conversion is done with ARM specific nodes
|
||||||
|
@ -47,9 +47,17 @@ void ARMRegisterInfo::copyRegToReg(MachineBasicBlock &MBB,
|
|||||||
MachineBasicBlock::iterator I,
|
MachineBasicBlock::iterator I,
|
||||||
unsigned DestReg, unsigned SrcReg,
|
unsigned DestReg, unsigned SrcReg,
|
||||||
const TargetRegisterClass *RC) const {
|
const TargetRegisterClass *RC) const {
|
||||||
assert (RC == ARM::IntRegsRegisterClass);
|
assert(RC == ARM::IntRegsRegisterClass ||
|
||||||
BuildMI(MBB, I, ARM::MOV, 3, DestReg).addReg(SrcReg).addImm(0)
|
RC == ARM::FPRegsRegisterClass ||
|
||||||
.addImm(ARMShift::LSL);
|
RC == ARM::DFPRegsRegisterClass);
|
||||||
|
|
||||||
|
if (RC == ARM::IntRegsRegisterClass)
|
||||||
|
BuildMI(MBB, I, ARM::MOV, 3, DestReg).addReg(SrcReg).addImm(0)
|
||||||
|
.addImm(ARMShift::LSL);
|
||||||
|
else if (RC == ARM::FPRegsRegisterClass)
|
||||||
|
BuildMI(MBB, I, ARM::FCPYS, 1, DestReg).addReg(SrcReg);
|
||||||
|
else
|
||||||
|
BuildMI(MBB, I, ARM::FCPYD, 1, DestReg).addReg(SrcReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineInstr *ARMRegisterInfo::foldMemoryOperand(MachineInstr* MI,
|
MachineInstr *ARMRegisterInfo::foldMemoryOperand(MachineInstr* MI,
|
||||||
|
Loading…
Reference in New Issue
Block a user