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

Unified Diff: src/compiler/ia32/code-generator-ia32.cc

Issue 431473004: TF: Add ConvertFloat64ToUint32 and ConvertUint32ToFloat64 machine operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/ia32/instruction-codes-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ia32/code-generator-ia32.cc
diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc
index 38f7d4b0c100f51c1e464786cb57f35df22d18a6..37ad39dd4eb79fb7be5d0b93c25d2aef58f60b37 100644
--- a/src/compiler/ia32/code-generator-ia32.cc
+++ b/src/compiler/ia32/code-generator-ia32.cc
@@ -315,9 +315,22 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
case kSSEFloat64ToInt32:
__ cvttsd2si(i.OutputRegister(), i.InputOperand(0));
break;
+ case kSSEFloat64ToUint32: {
+ XMMRegister scratch = xmm0;
+ __ Move(scratch, -2147483648.0);
+ // TODO(turbofan): IA32 SSE subsd() should take an operand.
+ __ addsd(scratch, i.InputDoubleRegister(0));
+ __ cvttsd2si(i.OutputRegister(), scratch);
+ __ add(i.OutputRegister(), Immediate(0x80000000));
+ break;
+ }
case kSSEInt32ToFloat64:
__ cvtsi2sd(i.OutputDoubleRegister(), i.InputOperand(0));
break;
+ case kSSEUint32ToFloat64:
+ // TODO(turbofan): IA32 SSE LoadUint32() should take an operand.
+ __ LoadUint32(i.OutputDoubleRegister(), i.InputRegister(0));
+ break;
case kSSELoad:
__ movsd(i.OutputDoubleRegister(), i.MemoryOperand());
break;
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/ia32/instruction-codes-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698