Commit b684f2b7 by Mohit Bhakkad Committed by Jim Stichnoth

Adding float/double support in CopyToReg

R=stichnot@chromium.org Review URL: https://codereview.chromium.org/2050473005 . Patch from Mohit Bhakkad <mohit.bhakkad@imgtec.com>.
parent aab7099e
...@@ -1565,8 +1565,11 @@ void TargetDataMIPS32::lowerJumpTables() { ...@@ -1565,8 +1565,11 @@ void TargetDataMIPS32::lowerJumpTables() {
Variable *TargetMIPS32::copyToReg(Operand *Src, RegNumT RegNum) { Variable *TargetMIPS32::copyToReg(Operand *Src, RegNumT RegNum) {
Type Ty = Src->getType(); Type Ty = Src->getType();
Variable *Reg = makeReg(Ty, RegNum); Variable *Reg = makeReg(Ty, RegNum);
if (isVectorType(Ty) || isFloatingType(Ty)) { if (isVectorType(Ty)) {
UnimplementedError(getFlags()); UnimplementedError(getFlags());
} else if (isFloatingType(Ty)) {
(Ty == IceType_f32) ? _mov_s(Reg, llvm::dyn_cast<Variable>(Src))
: _mov_d(Reg, llvm::dyn_cast<Variable>(Src));
} else { } else {
// Mov's Src operand can really only be the flexible second operand type // Mov's Src operand can really only be the flexible second operand type
// or a register. Users should guarantee that. // or a register. Users should guarantee that.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment