Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Mathieu Chartier | b666f48 | 2015-02-18 14:33:14 -0800 | [diff] [blame] | 17 | #include "base/arena_allocator.h" |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 18 | #include "nodes.h" |
| 19 | #include "parallel_move_resolver.h" |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 20 | |
| 21 | #include "gtest/gtest.h" |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 22 | #include "gtest/gtest-typed-test.h" |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 23 | |
| 24 | namespace art { |
| 25 | |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 26 | constexpr int kScratchRegisterStartIndexForTest = 100; |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 27 | |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 28 | static void DumpRegisterForTest(std::ostream& os, int reg) { |
| 29 | if (reg >= kScratchRegisterStartIndexForTest) { |
| 30 | os << "T" << reg - kScratchRegisterStartIndexForTest; |
| 31 | } else { |
| 32 | os << reg; |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 33 | } |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | static void DumpLocationForTest(std::ostream& os, Location location) { |
| 37 | if (location.IsConstant()) { |
| 38 | os << "C"; |
| 39 | } else if (location.IsPair()) { |
| 40 | DumpRegisterForTest(os, location.low()); |
| 41 | os << ","; |
| 42 | DumpRegisterForTest(os, location.high()); |
| 43 | } else if (location.IsRegister()) { |
| 44 | DumpRegisterForTest(os, location.reg()); |
| 45 | } else if (location.IsStackSlot()) { |
| 46 | os << location.GetStackIndex() << "(sp)"; |
| 47 | } else { |
| 48 | DCHECK(location.IsDoubleStackSlot())<< location; |
| 49 | os << "2x" << location.GetStackIndex() << "(sp)"; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | class TestParallelMoveResolverWithSwap : public ParallelMoveResolverWithSwap { |
| 54 | public: |
| 55 | explicit TestParallelMoveResolverWithSwap(ArenaAllocator* allocator) |
| 56 | : ParallelMoveResolverWithSwap(allocator) {} |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 57 | |
Alexandre Rames | 2ed20af | 2015-03-06 13:55:35 +0000 | [diff] [blame] | 58 | void EmitMove(size_t index) OVERRIDE { |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame^] | 59 | DCHECK_LT(index, moves_.size()); |
| 60 | MoveOperands* move = moves_[index]; |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 61 | if (!message_.str().empty()) { |
| 62 | message_ << " "; |
| 63 | } |
Nicolas Geoffray | 48c310c | 2015-01-14 10:45:05 +0000 | [diff] [blame] | 64 | message_ << "("; |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 65 | DumpLocationForTest(message_, move->GetSource()); |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 66 | message_ << " -> "; |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 67 | DumpLocationForTest(message_, move->GetDestination()); |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 68 | message_ << ")"; |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 69 | } |
| 70 | |
Alexandre Rames | 2ed20af | 2015-03-06 13:55:35 +0000 | [diff] [blame] | 71 | void EmitSwap(size_t index) OVERRIDE { |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame^] | 72 | DCHECK_LT(index, moves_.size()); |
| 73 | MoveOperands* move = moves_[index]; |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 74 | if (!message_.str().empty()) { |
| 75 | message_ << " "; |
| 76 | } |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 77 | message_ << "("; |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 78 | DumpLocationForTest(message_, move->GetSource()); |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 79 | message_ << " <-> "; |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 80 | DumpLocationForTest(message_, move->GetDestination()); |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 81 | message_ << ")"; |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 82 | } |
| 83 | |
Alexandre Rames | 2ed20af | 2015-03-06 13:55:35 +0000 | [diff] [blame] | 84 | void SpillScratch(int reg ATTRIBUTE_UNUSED) OVERRIDE {} |
| 85 | void RestoreScratch(int reg ATTRIBUTE_UNUSED) OVERRIDE {} |
Nicolas Geoffray | 86dbb9a | 2014-06-04 11:12:39 +0100 | [diff] [blame] | 86 | |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 87 | std::string GetMessage() const { |
| 88 | return message_.str(); |
| 89 | } |
| 90 | |
| 91 | private: |
| 92 | std::ostringstream message_; |
| 93 | |
| 94 | |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 95 | DISALLOW_COPY_AND_ASSIGN(TestParallelMoveResolverWithSwap); |
| 96 | }; |
| 97 | |
| 98 | class TestParallelMoveResolverNoSwap : public ParallelMoveResolverNoSwap { |
| 99 | public: |
| 100 | explicit TestParallelMoveResolverNoSwap(ArenaAllocator* allocator) |
| 101 | : ParallelMoveResolverNoSwap(allocator), scratch_index_(kScratchRegisterStartIndexForTest) {} |
| 102 | |
| 103 | void PrepareForEmitNativeCode() OVERRIDE { |
| 104 | scratch_index_ = kScratchRegisterStartIndexForTest; |
| 105 | } |
| 106 | |
| 107 | void FinishEmitNativeCode() OVERRIDE {} |
| 108 | |
| 109 | Location AllocateScratchLocationFor(Location::Kind kind) OVERRIDE { |
| 110 | if (kind == Location::kStackSlot || kind == Location::kFpuRegister || |
| 111 | kind == Location::kRegister) { |
| 112 | kind = Location::kRegister; |
| 113 | } else { |
| 114 | // Allocate register pair for double stack slot which simulates 32-bit backend's behavior. |
| 115 | kind = Location::kRegisterPair; |
| 116 | } |
| 117 | Location scratch = GetScratchLocation(kind); |
| 118 | if (scratch.Equals(Location::NoLocation())) { |
| 119 | AddScratchLocation(Location::RegisterLocation(scratch_index_)); |
| 120 | AddScratchLocation(Location::RegisterLocation(scratch_index_ + 1)); |
| 121 | AddScratchLocation(Location::RegisterPairLocation(scratch_index_, scratch_index_ + 1)); |
| 122 | scratch = (kind == Location::kRegister) ? Location::RegisterLocation(scratch_index_) |
| 123 | : Location::RegisterPairLocation(scratch_index_, scratch_index_ + 1); |
| 124 | scratch_index_ += 2; |
| 125 | } |
| 126 | return scratch; |
| 127 | } |
| 128 | |
| 129 | void FreeScratchLocation(Location loc ATTRIBUTE_UNUSED) OVERRIDE {} |
| 130 | |
| 131 | void EmitMove(size_t index) OVERRIDE { |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame^] | 132 | DCHECK_LT(index, moves_.size()); |
| 133 | MoveOperands* move = moves_[index]; |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 134 | if (!message_.str().empty()) { |
| 135 | message_ << " "; |
| 136 | } |
| 137 | message_ << "("; |
| 138 | DumpLocationForTest(message_, move->GetSource()); |
| 139 | message_ << " -> "; |
| 140 | DumpLocationForTest(message_, move->GetDestination()); |
| 141 | message_ << ")"; |
| 142 | } |
| 143 | |
| 144 | std::string GetMessage() const { |
| 145 | return message_.str(); |
| 146 | } |
| 147 | |
| 148 | private: |
| 149 | std::ostringstream message_; |
| 150 | |
| 151 | int scratch_index_; |
| 152 | |
| 153 | DISALLOW_COPY_AND_ASSIGN(TestParallelMoveResolverNoSwap); |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 154 | }; |
| 155 | |
| 156 | static HParallelMove* BuildParallelMove(ArenaAllocator* allocator, |
| 157 | const size_t operands[][2], |
| 158 | size_t number_of_moves) { |
| 159 | HParallelMove* moves = new (allocator) HParallelMove(allocator); |
| 160 | for (size_t i = 0; i < number_of_moves; ++i) { |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 161 | moves->AddMove( |
Nicolas Geoffray | 56b9ee6 | 2014-10-09 11:47:51 +0100 | [diff] [blame] | 162 | Location::RegisterLocation(operands[i][0]), |
| 163 | Location::RegisterLocation(operands[i][1]), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 164 | Primitive::kPrimInt, |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 165 | nullptr); |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 166 | } |
| 167 | return moves; |
| 168 | } |
| 169 | |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 170 | template <typename T> |
| 171 | class ParallelMoveTest : public ::testing::Test { |
| 172 | public: |
| 173 | static const bool has_swap; |
| 174 | }; |
| 175 | |
| 176 | template<> const bool ParallelMoveTest<TestParallelMoveResolverWithSwap>::has_swap = true; |
| 177 | template<> const bool ParallelMoveTest<TestParallelMoveResolverNoSwap>::has_swap = false; |
| 178 | |
| 179 | typedef ::testing::Types<TestParallelMoveResolverWithSwap, TestParallelMoveResolverNoSwap> |
| 180 | ParallelMoveResolverTestTypes; |
| 181 | |
| 182 | TYPED_TEST_CASE(ParallelMoveTest, ParallelMoveResolverTestTypes); |
| 183 | |
| 184 | |
| 185 | TYPED_TEST(ParallelMoveTest, Dependency) { |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 186 | ArenaPool pool; |
| 187 | ArenaAllocator allocator(&pool); |
| 188 | |
| 189 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 190 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 191 | static constexpr size_t moves[][2] = {{0, 1}, {1, 2}}; |
| 192 | resolver.EmitNativeCode(BuildParallelMove(&allocator, moves, arraysize(moves))); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 193 | if (TestFixture::has_swap) { |
| 194 | ASSERT_STREQ("(1 -> 2) (0 -> 1)", resolver.GetMessage().c_str()); |
| 195 | } else { |
| 196 | ASSERT_STREQ("(1 -> 2) (0 -> 1)", resolver.GetMessage().c_str()); |
| 197 | } |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 198 | } |
| 199 | |
| 200 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 201 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 202 | static constexpr size_t moves[][2] = {{0, 1}, {1, 2}, {2, 3}, {1, 4}}; |
| 203 | resolver.EmitNativeCode(BuildParallelMove(&allocator, moves, arraysize(moves))); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 204 | if (TestFixture::has_swap) { |
| 205 | ASSERT_STREQ("(2 -> 3) (1 -> 2) (1 -> 4) (0 -> 1)", resolver.GetMessage().c_str()); |
| 206 | } else { |
| 207 | ASSERT_STREQ("(2 -> 3) (1 -> 2) (0 -> 1) (2 -> 4)", resolver.GetMessage().c_str()); |
| 208 | } |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 209 | } |
| 210 | } |
| 211 | |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 212 | TYPED_TEST(ParallelMoveTest, Cycle) { |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 213 | ArenaPool pool; |
| 214 | ArenaAllocator allocator(&pool); |
| 215 | |
| 216 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 217 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 218 | static constexpr size_t moves[][2] = {{0, 1}, {1, 0}}; |
| 219 | resolver.EmitNativeCode(BuildParallelMove(&allocator, moves, arraysize(moves))); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 220 | if (TestFixture::has_swap) { |
| 221 | ASSERT_STREQ("(1 <-> 0)", resolver.GetMessage().c_str()); |
| 222 | } else { |
| 223 | ASSERT_STREQ("(1 -> T0) (0 -> 1) (T0 -> 0)", resolver.GetMessage().c_str()); |
| 224 | } |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 225 | } |
| 226 | |
| 227 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 228 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 229 | static constexpr size_t moves[][2] = {{0, 1}, {1, 2}, {1, 0}}; |
| 230 | resolver.EmitNativeCode(BuildParallelMove(&allocator, moves, arraysize(moves))); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 231 | if (TestFixture::has_swap) { |
| 232 | ASSERT_STREQ("(1 -> 2) (1 <-> 0)", resolver.GetMessage().c_str()); |
| 233 | } else { |
| 234 | ASSERT_STREQ("(1 -> 2) (0 -> 1) (2 -> 0)", resolver.GetMessage().c_str()); |
| 235 | } |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 236 | } |
| 237 | |
| 238 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 239 | TypeParam resolver(&allocator); |
| 240 | static constexpr size_t moves[][2] = {{0, 1}, {1, 0}, {0, 2}}; |
| 241 | resolver.EmitNativeCode(BuildParallelMove(&allocator, moves, arraysize(moves))); |
| 242 | if (TestFixture::has_swap) { |
| 243 | ASSERT_STREQ("(0 -> 2) (1 <-> 0)", resolver.GetMessage().c_str()); |
| 244 | } else { |
| 245 | ASSERT_STREQ("(0 -> 2) (1 -> 0) (2 -> 1)", resolver.GetMessage().c_str()); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | { |
| 250 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 6450d14 | 2015-01-16 09:04:49 +0000 | [diff] [blame] | 251 | static constexpr size_t moves[][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 4}, {4, 0}}; |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 252 | resolver.EmitNativeCode(BuildParallelMove(&allocator, moves, arraysize(moves))); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 253 | if (TestFixture::has_swap) { |
| 254 | ASSERT_STREQ("(4 <-> 0) (3 <-> 4) (2 <-> 3) (1 <-> 2)", resolver.GetMessage().c_str()); |
| 255 | } else { |
| 256 | ASSERT_STREQ("(4 -> T0) (3 -> 4) (2 -> 3) (1 -> 2) (0 -> 1) (T0 -> 0)", |
| 257 | resolver.GetMessage().c_str()); |
| 258 | } |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 259 | } |
| 260 | } |
| 261 | |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 262 | TYPED_TEST(ParallelMoveTest, ConstantLast) { |
Nicolas Geoffray | 48c310c | 2015-01-14 10:45:05 +0000 | [diff] [blame] | 263 | ArenaPool pool; |
| 264 | ArenaAllocator allocator(&pool); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 265 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 48c310c | 2015-01-14 10:45:05 +0000 | [diff] [blame] | 266 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 267 | moves->AddMove( |
Nicolas Geoffray | 48c310c | 2015-01-14 10:45:05 +0000 | [diff] [blame] | 268 | Location::ConstantLocation(new (&allocator) HIntConstant(0)), |
| 269 | Location::RegisterLocation(0), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 270 | Primitive::kPrimInt, |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 271 | nullptr); |
| 272 | moves->AddMove( |
Nicolas Geoffray | 48c310c | 2015-01-14 10:45:05 +0000 | [diff] [blame] | 273 | Location::RegisterLocation(1), |
| 274 | Location::RegisterLocation(2), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 275 | Primitive::kPrimInt, |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 276 | nullptr); |
Nicolas Geoffray | 48c310c | 2015-01-14 10:45:05 +0000 | [diff] [blame] | 277 | resolver.EmitNativeCode(moves); |
| 278 | ASSERT_STREQ("(1 -> 2) (C -> 0)", resolver.GetMessage().c_str()); |
| 279 | } |
| 280 | |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 281 | TYPED_TEST(ParallelMoveTest, Pairs) { |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 282 | ArenaPool pool; |
| 283 | ArenaAllocator allocator(&pool); |
| 284 | |
| 285 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 286 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 287 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 288 | moves->AddMove( |
| 289 | Location::RegisterLocation(2), |
| 290 | Location::RegisterLocation(4), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 291 | Primitive::kPrimInt, |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 292 | nullptr); |
| 293 | moves->AddMove( |
| 294 | Location::RegisterPairLocation(0, 1), |
| 295 | Location::RegisterPairLocation(2, 3), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 296 | Primitive::kPrimLong, |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 297 | nullptr); |
| 298 | resolver.EmitNativeCode(moves); |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 299 | ASSERT_STREQ("(2 -> 4) (0,1 -> 2,3)", resolver.GetMessage().c_str()); |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 300 | } |
| 301 | |
| 302 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 303 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 304 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 305 | moves->AddMove( |
| 306 | Location::RegisterPairLocation(0, 1), |
| 307 | Location::RegisterPairLocation(2, 3), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 308 | Primitive::kPrimLong, |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 309 | nullptr); |
| 310 | moves->AddMove( |
| 311 | Location::RegisterLocation(2), |
| 312 | Location::RegisterLocation(4), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 313 | Primitive::kPrimInt, |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 314 | nullptr); |
| 315 | resolver.EmitNativeCode(moves); |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 316 | ASSERT_STREQ("(2 -> 4) (0,1 -> 2,3)", resolver.GetMessage().c_str()); |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 317 | } |
| 318 | |
| 319 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 320 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 321 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 322 | moves->AddMove( |
| 323 | Location::RegisterPairLocation(0, 1), |
| 324 | Location::RegisterPairLocation(2, 3), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 325 | Primitive::kPrimLong, |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 326 | nullptr); |
| 327 | moves->AddMove( |
| 328 | Location::RegisterLocation(2), |
| 329 | Location::RegisterLocation(0), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 330 | Primitive::kPrimInt, |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 331 | nullptr); |
| 332 | resolver.EmitNativeCode(moves); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 333 | if (TestFixture::has_swap) { |
| 334 | ASSERT_STREQ("(0,1 <-> 2,3)", resolver.GetMessage().c_str()); |
| 335 | } else { |
| 336 | ASSERT_STREQ("(2 -> T0) (0,1 -> 2,3) (T0 -> 0)", resolver.GetMessage().c_str()); |
| 337 | } |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 338 | } |
| 339 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 340 | TypeParam resolver(&allocator); |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 341 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 342 | moves->AddMove( |
| 343 | Location::RegisterLocation(2), |
| 344 | Location::RegisterLocation(7), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 345 | Primitive::kPrimInt, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 346 | nullptr); |
| 347 | moves->AddMove( |
| 348 | Location::RegisterLocation(7), |
| 349 | Location::RegisterLocation(1), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 350 | Primitive::kPrimInt, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 351 | nullptr); |
| 352 | moves->AddMove( |
| 353 | Location::RegisterPairLocation(0, 1), |
| 354 | Location::RegisterPairLocation(2, 3), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 355 | Primitive::kPrimLong, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 356 | nullptr); |
| 357 | resolver.EmitNativeCode(moves); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 358 | if (TestFixture::has_swap) { |
| 359 | ASSERT_STREQ("(0,1 <-> 2,3) (7 -> 1) (0 -> 7)", resolver.GetMessage().c_str()); |
| 360 | } else { |
| 361 | ASSERT_STREQ("(0,1 -> T0,T1) (7 -> 1) (2 -> 7) (T0,T1 -> 2,3)", |
| 362 | resolver.GetMessage().c_str()); |
| 363 | } |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 364 | } |
| 365 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 366 | TypeParam resolver(&allocator); |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 367 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 368 | moves->AddMove( |
| 369 | Location::RegisterLocation(2), |
| 370 | Location::RegisterLocation(7), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 371 | Primitive::kPrimInt, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 372 | nullptr); |
| 373 | moves->AddMove( |
| 374 | Location::RegisterPairLocation(0, 1), |
| 375 | Location::RegisterPairLocation(2, 3), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 376 | Primitive::kPrimLong, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 377 | nullptr); |
| 378 | moves->AddMove( |
| 379 | Location::RegisterLocation(7), |
| 380 | Location::RegisterLocation(1), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 381 | Primitive::kPrimInt, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 382 | nullptr); |
| 383 | resolver.EmitNativeCode(moves); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 384 | if (TestFixture::has_swap) { |
| 385 | ASSERT_STREQ("(0,1 <-> 2,3) (7 -> 1) (0 -> 7)", resolver.GetMessage().c_str()); |
| 386 | } else { |
| 387 | ASSERT_STREQ("(0,1 -> T0,T1) (7 -> 1) (2 -> 7) (T0,T1 -> 2,3)", |
| 388 | resolver.GetMessage().c_str()); |
| 389 | } |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 390 | } |
| 391 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 392 | TypeParam resolver(&allocator); |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 393 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 394 | moves->AddMove( |
| 395 | Location::RegisterPairLocation(0, 1), |
| 396 | Location::RegisterPairLocation(2, 3), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 397 | Primitive::kPrimLong, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 398 | nullptr); |
| 399 | moves->AddMove( |
| 400 | Location::RegisterLocation(2), |
| 401 | Location::RegisterLocation(7), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 402 | Primitive::kPrimInt, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 403 | nullptr); |
| 404 | moves->AddMove( |
| 405 | Location::RegisterLocation(7), |
| 406 | Location::RegisterLocation(1), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 407 | Primitive::kPrimInt, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 408 | nullptr); |
| 409 | resolver.EmitNativeCode(moves); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 410 | if (TestFixture::has_swap) { |
| 411 | ASSERT_STREQ("(0,1 <-> 2,3) (7 -> 1) (0 -> 7)", resolver.GetMessage().c_str()); |
| 412 | } else { |
| 413 | ASSERT_STREQ("(7 -> T0) (2 -> 7) (0,1 -> 2,3) (T0 -> 1)", resolver.GetMessage().c_str()); |
| 414 | } |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 415 | } |
| 416 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 417 | TypeParam resolver(&allocator); |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 418 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 419 | moves->AddMove( |
| 420 | Location::RegisterPairLocation(0, 1), |
| 421 | Location::RegisterPairLocation(2, 3), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 422 | Primitive::kPrimLong, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 423 | nullptr); |
| 424 | moves->AddMove( |
| 425 | Location::RegisterPairLocation(2, 3), |
| 426 | Location::RegisterPairLocation(0, 1), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 427 | Primitive::kPrimLong, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 428 | nullptr); |
| 429 | resolver.EmitNativeCode(moves); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 430 | if (TestFixture::has_swap) { |
| 431 | ASSERT_STREQ("(2,3 <-> 0,1)", resolver.GetMessage().c_str()); |
| 432 | } else { |
| 433 | ASSERT_STREQ("(2,3 -> T0,T1) (0,1 -> 2,3) (T0,T1 -> 0,1)", resolver.GetMessage().c_str()); |
| 434 | } |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 435 | } |
| 436 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 437 | TypeParam resolver(&allocator); |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 438 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 439 | moves->AddMove( |
| 440 | Location::RegisterPairLocation(2, 3), |
| 441 | Location::RegisterPairLocation(0, 1), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 442 | Primitive::kPrimLong, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 443 | nullptr); |
| 444 | moves->AddMove( |
| 445 | Location::RegisterPairLocation(0, 1), |
| 446 | Location::RegisterPairLocation(2, 3), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 447 | Primitive::kPrimLong, |
Nicolas Geoffray | f7a0c4e | 2015-02-10 17:08:47 +0000 | [diff] [blame] | 448 | nullptr); |
| 449 | resolver.EmitNativeCode(moves); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 450 | if (TestFixture::has_swap) { |
| 451 | ASSERT_STREQ("(0,1 <-> 2,3)", resolver.GetMessage().c_str()); |
| 452 | } else { |
| 453 | ASSERT_STREQ("(0,1 -> T0,T1) (2,3 -> 0,1) (T0,T1 -> 2,3)", resolver.GetMessage().c_str()); |
| 454 | } |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | TYPED_TEST(ParallelMoveTest, MultiCycles) { |
| 459 | ArenaPool pool; |
| 460 | ArenaAllocator allocator(&pool); |
| 461 | |
| 462 | { |
| 463 | TypeParam resolver(&allocator); |
| 464 | static constexpr size_t moves[][2] = {{0, 1}, {1, 0}, {2, 3}, {3, 2}}; |
| 465 | resolver.EmitNativeCode(BuildParallelMove(&allocator, moves, arraysize(moves))); |
| 466 | if (TestFixture::has_swap) { |
| 467 | ASSERT_STREQ("(1 <-> 0) (3 <-> 2)", resolver.GetMessage().c_str()); |
| 468 | } else { |
| 469 | ASSERT_STREQ("(1 -> T0) (0 -> 1) (T0 -> 0) (3 -> T0) (2 -> 3) (T0 -> 2)", |
| 470 | resolver.GetMessage().c_str()); |
| 471 | } |
| 472 | } |
| 473 | { |
| 474 | TypeParam resolver(&allocator); |
| 475 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 476 | moves->AddMove( |
| 477 | Location::RegisterPairLocation(0, 1), |
| 478 | Location::RegisterPairLocation(2, 3), |
| 479 | Primitive::kPrimLong, |
| 480 | nullptr); |
| 481 | moves->AddMove( |
| 482 | Location::RegisterLocation(2), |
| 483 | Location::RegisterLocation(0), |
| 484 | Primitive::kPrimInt, |
| 485 | nullptr); |
| 486 | moves->AddMove( |
| 487 | Location::RegisterLocation(3), |
| 488 | Location::RegisterLocation(1), |
| 489 | Primitive::kPrimInt, |
| 490 | nullptr); |
| 491 | resolver.EmitNativeCode(moves); |
| 492 | if (TestFixture::has_swap) { |
| 493 | ASSERT_STREQ("(0,1 <-> 2,3)", resolver.GetMessage().c_str()); |
| 494 | } else { |
| 495 | ASSERT_STREQ("(2 -> T0) (3 -> T1) (0,1 -> 2,3) (T0 -> 0) (T1 -> 1)", |
| 496 | resolver.GetMessage().c_str()); |
| 497 | } |
| 498 | } |
| 499 | { |
| 500 | TypeParam resolver(&allocator); |
| 501 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 502 | moves->AddMove( |
| 503 | Location::RegisterLocation(2), |
| 504 | Location::RegisterLocation(0), |
| 505 | Primitive::kPrimInt, |
| 506 | nullptr); |
| 507 | moves->AddMove( |
| 508 | Location::RegisterLocation(3), |
| 509 | Location::RegisterLocation(1), |
| 510 | Primitive::kPrimInt, |
| 511 | nullptr); |
| 512 | moves->AddMove( |
| 513 | Location::RegisterPairLocation(0, 1), |
| 514 | Location::RegisterPairLocation(2, 3), |
| 515 | Primitive::kPrimLong, |
| 516 | nullptr); |
| 517 | resolver.EmitNativeCode(moves); |
| 518 | if (TestFixture::has_swap) { |
| 519 | ASSERT_STREQ("(0,1 <-> 2,3)", resolver.GetMessage().c_str()); |
| 520 | } else { |
| 521 | ASSERT_STREQ("(3 -> T0) (0,1 -> T2,T3) (T0 -> 1) (2 -> 0) (T2,T3 -> 2,3)", |
| 522 | resolver.GetMessage().c_str()); |
| 523 | } |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 524 | } |
Nicolas Geoffray | a2d15b5 | 2015-03-31 18:13:51 +0100 | [diff] [blame] | 525 | |
| 526 | { |
| 527 | // Test involving registers used in single context and pair context. |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 528 | TypeParam resolver(&allocator); |
Nicolas Geoffray | a2d15b5 | 2015-03-31 18:13:51 +0100 | [diff] [blame] | 529 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 530 | moves->AddMove( |
| 531 | Location::RegisterLocation(10), |
| 532 | Location::RegisterLocation(5), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 533 | Primitive::kPrimInt, |
Nicolas Geoffray | a2d15b5 | 2015-03-31 18:13:51 +0100 | [diff] [blame] | 534 | nullptr); |
| 535 | moves->AddMove( |
| 536 | Location::RegisterPairLocation(4, 5), |
| 537 | Location::DoubleStackSlot(32), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 538 | Primitive::kPrimLong, |
Nicolas Geoffray | a2d15b5 | 2015-03-31 18:13:51 +0100 | [diff] [blame] | 539 | nullptr); |
| 540 | moves->AddMove( |
| 541 | Location::DoubleStackSlot(32), |
| 542 | Location::RegisterPairLocation(10, 11), |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 543 | Primitive::kPrimLong, |
Nicolas Geoffray | a2d15b5 | 2015-03-31 18:13:51 +0100 | [diff] [blame] | 544 | nullptr); |
| 545 | resolver.EmitNativeCode(moves); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 546 | if (TestFixture::has_swap) { |
| 547 | ASSERT_STREQ("(2x32(sp) <-> 10,11) (4,5 <-> 2x32(sp)) (4 -> 5)", resolver.GetMessage().c_str()); |
| 548 | } else { |
| 549 | ASSERT_STREQ("(2x32(sp) -> T0,T1) (4,5 -> 2x32(sp)) (10 -> 5) (T0,T1 -> 10,11)", |
| 550 | resolver.GetMessage().c_str()); |
| 551 | } |
Nicolas Geoffray | a2d15b5 | 2015-03-31 18:13:51 +0100 | [diff] [blame] | 552 | } |
Nicolas Geoffray | 42d1f5f | 2015-01-16 09:14:18 +0000 | [diff] [blame] | 553 | } |
| 554 | |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 555 | // Test that we do 64bits moves before 32bits moves. |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 556 | TYPED_TEST(ParallelMoveTest, CyclesWith64BitsMoves) { |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 557 | ArenaPool pool; |
| 558 | ArenaAllocator allocator(&pool); |
| 559 | |
| 560 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 561 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 562 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 563 | moves->AddMove( |
| 564 | Location::RegisterLocation(0), |
| 565 | Location::RegisterLocation(1), |
| 566 | Primitive::kPrimLong, |
| 567 | nullptr); |
| 568 | moves->AddMove( |
| 569 | Location::RegisterLocation(1), |
| 570 | Location::StackSlot(48), |
| 571 | Primitive::kPrimInt, |
| 572 | nullptr); |
| 573 | moves->AddMove( |
| 574 | Location::StackSlot(48), |
| 575 | Location::RegisterLocation(0), |
| 576 | Primitive::kPrimInt, |
| 577 | nullptr); |
| 578 | resolver.EmitNativeCode(moves); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 579 | if (TestFixture::has_swap) { |
| 580 | ASSERT_STREQ("(0 <-> 1) (48(sp) <-> 0)", resolver.GetMessage().c_str()); |
| 581 | } else { |
| 582 | ASSERT_STREQ("(48(sp) -> T0) (1 -> 48(sp)) (0 -> 1) (T0 -> 0)", |
| 583 | resolver.GetMessage().c_str()); |
| 584 | } |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 585 | } |
| 586 | |
| 587 | { |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 588 | TypeParam resolver(&allocator); |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 589 | HParallelMove* moves = new (&allocator) HParallelMove(&allocator); |
| 590 | moves->AddMove( |
| 591 | Location::RegisterPairLocation(0, 1), |
| 592 | Location::RegisterPairLocation(2, 3), |
| 593 | Primitive::kPrimLong, |
| 594 | nullptr); |
| 595 | moves->AddMove( |
| 596 | Location::RegisterPairLocation(2, 3), |
| 597 | Location::DoubleStackSlot(32), |
| 598 | Primitive::kPrimLong, |
| 599 | nullptr); |
| 600 | moves->AddMove( |
| 601 | Location::DoubleStackSlot(32), |
| 602 | Location::RegisterPairLocation(0, 1), |
| 603 | Primitive::kPrimLong, |
| 604 | nullptr); |
| 605 | resolver.EmitNativeCode(moves); |
Zheng Xu | ad4450e | 2015-04-17 18:48:56 +0800 | [diff] [blame] | 606 | if (TestFixture::has_swap) { |
| 607 | ASSERT_STREQ("(2x32(sp) <-> 0,1) (2,3 <-> 2x32(sp))", resolver.GetMessage().c_str()); |
| 608 | } else { |
| 609 | ASSERT_STREQ("(2x32(sp) -> T0,T1) (2,3 -> 2x32(sp)) (0,1 -> 2,3) (T0,T1 -> 0,1)", |
| 610 | resolver.GetMessage().c_str()); |
| 611 | } |
Nicolas Geoffray | 9021825 | 2015-04-15 11:56:51 +0100 | [diff] [blame] | 612 | } |
| 613 | } |
| 614 | |
Nicolas Geoffray | 4e3d23a | 2014-05-22 18:32:45 +0100 | [diff] [blame] | 615 | } // namespace art |