diff options
author | Vladimir Marko <vmarko@google.com> | 2017-09-21 22:50:39 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2017-09-25 15:45:01 +0100 |
commit | 0ebe0d83138bba1996e9c8007969b5381d972b32 (patch) | |
tree | a5ee66ebc5b587ade97e56ac8fc7d832fbbed4af /compiler/optimizing/parallel_move_test.cc | |
parent | e1e347dace0ded83774999bb26c37527dcdb1d5a (diff) |
ART: Introduce compiler data type.
Replace most uses of the runtime's Primitive in compiler
with a new class DataType. This prepares for introducing
new types, such as Uint8, that the runtime does not need
to know about.
Test: m test-art-host-gtest
Test: testrunner.py --host
Bug: 23964345
Change-Id: Iec2ad82454eec678fffcd8279a9746b90feb9b0c
Diffstat (limited to 'compiler/optimizing/parallel_move_test.cc')
-rw-r--r-- | compiler/optimizing/parallel_move_test.cc | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/compiler/optimizing/parallel_move_test.cc b/compiler/optimizing/parallel_move_test.cc index 50620f0e7b..cb87cabe1c 100644 --- a/compiler/optimizing/parallel_move_test.cc +++ b/compiler/optimizing/parallel_move_test.cc @@ -158,7 +158,7 @@ static HParallelMove* BuildParallelMove(ArenaAllocator* allocator, moves->AddMove( Location::RegisterLocation(operands[i][0]), Location::RegisterLocation(operands[i][1]), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); } return moves; @@ -264,12 +264,12 @@ TYPED_TEST(ParallelMoveTest, ConstantLast) { moves->AddMove( Location::ConstantLocation(new (&allocator) HIntConstant(0)), Location::RegisterLocation(0), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterLocation(1), Location::RegisterLocation(2), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); resolver.EmitNativeCode(moves); ASSERT_STREQ("(1 -> 2) (C -> 0)", resolver.GetMessage().c_str()); @@ -285,12 +285,12 @@ TYPED_TEST(ParallelMoveTest, Pairs) { moves->AddMove( Location::RegisterLocation(2), Location::RegisterLocation(4), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); resolver.EmitNativeCode(moves); ASSERT_STREQ("(2 -> 4) (0,1 -> 2,3)", resolver.GetMessage().c_str()); @@ -302,12 +302,12 @@ TYPED_TEST(ParallelMoveTest, Pairs) { moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::RegisterLocation(2), Location::RegisterLocation(4), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); resolver.EmitNativeCode(moves); ASSERT_STREQ("(2 -> 4) (0,1 -> 2,3)", resolver.GetMessage().c_str()); @@ -319,12 +319,12 @@ TYPED_TEST(ParallelMoveTest, Pairs) { moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::RegisterLocation(2), Location::RegisterLocation(0), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -339,17 +339,17 @@ TYPED_TEST(ParallelMoveTest, Pairs) { moves->AddMove( Location::RegisterLocation(2), Location::RegisterLocation(7), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterLocation(7), Location::RegisterLocation(1), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -365,17 +365,17 @@ TYPED_TEST(ParallelMoveTest, Pairs) { moves->AddMove( Location::RegisterLocation(2), Location::RegisterLocation(7), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::RegisterLocation(7), Location::RegisterLocation(1), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -391,17 +391,17 @@ TYPED_TEST(ParallelMoveTest, Pairs) { moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::RegisterLocation(2), Location::RegisterLocation(7), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterLocation(7), Location::RegisterLocation(1), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -416,12 +416,12 @@ TYPED_TEST(ParallelMoveTest, Pairs) { moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::RegisterPairLocation(2, 3), Location::RegisterPairLocation(0, 1), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -436,12 +436,12 @@ TYPED_TEST(ParallelMoveTest, Pairs) { moves->AddMove( Location::RegisterPairLocation(2, 3), Location::RegisterPairLocation(0, 1), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -473,17 +473,17 @@ TYPED_TEST(ParallelMoveTest, MultiCycles) { moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::RegisterLocation(2), Location::RegisterLocation(0), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterLocation(3), Location::RegisterLocation(1), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -499,17 +499,17 @@ TYPED_TEST(ParallelMoveTest, MultiCycles) { moves->AddMove( Location::RegisterLocation(2), Location::RegisterLocation(0), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterLocation(3), Location::RegisterLocation(1), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -527,17 +527,17 @@ TYPED_TEST(ParallelMoveTest, MultiCycles) { moves->AddMove( Location::RegisterLocation(10), Location::RegisterLocation(5), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterPairLocation(4, 5), Location::DoubleStackSlot(32), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::DoubleStackSlot(32), Location::RegisterPairLocation(10, 11), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -560,17 +560,17 @@ TYPED_TEST(ParallelMoveTest, CyclesWith64BitsMoves) { moves->AddMove( Location::RegisterLocation(0), Location::RegisterLocation(1), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::RegisterLocation(1), Location::StackSlot(48), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::StackSlot(48), Location::RegisterLocation(0), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -587,17 +587,17 @@ TYPED_TEST(ParallelMoveTest, CyclesWith64BitsMoves) { moves->AddMove( Location::RegisterPairLocation(0, 1), Location::RegisterPairLocation(2, 3), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::RegisterPairLocation(2, 3), Location::DoubleStackSlot(32), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::DoubleStackSlot(32), Location::RegisterPairLocation(0, 1), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { @@ -619,17 +619,17 @@ TYPED_TEST(ParallelMoveTest, CyclesWith64BitsMoves2) { moves->AddMove( Location::RegisterLocation(0), Location::RegisterLocation(3), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); moves->AddMove( Location::RegisterPairLocation(2, 3), Location::RegisterPairLocation(0, 1), - Primitive::kPrimLong, + DataType::Type::kInt64, nullptr); moves->AddMove( Location::RegisterLocation(7), Location::RegisterLocation(2), - Primitive::kPrimInt, + DataType::Type::kInt32, nullptr); resolver.EmitNativeCode(moves); if (TestFixture::has_swap) { |