Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: unittest/AssemblerX8664/LowLevel.cpp

Issue 1616103002: Subzero. X8664. Enables RIP-based addressing mode. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « unittest/AssemblerX8664/Locked.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 << TestString; \ 179 << TestString; \
180 reset(); \ 180 reset(); \
181 } while (0) 181 } while (0)
182 182
183 #define TestRegAbsoluteAddr(Inst, Dst, Disp, OpType, ByteCountUntyped, ...) \ 183 #define TestRegAbsoluteAddr(Inst, Dst, Disp, OpType, ByteCountUntyped, ...) \
184 do { \ 184 do { \
185 static constexpr char TestString[] = \ 185 static constexpr char TestString[] = \
186 "(" #Inst ", " #Dst ", " #Disp ", " #OpType ", " #ByteCountUntyped \ 186 "(" #Inst ", " #Dst ", " #Disp ", " #OpType ", " #ByteCountUntyped \
187 ", " #__VA_ARGS__ ")"; \ 187 ", " #__VA_ARGS__ ")"; \
188 static constexpr uint8_t ByteCount = ByteCountUntyped; \ 188 static constexpr uint8_t ByteCount = ByteCountUntyped; \
189 __ Inst(IceType_##OpType, Encoded_GPR_##Dst(), \ 189 __ Inst(IceType_##OpType, Encoded_GPR_##Dst(), Address::Absolute(Disp)); \
190 Address(Disp, AssemblerFixup::NoFixup)); \
191 ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \ 190 ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
192 ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \ 191 ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
193 << TestString; \ 192 << TestString; \
194 reset(); \ 193 reset(); \
195 } while (0) 194 } while (0)
196 195
197 #define TestRegAddrBase(Inst, Dst, Base, Disp, OpType, ByteCountUntyped, ...) \ 196 #define TestRegAddrBase(Inst, Dst, Base, Disp, OpType, ByteCountUntyped, ...) \
198 do { \ 197 do { \
199 static constexpr char TestString[] = \ 198 static constexpr char TestString[] = \
200 "(" #Inst ", " #Dst ", " #Base ", " #Disp ", " #OpType \ 199 "(" #Inst ", " #Dst ", " #Base ", " #Disp ", " #OpType \
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 EXPECT_FLOAT_EQ(1.0f, test.contentsOfDword<float>(S0)); 1132 EXPECT_FLOAT_EQ(1.0f, test.contentsOfDword<float>(S0));
1134 EXPECT_FLOAT_EQ(2.0f, test.contentsOfDword<float>(S1)); 1133 EXPECT_FLOAT_EQ(2.0f, test.contentsOfDword<float>(S1));
1135 EXPECT_FLOAT_EQ(3.0f, test.contentsOfDword<float>(S2)); 1134 EXPECT_FLOAT_EQ(3.0f, test.contentsOfDword<float>(S2));
1136 EXPECT_FLOAT_EQ(4.0f, test.contentsOfDword<float>(S3)); 1135 EXPECT_FLOAT_EQ(4.0f, test.contentsOfDword<float>(S3));
1137 } 1136 }
1138 1137
1139 } // end of anonymous namespace 1138 } // end of anonymous namespace
1140 } // end of namespace Test 1139 } // end of namespace Test
1141 } // end of namespace X8664 1140 } // end of namespace X8664
1142 } // end of namespace Ice 1141 } // end of namespace Ice
OLDNEW
« no previous file with comments | « unittest/AssemblerX8664/Locked.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698