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

Unified Diff: unittest/AssemblerX8664/GPRArith.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: make presubmit happy. 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 side-by-side diff with in-line comments
Download patch
Index: unittest/AssemblerX8664/GPRArith.cpp
diff --git a/unittest/AssemblerX8664/GPRArith.cpp b/unittest/AssemblerX8664/GPRArith.cpp
index 2ec85cc5aa5208542f4e8ec0c76ca55ffb8f4f01..2f297a7ad3fc07a0a2d7720bfc2434e5fabdaf75 100644
--- a/unittest/AssemblerX8664/GPRArith.cpp
+++ b/unittest/AssemblerX8664/GPRArith.cpp
@@ -328,19 +328,16 @@ TEST_F(AssemblerX8664LowLevelTest, LeaAbsolute) {
do { \
static constexpr char TestString[] = "(" #Dst ", " #Value ")"; \
__ lea(IceType_i32, GPRRegister::Encoded_Reg_##Dst, \
- Address(Value, AssemblerFixup::NoFixup)); \
- static constexpr uint32_t ByteCount = 8; \
+ Address::RipRelative(Value, AssemblerFixup::NoFixup)); \
+ static constexpr uint32_t ByteCount = 7; \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
static constexpr uint8_t Opcode = 0x8D; \
static constexpr uint8_t ModRM = \
/*mod*/ 0x00 | /*reg*/ (GPRRegister::Encoded_Reg_##Dst << 3) | \
- /*rm*/ GPRRegister::Encoded_Reg_esp; \
- static constexpr uint8_t SIB = \
- /*Scale*/ 0x00 | /*Index*/ (GPRRegister::Encoded_Reg_esp << 3) | \
- /*base*/ GPRRegister::Encoded_Reg_ebp; \
+ /*rm*/ GPRRegister::Encoded_Reg_rbp; \
ASSERT_TRUE(verifyBytes<ByteCount>( \
- codeBytes(), 0x67, Opcode, ModRM, SIB, (Value)&0xFF, \
- (Value >> 8) & 0xFF, (Value >> 16) & 0xFF, (Value >> 24) & 0xFF)); \
+ codeBytes(), 0x67, Opcode, ModRM, (Value)&0xFF, (Value >> 8) & 0xFF, \
+ (Value >> 16) & 0xFF, (Value >> 24) & 0xFF)); \
reset(); \
} while (0)

Powered by Google App Engine
This is Rietveld 408576698