| OLD | NEW |
| 1 //===- subzero/unittest/AssemblerX8664/LowLevel.cpp -----------------------===// | 1 //===- subzero/unittest/AssemblerX8664/LowLevel.cpp -----------------------===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 #include "AssemblerX8664/TestUtil.h" | 9 #include "AssemblerX8664/TestUtil.h" |
| 10 | 10 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 reset(); \ | 208 reset(); \ |
| 209 } while (0) | 209 } while (0) |
| 210 | 210 |
| 211 #define TestRegAddrScaledIndex(Inst, Dst, Index, Scale, Disp, OpType, \ | 211 #define TestRegAddrScaledIndex(Inst, Dst, Index, Scale, Disp, OpType, \ |
| 212 ByteCountUntyped, ...) \ | 212 ByteCountUntyped, ...) \ |
| 213 do { \ | 213 do { \ |
| 214 static constexpr char TestString[] = \ | 214 static constexpr char TestString[] = \ |
| 215 "(" #Inst ", " #Dst ", " #Index ", " #Scale ", " #Disp ", " #OpType \ | 215 "(" #Inst ", " #Dst ", " #Index ", " #Scale ", " #Disp ", " #OpType \ |
| 216 ", " #ByteCountUntyped ", " #__VA_ARGS__ ")"; \ | 216 ", " #ByteCountUntyped ", " #__VA_ARGS__ ")"; \ |
| 217 static constexpr uint8_t ByteCount = ByteCountUntyped; \ | 217 static constexpr uint8_t ByteCount = ByteCountUntyped; \ |
| 218 __ Inst( \ | 218 __ Inst(IceType_##OpType, Encoded_GPR_##Dst(), \ |
| 219 IceType_##OpType, Encoded_GPR_##Dst(), \ | 219 Address(Encoded_GPR_##Index(), Traits::TIMES_##Scale, Disp, \ |
| 220 Address(Encoded_GPR_##Index(), Traits::TIMES_##Scale, Disp, \ | 220 AssemblerFixup::NoFixup)); \ |
| 221 AssemblerFixup::NoFixup)); \ | |
| 222 ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \ | 221 ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \ |
| 223 ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \ | 222 ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \ |
| 224 << TestString; \ | 223 << TestString; \ |
| 225 reset(); \ | 224 reset(); \ |
| 226 } while (0) | 225 } while (0) |
| 227 | 226 |
| 228 #define TestRegAddrBaseScaledIndex(Inst, Dst, Base, Index, Scale, Disp, \ | 227 #define TestRegAddrBaseScaledIndex(Inst, Dst, Base, Index, Scale, Disp, \ |
| 229 OpType, ByteCountUntyped, ...) \ | 228 OpType, ByteCountUntyped, ...) \ |
| 230 do { \ | 229 do { \ |
| 231 static constexpr char TestString[] = \ | 230 static constexpr char TestString[] = \ |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 EXPECT_FLOAT_EQ(1.0f, test.contentsOfDword<float>(S0)); | 1116 EXPECT_FLOAT_EQ(1.0f, test.contentsOfDword<float>(S0)); |
| 1118 EXPECT_FLOAT_EQ(2.0f, test.contentsOfDword<float>(S1)); | 1117 EXPECT_FLOAT_EQ(2.0f, test.contentsOfDword<float>(S1)); |
| 1119 EXPECT_FLOAT_EQ(3.0f, test.contentsOfDword<float>(S2)); | 1118 EXPECT_FLOAT_EQ(3.0f, test.contentsOfDword<float>(S2)); |
| 1120 EXPECT_FLOAT_EQ(4.0f, test.contentsOfDword<float>(S3)); | 1119 EXPECT_FLOAT_EQ(4.0f, test.contentsOfDword<float>(S3)); |
| 1121 } | 1120 } |
| 1122 | 1121 |
| 1123 } // end of anonymous namespace | 1122 } // end of anonymous namespace |
| 1124 } // end of namespace Test | 1123 } // end of namespace Test |
| 1125 } // end of namespace X8664 | 1124 } // end of namespace X8664 |
| 1126 } // end of namespace Ice | 1125 } // end of namespace Ice |
| OLD | NEW |