From 785f7a21c0c0589b9b7c2f704fff7dc4e447a72a Mon Sep 17 00:00:00 2001 From: "bmeurer@chromium.org" Date: Thu, 16 Oct 2014 11:29:31 +0000 Subject: [PATCH] Fix x64 after r24656. 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 | 4 +++- src/compiler/simplified-lowering.cc | 2 +- src/compiler/x64/code-generator-x64.cc | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc index 707d887..2669b18 100644 --- a/src/compiler/pipeline.cc +++ b/src/compiler/pipeline.cc @@ -319,8 +319,8 @@ Handle 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 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(); diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc index 7a0f324..8db430e 100644 --- a/src/compiler/simplified-lowering.cc +++ b/src/compiler/simplified-lowering.cc @@ -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: diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc index 6fa758f..b4dfc25 100644 --- a/src/compiler/x64/code-generator-x64.cc +++ b/src/compiler/x64/code-generator-x64.cc @@ -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()); -- 2.7.4