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

Unified Diff: unittest/AssemblerX8632/LowLevel.cpp

Issue 1428443002: Enhance address mode recovery (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Streamline absolute addressing support (rip-relative on x64) Created 5 years, 2 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/AssemblerX8632/LowLevel.cpp
diff --git a/unittest/AssemblerX8632/LowLevel.cpp b/unittest/AssemblerX8632/LowLevel.cpp
index 7593b4c09333ea8c122760f78b63eb5f27acb5e4..9c7c1bbb86bdbbefdfa051f98ba977b807d24aa0 100644
--- a/unittest/AssemblerX8632/LowLevel.cpp
+++ b/unittest/AssemblerX8632/LowLevel.cpp
@@ -140,8 +140,9 @@ TEST_F(AssemblerX8632LowLevelTest, Cmp) {
"(" #Inst ", " #Dst ", " #Disp ", " #OpType ", " #ByteCountUntyped \
", " #__VA_ARGS__ ")"; \
static constexpr uint8_t ByteCount = ByteCountUntyped; \
+ static constexpr AssemblerFixup *Fixup = nullptr; \
__ Inst(IceType_##OpType, GPRRegister::Encoded_Reg_##Dst, \
- Address(Address::ABSOLUTE, Disp)); \
+ Address(Disp, Fixup)); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
<< TestString; \
@@ -154,8 +155,9 @@ TEST_F(AssemblerX8632LowLevelTest, Cmp) {
"(" #Inst ", " #Dst ", " #Base ", " #Disp ", " #OpType \
", " #ByteCountUntyped ", " #__VA_ARGS__ ")"; \
static constexpr uint8_t ByteCount = ByteCountUntyped; \
+ static constexpr AssemblerFixup *Fixup = nullptr; \
__ Inst(IceType_##OpType, GPRRegister::Encoded_Reg_##Dst, \
- Address(GPRRegister::Encoded_Reg_##Base, Disp)); \
+ Address(GPRRegister::Encoded_Reg_##Base, Disp, Fixup)); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
<< TestString; \
@@ -169,9 +171,10 @@ TEST_F(AssemblerX8632LowLevelTest, Cmp) {
"(" #Inst ", " #Dst ", " #Index ", " #Scale ", " #Disp ", " #OpType \
", " #ByteCountUntyped ", " #__VA_ARGS__ ")"; \
static constexpr uint8_t ByteCount = ByteCountUntyped; \
+ static constexpr AssemblerFixup *Fixup = nullptr; \
__ Inst(IceType_##OpType, GPRRegister::Encoded_Reg_##Dst, \
Address(GPRRegister::Encoded_Reg_##Index, Traits::TIMES_##Scale, \
- Disp)); \
+ Disp, Fixup)); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
<< TestString; \
@@ -185,10 +188,11 @@ TEST_F(AssemblerX8632LowLevelTest, Cmp) {
"(" #Inst ", " #Dst ", " #Base ", " #Index ", " #Scale ", " #Disp \
", " #OpType ", " #ByteCountUntyped ", " #__VA_ARGS__ ")"; \
static constexpr uint8_t ByteCount = ByteCountUntyped; \
+ static constexpr AssemblerFixup *Fixup = nullptr; \
__ Inst(IceType_##OpType, GPRRegister::Encoded_Reg_##Dst, \
Address(GPRRegister::Encoded_Reg_##Base, \
GPRRegister::Encoded_Reg_##Index, Traits::TIMES_##Scale, \
- Disp)); \
+ Disp, Fixup)); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
<< TestString; \
@@ -202,9 +206,10 @@ TEST_F(AssemblerX8632LowLevelTest, Cmp) {
"(" #Inst ", " #Base ", " #Index ", " #Scale ", " #Disp ", " #Imm \
", " #OpType ", " #ByteCountUntyped ", " #__VA_ARGS__ ")"; \
static constexpr uint8_t ByteCount = ByteCountUntyped; \
+ static constexpr AssemblerFixup *Fixup = nullptr; \
__ Inst(IceType_##OpType, Address(GPRRegister::Encoded_Reg_##Base, \
GPRRegister::Encoded_Reg_##Index, \
- Traits::TIMES_##Scale, Disp), \
+ Traits::TIMES_##Scale, Disp, Fixup), \
Immediate(Imm)); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
@@ -219,9 +224,10 @@ TEST_F(AssemblerX8632LowLevelTest, Cmp) {
"(" #Inst ", " #Base ", " #Index ", " #Scale ", " #Disp ", " #Src \
", " #OpType ", " #ByteCountUntyped ", " #__VA_ARGS__ ")"; \
static constexpr uint8_t ByteCount = ByteCountUntyped; \
+ static constexpr AssemblerFixup *Fixup = nullptr; \
__ Inst(IceType_##OpType, Address(GPRRegister::Encoded_Reg_##Base, \
GPRRegister::Encoded_Reg_##Index, \
- Traits::TIMES_##Scale, Disp), \
+ Traits::TIMES_##Scale, Disp, Fixup), \
GPRRegister::Encoded_Reg_##Src); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \

Powered by Google App Engine
This is Rietveld 408576698