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

Unified Diff: src/IceTargetLoweringX8632.cpp

Issue 341683002: Add ss/sd suffix to InstX8632Store and legalize FP constants. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: another label Created 6 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 | « src/IceInstX8632.cpp ('k') | tests_lit/llvm2ice_tests/fp.pnacl.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX8632.cpp
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index 365788341c3271f5766f92a993e66d724e2059cb..0edcab567fbc7595b0dfb5a22ff7a17921e8d53a 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -2174,7 +2174,11 @@ Operand *TargetX8632::legalize(Operand *From, LegalMask Allowed,
// need to go in uninitialized registers.
From = Ctx->getConstantZero(From->getType());
}
- if (!(Allowed & Legal_Imm)) {
+ bool NeedsReg = !(Allowed & Legal_Imm) ||
+ // ConstantFloat and ConstantDouble are actually memory operands.
+ (!(Allowed & Legal_Mem) && (From->getType() == IceType_f32 ||
+ From->getType() == IceType_f64));
+ if (NeedsReg) {
Variable *Reg = makeReg(From->getType(), RegNum);
_mov(Reg, From);
From = Reg;
« no previous file with comments | « src/IceInstX8632.cpp ('k') | tests_lit/llvm2ice_tests/fp.pnacl.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698