From: titzer@chromium.org Date: Wed, 1 Oct 2014 10:39:11 +0000 (+0000) Subject: Rename Int32{UMod,UDiv} to Uint32{Div,Mod} and Int64{UMod,UDiv} to Uint64{Div,Mod}. X-Git-Tag: upstream/4.7.83~6589 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1d79db81bef3de2bd76d8dd5a926f72dd1e89e1;p=platform%2Fupstream%2Fv8.git Rename Int32{UMod,UDiv} to Uint32{Div,Mod} and Int64{UMod,UDiv} to Uint64{Div,Mod}. R=bmeurer@chromium.org, mstarzinger@chromium.org BUG= Review URL: https://codereview.chromium.org/620773003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/compiler/arm/instruction-selector-arm.cc b/src/compiler/arm/instruction-selector-arm.cc index a3ba767..e83d1e5 100644 --- a/src/compiler/arm/instruction-selector-arm.cc +++ b/src/compiler/arm/instruction-selector-arm.cc @@ -648,7 +648,7 @@ void InstructionSelector::VisitInt32Div(Node* node) { } -void InstructionSelector::VisitInt32UDiv(Node* node) { +void InstructionSelector::VisitUint32Div(Node* node) { VisitDiv(this, node, kArmUdiv, kArmVcvtF64U32, kArmVcvtU32F64); } @@ -680,7 +680,7 @@ void InstructionSelector::VisitInt32Mod(Node* node) { } -void InstructionSelector::VisitInt32UMod(Node* node) { +void InstructionSelector::VisitUint32Mod(Node* node) { VisitMod(this, node, kArmUdiv, kArmVcvtF64U32, kArmVcvtU32F64); } diff --git a/src/compiler/arm64/instruction-selector-arm64.cc b/src/compiler/arm64/instruction-selector-arm64.cc index 8d7eee5..589d469 100644 --- a/src/compiler/arm64/instruction-selector-arm64.cc +++ b/src/compiler/arm64/instruction-selector-arm64.cc @@ -585,12 +585,12 @@ void InstructionSelector::VisitInt64Div(Node* node) { } -void InstructionSelector::VisitInt32UDiv(Node* node) { +void InstructionSelector::VisitUint32Div(Node* node) { VisitRRR(this, kArm64Udiv32, node); } -void InstructionSelector::VisitInt64UDiv(Node* node) { +void InstructionSelector::VisitUint64Div(Node* node) { VisitRRR(this, kArm64Udiv, node); } @@ -605,12 +605,12 @@ void InstructionSelector::VisitInt64Mod(Node* node) { } -void InstructionSelector::VisitInt32UMod(Node* node) { +void InstructionSelector::VisitUint32Mod(Node* node) { VisitRRR(this, kArm64Umod32, node); } -void InstructionSelector::VisitInt64UMod(Node* node) { +void InstructionSelector::VisitUint64Mod(Node* node) { VisitRRR(this, kArm64Umod, node); } diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc index b252e71..35d674d 100644 --- a/src/compiler/ia32/instruction-selector-ia32.cc +++ b/src/compiler/ia32/instruction-selector-ia32.cc @@ -438,7 +438,7 @@ void InstructionSelector::VisitInt32Div(Node* node) { } -void InstructionSelector::VisitInt32UDiv(Node* node) { +void InstructionSelector::VisitUint32Div(Node* node) { VisitDiv(this, node, kIA32Udiv); } @@ -459,7 +459,7 @@ void InstructionSelector::VisitInt32Mod(Node* node) { } -void InstructionSelector::VisitInt32UMod(Node* node) { +void InstructionSelector::VisitUint32Mod(Node* node) { VisitMod(this, node, kIA32Udiv); } diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc index d3934b3..d0be3fe 100644 --- a/src/compiler/instruction-selector.cc +++ b/src/compiler/instruction-selector.cc @@ -540,20 +540,20 @@ void InstructionSelector::VisitNode(Node* node) { return VisitInt32Mul(node); case IrOpcode::kInt32Div: return VisitInt32Div(node); - case IrOpcode::kInt32UDiv: - return VisitInt32UDiv(node); case IrOpcode::kInt32Mod: return VisitInt32Mod(node); - case IrOpcode::kInt32UMod: - return VisitInt32UMod(node); case IrOpcode::kInt32LessThan: return VisitInt32LessThan(node); case IrOpcode::kInt32LessThanOrEqual: return VisitInt32LessThanOrEqual(node); + case IrOpcode::kUint32Div: + return VisitUint32Div(node); case IrOpcode::kUint32LessThan: return VisitUint32LessThan(node); case IrOpcode::kUint32LessThanOrEqual: return VisitUint32LessThanOrEqual(node); + case IrOpcode::kUint32Mod: + return VisitUint32Mod(node); case IrOpcode::kInt64Add: return VisitInt64Add(node); case IrOpcode::kInt64Sub: @@ -562,18 +562,18 @@ void InstructionSelector::VisitNode(Node* node) { return VisitInt64Mul(node); case IrOpcode::kInt64Div: return VisitInt64Div(node); - case IrOpcode::kInt64UDiv: - return VisitInt64UDiv(node); case IrOpcode::kInt64Mod: return VisitInt64Mod(node); - case IrOpcode::kInt64UMod: - return VisitInt64UMod(node); case IrOpcode::kInt64LessThan: return VisitInt64LessThan(node); case IrOpcode::kInt64LessThanOrEqual: return VisitInt64LessThanOrEqual(node); + case IrOpcode::kUint64Div: + return VisitUint64Div(node); case IrOpcode::kUint64LessThan: return VisitUint64LessThan(node); + case IrOpcode::kUint64Mod: + return VisitUint64Mod(node); case IrOpcode::kChangeFloat32ToFloat64: return MarkAsDouble(node), VisitChangeFloat32ToFloat64(node); case IrOpcode::kChangeInt32ToFloat64: @@ -765,13 +765,13 @@ void InstructionSelector::VisitInt64Mul(Node* node) { UNIMPLEMENTED(); } void InstructionSelector::VisitInt64Div(Node* node) { UNIMPLEMENTED(); } -void InstructionSelector::VisitInt64UDiv(Node* node) { UNIMPLEMENTED(); } +void InstructionSelector::VisitUint64Div(Node* node) { UNIMPLEMENTED(); } void InstructionSelector::VisitInt64Mod(Node* node) { UNIMPLEMENTED(); } -void InstructionSelector::VisitInt64UMod(Node* node) { UNIMPLEMENTED(); } +void InstructionSelector::VisitUint64Mod(Node* node) { UNIMPLEMENTED(); } void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { diff --git a/src/compiler/machine-operator-reducer.cc b/src/compiler/machine-operator-reducer.cc index d6b3ff2..5a5c890 100644 --- a/src/compiler/machine-operator-reducer.cc +++ b/src/compiler/machine-operator-reducer.cc @@ -246,7 +246,7 @@ Reduction MachineOperatorReducer::Reduce(Node* node) { } break; } - case IrOpcode::kInt32UDiv: { + case IrOpcode::kUint32Div: { Uint32BinopMatcher m(node); if (m.right().Is(1)) return Replace(m.left().node()); // x / 1 => x // TODO(turbofan): if (m.left().Is(0)) @@ -275,7 +275,7 @@ Reduction MachineOperatorReducer::Reduce(Node* node) { } break; } - case IrOpcode::kInt32UMod: { + case IrOpcode::kUint32Mod: { Uint32BinopMatcher m(node); if (m.right().Is(1)) return ReplaceInt32(0); // x % 1 => 0 // TODO(turbofan): if (m.left().Is(0)) diff --git a/src/compiler/machine-operator.cc b/src/compiler/machine-operator.cc index 01e525c..35e0e54 100644 --- a/src/compiler/machine-operator.cc +++ b/src/compiler/machine-operator.cc @@ -84,23 +84,23 @@ struct StaticParameterTraits { V(Int32SubWithOverflow, Operator::kNoProperties, 2, 2) \ V(Int32Mul, Operator::kAssociative | Operator::kCommutative, 2, 1) \ V(Int32Div, Operator::kNoProperties, 2, 1) \ - V(Int32UDiv, Operator::kNoProperties, 2, 1) \ V(Int32Mod, Operator::kNoProperties, 2, 1) \ - V(Int32UMod, Operator::kNoProperties, 2, 1) \ V(Int32LessThan, Operator::kNoProperties, 2, 1) \ V(Int32LessThanOrEqual, Operator::kNoProperties, 2, 1) \ + V(Uint32Div, Operator::kNoProperties, 2, 1) \ V(Uint32LessThan, Operator::kNoProperties, 2, 1) \ V(Uint32LessThanOrEqual, Operator::kNoProperties, 2, 1) \ + V(Uint32Mod, Operator::kNoProperties, 2, 1) \ V(Int64Add, Operator::kAssociative | Operator::kCommutative, 2, 1) \ V(Int64Sub, Operator::kNoProperties, 2, 1) \ V(Int64Mul, Operator::kAssociative | Operator::kCommutative, 2, 1) \ V(Int64Div, Operator::kNoProperties, 2, 1) \ - V(Int64UDiv, Operator::kNoProperties, 2, 1) \ V(Int64Mod, Operator::kNoProperties, 2, 1) \ - V(Int64UMod, Operator::kNoProperties, 2, 1) \ V(Int64LessThan, Operator::kNoProperties, 2, 1) \ V(Int64LessThanOrEqual, Operator::kNoProperties, 2, 1) \ + V(Uint64Div, Operator::kNoProperties, 2, 1) \ V(Uint64LessThan, Operator::kNoProperties, 2, 1) \ + V(Uint64Mod, Operator::kNoProperties, 2, 1) \ V(ChangeFloat32ToFloat64, Operator::kNoProperties, 1, 1) \ V(ChangeFloat64ToInt32, Operator::kNoProperties, 1, 1) \ V(ChangeFloat64ToUint32, Operator::kNoProperties, 1, 1) \ diff --git a/src/compiler/machine-operator.h b/src/compiler/machine-operator.h index c6d090f..622f863 100644 --- a/src/compiler/machine-operator.h +++ b/src/compiler/machine-operator.h @@ -87,24 +87,24 @@ class MachineOperatorBuilder FINAL { const Operator* Int32SubWithOverflow(); const Operator* Int32Mul(); const Operator* Int32Div(); - const Operator* Int32UDiv(); const Operator* Int32Mod(); - const Operator* Int32UMod(); const Operator* Int32LessThan(); const Operator* Int32LessThanOrEqual(); + const Operator* Uint32Div(); const Operator* Uint32LessThan(); const Operator* Uint32LessThanOrEqual(); + const Operator* Uint32Mod(); const Operator* Int64Add(); const Operator* Int64Sub(); const Operator* Int64Mul(); const Operator* Int64Div(); - const Operator* Int64UDiv(); const Operator* Int64Mod(); - const Operator* Int64UMod(); const Operator* Int64LessThan(); const Operator* Int64LessThanOrEqual(); + const Operator* Uint64Div(); const Operator* Uint64LessThan(); + const Operator* Uint64Mod(); // These operators change the representation of numbers while preserving the // value of the number. Narrowing operators assume the input is representable @@ -164,12 +164,12 @@ class MachineOperatorBuilder FINAL { V(Int, Sub) \ V(Int, Mul) \ V(Int, Div) \ - V(Int, UDiv) \ V(Int, Mod) \ - V(Int, UMod) \ V(Int, LessThan) \ V(Int, LessThanOrEqual) \ - V(Uint, LessThan) + V(Uint, Div) \ + V(Uint, LessThan) \ + V(Uint, Mod) #define PSEUDO_OP(Prefix, Suffix) \ const Operator* Prefix##Suffix() { \ return Is32() ? Prefix##32##Suffix() : Prefix##64##Suffix(); \ diff --git a/src/compiler/opcodes.h b/src/compiler/opcodes.h index 443ebae..2d9819c 100644 --- a/src/compiler/opcodes.h +++ b/src/compiler/opcodes.h @@ -187,23 +187,23 @@ V(Int32SubWithOverflow) \ V(Int32Mul) \ V(Int32Div) \ - V(Int32UDiv) \ V(Int32Mod) \ - V(Int32UMod) \ V(Int32LessThan) \ V(Int32LessThanOrEqual) \ + V(Uint32Div) \ V(Uint32LessThan) \ V(Uint32LessThanOrEqual) \ + V(Uint32Mod) \ V(Int64Add) \ V(Int64Sub) \ V(Int64Mul) \ V(Int64Div) \ - V(Int64UDiv) \ V(Int64Mod) \ - V(Int64UMod) \ V(Int64LessThan) \ V(Int64LessThanOrEqual) \ + V(Uint64Div) \ V(Uint64LessThan) \ + V(Uint64Mod) \ V(ChangeFloat32ToFloat64) \ V(ChangeFloat64ToInt32) \ V(ChangeFloat64ToUint32) \ diff --git a/src/compiler/raw-machine-assembler.h b/src/compiler/raw-machine-assembler.h index 846ff1c..fdda619 100644 --- a/src/compiler/raw-machine-assembler.h +++ b/src/compiler/raw-machine-assembler.h @@ -228,27 +228,27 @@ class RawMachineAssembler : public GraphBuilder { Node* Int32Div(Node* a, Node* b) { return NewNode(machine()->Int32Div(), a, b); } - Node* Int32UDiv(Node* a, Node* b) { - return NewNode(machine()->Int32UDiv(), a, b); - } Node* Int32Mod(Node* a, Node* b) { return NewNode(machine()->Int32Mod(), a, b); } - Node* Int32UMod(Node* a, Node* b) { - return NewNode(machine()->Int32UMod(), a, b); - } Node* Int32LessThan(Node* a, Node* b) { return NewNode(machine()->Int32LessThan(), a, b); } Node* Int32LessThanOrEqual(Node* a, Node* b) { return NewNode(machine()->Int32LessThanOrEqual(), a, b); } + Node* Uint32Div(Node* a, Node* b) { + return NewNode(machine()->Uint32Div(), a, b); + } Node* Uint32LessThan(Node* a, Node* b) { return NewNode(machine()->Uint32LessThan(), a, b); } Node* Uint32LessThanOrEqual(Node* a, Node* b) { return NewNode(machine()->Uint32LessThanOrEqual(), a, b); } + Node* Uint32Mod(Node* a, Node* b) { + return NewNode(machine()->Uint32Mod(), a, b); + } Node* Int32GreaterThan(Node* a, Node* b) { return Int32LessThan(b, a); } Node* Int32GreaterThanOrEqual(Node* a, Node* b) { return Int32LessThanOrEqual(b, a); @@ -267,15 +267,9 @@ class RawMachineAssembler : public GraphBuilder { Node* Int64Div(Node* a, Node* b) { return NewNode(machine()->Int64Div(), a, b); } - Node* Int64UDiv(Node* a, Node* b) { - return NewNode(machine()->Int64UDiv(), a, b); - } Node* Int64Mod(Node* a, Node* b) { return NewNode(machine()->Int64Mod(), a, b); } - Node* Int64UMod(Node* a, Node* b) { - return NewNode(machine()->Int64UMod(), a, b); - } Node* Int64Neg(Node* a) { return Int64Sub(Int64Constant(0), a); } Node* Int64LessThan(Node* a, Node* b) { return NewNode(machine()->Int64LessThan(), a, b); @@ -287,6 +281,12 @@ class RawMachineAssembler : public GraphBuilder { Node* Int64GreaterThanOrEqual(Node* a, Node* b) { return Int64LessThanOrEqual(b, a); } + Node* Uint64Div(Node* a, Node* b) { + return NewNode(machine()->Uint64Div(), a, b); + } + Node* Uint64Mod(Node* a, Node* b) { + return NewNode(machine()->Uint64Mod(), a, b); + } // TODO(turbofan): What is this used for? Node* ConvertIntPtrToInt32(Node* a) { diff --git a/src/compiler/representation-change.h b/src/compiler/representation-change.h index 1c1f993..f7b2ba6 100644 --- a/src/compiler/representation-change.h +++ b/src/compiler/representation-change.h @@ -330,9 +330,9 @@ class RepresentationChanger { case IrOpcode::kNumberMultiply: return machine()->Int32Mul(); case IrOpcode::kNumberDivide: - return machine()->Int32UDiv(); + return machine()->Uint32Div(); case IrOpcode::kNumberModulus: - return machine()->Int32UMod(); + return machine()->Uint32Mod(); case IrOpcode::kNumberEqual: return machine()->Word32Equal(); case IrOpcode::kNumberLessThan: diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc index f388fb3..c470989 100644 --- a/src/compiler/simplified-lowering.cc +++ b/src/compiler/simplified-lowering.cc @@ -652,8 +652,8 @@ class RepresentationSelector { case IrOpcode::kInt32Div: case IrOpcode::kInt32Mod: return VisitInt32Binop(node); - case IrOpcode::kInt32UDiv: - case IrOpcode::kInt32UMod: + case IrOpcode::kUint32Div: + case IrOpcode::kUint32Mod: return VisitUint32Binop(node); case IrOpcode::kInt32LessThan: case IrOpcode::kInt32LessThanOrEqual: @@ -676,8 +676,8 @@ class RepresentationSelector { case IrOpcode::kUint64LessThan: return VisitUint64Cmp(node); - case IrOpcode::kInt64UDiv: - case IrOpcode::kInt64UMod: + case IrOpcode::kUint64Div: + case IrOpcode::kUint64Mod: return VisitUint64Binop(node); case IrOpcode::kWord64And: diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc index 322955e..9215cbe 100644 --- a/src/compiler/x64/instruction-selector-x64.cc +++ b/src/compiler/x64/instruction-selector-x64.cc @@ -545,12 +545,12 @@ void InstructionSelector::VisitInt64Div(Node* node) { } -void InstructionSelector::VisitInt32UDiv(Node* node) { +void InstructionSelector::VisitUint32Div(Node* node) { VisitDiv(this, node, kX64Udiv32); } -void InstructionSelector::VisitInt64UDiv(Node* node) { +void InstructionSelector::VisitUint64Div(Node* node) { VisitDiv(this, node, kX64Udiv); } @@ -575,12 +575,12 @@ void InstructionSelector::VisitInt64Mod(Node* node) { } -void InstructionSelector::VisitInt32UMod(Node* node) { +void InstructionSelector::VisitUint32Mod(Node* node) { VisitMod(this, node, kX64Udiv32); } -void InstructionSelector::VisitInt64UMod(Node* node) { +void InstructionSelector::VisitUint64Mod(Node* node) { VisitMod(this, node, kX64Udiv); } diff --git a/test/cctest/compiler/test-machine-operator-reducer.cc b/test/cctest/compiler/test-machine-operator-reducer.cc index d3b4920..5e57305 100644 --- a/test/cctest/compiler/test-machine-operator-reducer.cc +++ b/test/cctest/compiler/test-machine-operator-reducer.cc @@ -477,9 +477,9 @@ TEST(ReduceInt32Div) { } -TEST(ReduceInt32UDiv) { +TEST(ReduceUint32Div) { ReducerTester R; - R.binop = R.machine.Int32UDiv(); + R.binop = R.machine.Uint32Div(); FOR_UINT32_INPUTS(pl) { FOR_UINT32_INPUTS(pr) { @@ -530,9 +530,9 @@ TEST(ReduceInt32Mod) { } -TEST(ReduceInt32UMod) { +TEST(ReduceUint32Mod) { ReducerTester R; - R.binop = R.machine.Int32UMod(); + R.binop = R.machine.Uint32Mod(); FOR_INT32_INPUTS(pl) { FOR_INT32_INPUTS(pr) { @@ -819,9 +819,9 @@ TEST(ReduceFloat64Mod) { // TODO(titzer): test MachineOperatorReducer for Int64Mul // TODO(titzer): test MachineOperatorReducer for Int64UMul // TODO(titzer): test MachineOperatorReducer for Int64Div -// TODO(titzer): test MachineOperatorReducer for Int64UDiv +// TODO(titzer): test MachineOperatorReducer for Uint64Div // TODO(titzer): test MachineOperatorReducer for Int64Mod -// TODO(titzer): test MachineOperatorReducer for Int64UMod +// TODO(titzer): test MachineOperatorReducer for Uint64Mod // TODO(titzer): test MachineOperatorReducer for Int64Neg // TODO(titzer): test MachineOperatorReducer for ChangeInt32ToFloat64 // TODO(titzer): test MachineOperatorReducer for ChangeFloat64ToInt32 diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc index cdfb7ec..d925448 100644 --- a/test/cctest/compiler/test-run-machops.cc +++ b/test/cctest/compiler/test-run-machops.cc @@ -64,8 +64,8 @@ TEST(CodeGenInt32Binop) { m.machine()->Word32Shr(), m.machine()->Word32Sar(), m.machine()->Word32Equal(), m.machine()->Int32Add(), m.machine()->Int32Sub(), m.machine()->Int32Mul(), - m.machine()->Int32Div(), m.machine()->Int32UDiv(), - m.machine()->Int32Mod(), m.machine()->Int32UMod(), + m.machine()->Int32Div(), m.machine()->Uint32Div(), + m.machine()->Int32Mod(), m.machine()->Uint32Mod(), m.machine()->Int32LessThan(), m.machine()->Int32LessThanOrEqual(), m.machine()->Uint32LessThan(), m.machine()->Uint32LessThanOrEqual(), NULL}; @@ -1381,11 +1381,11 @@ TEST(RunInt32DivP) { } -TEST(RunInt32UDivP) { +TEST(RunUint32DivP) { { RawMachineAssemblerTester m; Int32BinopTester bt(&m); - bt.AddReturn(m.Int32UDiv(bt.param0, bt.param1)); + bt.AddReturn(m.Uint32Div(bt.param0, bt.param1)); FOR_UINT32_INPUTS(i) { FOR_UINT32_INPUTS(j) { uint32_t p0 = *i; @@ -1400,7 +1400,7 @@ TEST(RunInt32UDivP) { { RawMachineAssemblerTester m; Int32BinopTester bt(&m); - bt.AddReturn(m.Int32Add(bt.param0, m.Int32UDiv(bt.param0, bt.param1))); + bt.AddReturn(m.Int32Add(bt.param0, m.Uint32Div(bt.param0, bt.param1))); FOR_UINT32_INPUTS(i) { FOR_UINT32_INPUTS(j) { uint32_t p0 = *i; @@ -1449,11 +1449,11 @@ TEST(RunInt32ModP) { } -TEST(RunInt32UModP) { +TEST(RunUint32ModP) { { RawMachineAssemblerTester m; Int32BinopTester bt(&m); - bt.AddReturn(m.Int32UMod(bt.param0, bt.param1)); + bt.AddReturn(m.Uint32Mod(bt.param0, bt.param1)); FOR_UINT32_INPUTS(i) { FOR_UINT32_INPUTS(j) { uint32_t p0 = *i; @@ -1468,7 +1468,7 @@ TEST(RunInt32UModP) { { RawMachineAssemblerTester m; Int32BinopTester bt(&m); - bt.AddReturn(m.Int32Add(bt.param0, m.Int32UMod(bt.param0, bt.param1))); + bt.AddReturn(m.Int32Add(bt.param0, m.Uint32Mod(bt.param0, bt.param1))); FOR_UINT32_INPUTS(i) { FOR_UINT32_INPUTS(j) { uint32_t p0 = *i; @@ -2665,8 +2665,8 @@ TEST(RunDeadInt32Binops) { m.machine()->Word32Ror(), m.machine()->Word32Equal(), m.machine()->Int32Add(), m.machine()->Int32Sub(), m.machine()->Int32Mul(), m.machine()->Int32Div(), - m.machine()->Int32UDiv(), m.machine()->Int32Mod(), - m.machine()->Int32UMod(), m.machine()->Int32LessThan(), + m.machine()->Uint32Div(), m.machine()->Int32Mod(), + m.machine()->Uint32Mod(), m.machine()->Int32LessThan(), m.machine()->Int32LessThanOrEqual(), m.machine()->Uint32LessThan(), m.machine()->Uint32LessThanOrEqual(), NULL}; diff --git a/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc b/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc index c898847..f0931c7 100644 --- a/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc +++ b/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc @@ -1580,9 +1580,9 @@ TEST_F(InstructionSelectorTest, Int32SubWithInt32MulForMLS) { } -TEST_F(InstructionSelectorTest, Int32UDivWithParameters) { +TEST_F(InstructionSelectorTest, Uint32DivWithParameters) { StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); - m.Return(m.Int32UDiv(m.Parameter(0), m.Parameter(1))); + m.Return(m.Uint32Div(m.Parameter(0), m.Parameter(1))); Stream s = m.Build(); ASSERT_EQ(4U, s.size()); EXPECT_EQ(kArmVcvtF64U32, s[0]->arch_opcode()); @@ -1600,18 +1600,18 @@ TEST_F(InstructionSelectorTest, Int32UDivWithParameters) { } -TEST_F(InstructionSelectorTest, Int32UDivWithParametersForSUDIV) { +TEST_F(InstructionSelectorTest, Uint32DivWithParametersForSUDIV) { StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); - m.Return(m.Int32UDiv(m.Parameter(0), m.Parameter(1))); + m.Return(m.Uint32Div(m.Parameter(0), m.Parameter(1))); Stream s = m.Build(SUDIV); ASSERT_EQ(1U, s.size()); EXPECT_EQ(kArmUdiv, s[0]->arch_opcode()); } -TEST_F(InstructionSelectorTest, Int32UModWithParameters) { +TEST_F(InstructionSelectorTest, Uint32ModWithParameters) { StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); - m.Return(m.Int32UMod(m.Parameter(0), m.Parameter(1))); + m.Return(m.Uint32Mod(m.Parameter(0), m.Parameter(1))); Stream s = m.Build(); ASSERT_EQ(6U, s.size()); EXPECT_EQ(kArmVcvtF64U32, s[0]->arch_opcode()); @@ -1639,9 +1639,9 @@ TEST_F(InstructionSelectorTest, Int32UModWithParameters) { } -TEST_F(InstructionSelectorTest, Int32UModWithParametersForSUDIV) { +TEST_F(InstructionSelectorTest, Uint32ModWithParametersForSUDIV) { StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); - m.Return(m.Int32UMod(m.Parameter(0), m.Parameter(1))); + m.Return(m.Uint32Mod(m.Parameter(0), m.Parameter(1))); Stream s = m.Build(SUDIV); ASSERT_EQ(3U, s.size()); EXPECT_EQ(kArmUdiv, s[0]->arch_opcode()); @@ -1660,9 +1660,9 @@ TEST_F(InstructionSelectorTest, Int32UModWithParametersForSUDIV) { } -TEST_F(InstructionSelectorTest, Int32UModWithParametersForSUDIVAndMLS) { +TEST_F(InstructionSelectorTest, Uint32ModWithParametersForSUDIVAndMLS) { StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); - m.Return(m.Int32UMod(m.Parameter(0), m.Parameter(1))); + m.Return(m.Uint32Mod(m.Parameter(0), m.Parameter(1))); Stream s = m.Build(MLS, SUDIV); ASSERT_EQ(2U, s.size()); EXPECT_EQ(kArmUdiv, s[0]->arch_opcode()); diff --git a/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc b/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc index 79cf6aa..6287a71 100644 --- a/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc +++ b/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc @@ -141,8 +141,8 @@ static const MachInst2 kMulDivInstructions[] = { {&RawMachineAssembler::Int64Mul, "Int64Mul", kArm64Mul, kMachInt64}, {&RawMachineAssembler::Int32Div, "Int32Div", kArm64Idiv32, kMachInt32}, {&RawMachineAssembler::Int64Div, "Int64Div", kArm64Idiv, kMachInt64}, - {&RawMachineAssembler::Int32UDiv, "Int32UDiv", kArm64Udiv32, kMachInt32}, - {&RawMachineAssembler::Int64UDiv, "Int64UDiv", kArm64Udiv, kMachInt64}}; + {&RawMachineAssembler::Uint32Div, "Uint32Div", kArm64Udiv32, kMachInt32}, + {&RawMachineAssembler::Uint64Div, "Uint64Div", kArm64Udiv, kMachInt64}}; // ARM64 FP arithmetic instructions. diff --git a/test/unittests/compiler/machine-operator-unittest.cc b/test/unittests/compiler/machine-operator-unittest.cc index 176b78a..db73a81 100644 --- a/test/unittests/compiler/machine-operator-unittest.cc +++ b/test/unittests/compiler/machine-operator-unittest.cc @@ -184,13 +184,13 @@ const PureOperator kPureOperators[] = { PURE(Int32Add, 2, 1), PURE(Int32AddWithOverflow, 2, 2), PURE(Int32Sub, 2, 1), PURE(Int32SubWithOverflow, 2, 2), PURE(Int32Mul, 2, 1), PURE(Int32Div, 2, 1), - PURE(Int32UDiv, 2, 1), PURE(Int32Mod, 2, 1), - PURE(Int32UMod, 2, 1), PURE(Int32LessThan, 2, 1), + PURE(Uint32Div, 2, 1), PURE(Int32Mod, 2, 1), + PURE(Uint32Mod, 2, 1), PURE(Int32LessThan, 2, 1), PURE(Int32LessThanOrEqual, 2, 1), PURE(Uint32LessThan, 2, 1), PURE(Uint32LessThanOrEqual, 2, 1), PURE(Int64Add, 2, 1), PURE(Int64Sub, 2, 1), PURE(Int64Mul, 2, 1), - PURE(Int64Div, 2, 1), PURE(Int64UDiv, 2, 1), - PURE(Int64Mod, 2, 1), PURE(Int64UMod, 2, 1), + PURE(Int64Div, 2, 1), PURE(Uint64Div, 2, 1), + PURE(Int64Mod, 2, 1), PURE(Uint64Mod, 2, 1), PURE(Int64LessThan, 2, 1), PURE(Int64LessThanOrEqual, 2, 1), PURE(Uint64LessThan, 2, 1), PURE(ChangeFloat32ToFloat64, 1, 1), PURE(ChangeFloat64ToInt32, 1, 1), PURE(ChangeFloat64ToUint32, 1, 1), @@ -278,9 +278,9 @@ TEST(MachineOperatorTest, PseudoOperatorsWhenWordSizeIs32Bit) { EXPECT_EQ(machine.Int32Sub(), machine.IntSub()); EXPECT_EQ(machine.Int32Mul(), machine.IntMul()); EXPECT_EQ(machine.Int32Div(), machine.IntDiv()); - EXPECT_EQ(machine.Int32UDiv(), machine.IntUDiv()); + EXPECT_EQ(machine.Uint32Div(), machine.UintDiv()); EXPECT_EQ(machine.Int32Mod(), machine.IntMod()); - EXPECT_EQ(machine.Int32UMod(), machine.IntUMod()); + EXPECT_EQ(machine.Uint32Mod(), machine.UintMod()); EXPECT_EQ(machine.Int32LessThan(), machine.IntLessThan()); EXPECT_EQ(machine.Int32LessThanOrEqual(), machine.IntLessThanOrEqual()); } @@ -300,9 +300,9 @@ TEST(MachineOperatorTest, PseudoOperatorsWhenWordSizeIs64Bit) { EXPECT_EQ(machine.Int64Sub(), machine.IntSub()); EXPECT_EQ(machine.Int64Mul(), machine.IntMul()); EXPECT_EQ(machine.Int64Div(), machine.IntDiv()); - EXPECT_EQ(machine.Int64UDiv(), machine.IntUDiv()); + EXPECT_EQ(machine.Uint64Div(), machine.UintDiv()); EXPECT_EQ(machine.Int64Mod(), machine.IntMod()); - EXPECT_EQ(machine.Int64UMod(), machine.IntUMod()); + EXPECT_EQ(machine.Uint64Mod(), machine.UintMod()); EXPECT_EQ(machine.Int64LessThan(), machine.IntLessThan()); EXPECT_EQ(machine.Int64LessThanOrEqual(), machine.IntLessThanOrEqual()); }