Fix x64 after r24656.
authorbmeurer@chromium.org <bmeurer@chromium.org>
Thu, 16 Oct 2014 11:29:31 +0000 (11:29 +0000)
committerbmeurer@chromium.org <bmeurer@chromium.org>
Thu, 16 Oct 2014 11:29:31 +0000 (11:29 +0000)
TBR=jarin@chromium.org

Review URL: https://codereview.chromium.org/655383003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/compiler/pipeline.cc
src/compiler/simplified-lowering.cc
src/compiler/x64/code-generator-x64.cc

index 707d88757c698435a41aadee3738f6c73ed619d1..2669b18b529b8902764095c4a9273146ea732798 100644 (file)
@@ -319,8 +319,8 @@ Handle<Code> Pipeline::GenerateCode() {
       ValueNumberingReducer vn_reducer(zone());
       SimplifiedOperatorReducer simple_reducer(&jsgraph);
       GraphReducer graph_reducer(&graph);
-      graph_reducer.AddReducer(&simple_reducer);
       graph_reducer.AddReducer(&vn_reducer);
+      graph_reducer.AddReducer(&simple_reducer);
       graph_reducer.ReduceGraph();
 
       VerifyAndPrintGraph(&graph, "Lowered simplified");
@@ -333,11 +333,13 @@ Handle<Code> Pipeline::GenerateCode() {
                                      SourcePosition::Unknown());
       Linkage linkage(info());
       ValueNumberingReducer vn_reducer(zone());
+      SimplifiedOperatorReducer simple_reducer(&jsgraph);
       ChangeLowering lowering(&jsgraph, &linkage);
       MachineOperatorReducer mach_reducer(&jsgraph);
       GraphReducer graph_reducer(&graph);
       // TODO(titzer): Figure out if we should run all reducers at once here.
       graph_reducer.AddReducer(&vn_reducer);
+      graph_reducer.AddReducer(&simple_reducer);
       graph_reducer.AddReducer(&lowering);
       graph_reducer.AddReducer(&mach_reducer);
       graph_reducer.ReduceGraph();
index 7a0f32493239279bb25136f23e1fbd7c76a1c4b3..8db430e09403b11532841ec401dbe4550f0d6545 100644 (file)
@@ -726,7 +726,7 @@ class RepresentationSelector {
       }
       case IrOpcode::kWord32Shr:
         // We output unsigned int32 for shift right because JavaScript.
-        return VisitBinop(node, kRepWord32, kRepWord32 | kTypeUint32);
+        return VisitBinop(node, kMachUint32, kMachUint32);
       case IrOpcode::kWord32And:
       case IrOpcode::kWord32Or:
       case IrOpcode::kWord32Xor:
index 6fa758f27899acb5a0c53f930834ac3ef9270cdd..b4dfc25f23e5cc7a30f6e02459fc5cb9e798a1a4 100644 (file)
@@ -447,10 +447,11 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
       break;
     case kSSEUint32ToFloat64:
       if (instr->InputAt(0)->IsRegister()) {
-        __ cvtqsi2sd(i.OutputDoubleRegister(), i.InputRegister(0));
+        __ movl(kScratchRegister, i.InputRegister(0));
       } else {
-        __ cvtqsi2sd(i.OutputDoubleRegister(), i.InputOperand(0));
+        __ movl(kScratchRegister, i.InputOperand(0));
       }
+      __ cvtqsi2sd(i.OutputDoubleRegister(), kScratchRegister);
       break;
     case kX64Movsxbl:
       __ movsxbl(i.OutputRegister(), i.MemoryOperand());