Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: src/IceTargetLoweringMIPS32.cpp

Issue 2050473005: Adding float/double support in CopyToReg (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero@master
Patch Set: Changing the wrong condition Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringMIPS32.cpp
diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
index 70ddef531f88350f82bf5fc12e8d6b01cdca4ba9..2ac65c899dcf65b0748613d7106440393901947c 100644
--- a/src/IceTargetLoweringMIPS32.cpp
+++ b/src/IceTargetLoweringMIPS32.cpp
@@ -1565,8 +1565,11 @@ void TargetDataMIPS32::lowerJumpTables() {
Variable *TargetMIPS32::copyToReg(Operand *Src, RegNumT RegNum) {
Type Ty = Src->getType();
Variable *Reg = makeReg(Ty, RegNum);
- if (isVectorType(Ty) || isFloatingType(Ty)) {
+ if (isVectorType(Ty)) {
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 {
// Mov's Src operand can really only be the flexible second operand type
// or a register. Users should guarantee that.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698