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

Unified Diff: unittest/AssemblerX8664/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/AssemblerX8664/LowLevel.cpp
diff --git a/unittest/AssemblerX8664/LowLevel.cpp b/unittest/AssemblerX8664/LowLevel.cpp
index 3c87d8b540d3044447319872b88b0f906486f499..80f7104d7743b822ef1daad4d7815d1e6873a9f5 100644
--- a/unittest/AssemblerX8664/LowLevel.cpp
+++ b/unittest/AssemblerX8664/LowLevel.cpp
@@ -186,8 +186,8 @@ TEST_F(AssemblerX8664LowLevelTest, Cmp) {
"(" #Inst ", " #Dst ", " #Disp ", " #OpType ", " #ByteCountUntyped \
", " #__VA_ARGS__ ")"; \
static constexpr uint8_t ByteCount = ByteCountUntyped; \
- __ Inst(IceType_##OpType, Encoded_GPR_##Dst(), \
- Address(Address::ABSOLUTE, Disp)); \
+ static constexpr AssemblerFixup *Fixup = nullptr; \
+ __ Inst(IceType_##OpType, Encoded_GPR_##Dst(), Address(Disp, Fixup)); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
<< TestString; \
@@ -200,8 +200,9 @@ TEST_F(AssemblerX8664LowLevelTest, Cmp) {
"(" #Inst ", " #Dst ", " #Base ", " #Disp ", " #OpType \
", " #ByteCountUntyped ", " #__VA_ARGS__ ")"; \
static constexpr uint8_t ByteCount = ByteCountUntyped; \
+ static constexpr AssemblerFixup *Fixup = nullptr; \
__ Inst(IceType_##OpType, Encoded_GPR_##Dst(), \
- Address(Encoded_GPR_##Base(), Disp)); \
+ Address(Encoded_GPR_##Base(), Disp, Fixup)); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
<< TestString; \
@@ -215,8 +216,10 @@ TEST_F(AssemblerX8664LowLevelTest, Cmp) {
"(" #Inst ", " #Dst ", " #Index ", " #Scale ", " #Disp ", " #OpType \
", " #ByteCountUntyped ", " #__VA_ARGS__ ")"; \
static constexpr uint8_t ByteCount = ByteCountUntyped; \
- __ Inst(IceType_##OpType, Encoded_GPR_##Dst(), \
- Address(Encoded_GPR_##Index(), Traits::TIMES_##Scale, Disp)); \
+ static constexpr AssemblerFixup *Fixup = nullptr; \
+ __ Inst( \
+ IceType_##OpType, Encoded_GPR_##Dst(), \
+ Address(Encoded_GPR_##Index(), Traits::TIMES_##Scale, Disp, Fixup)); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
<< TestString; \
@@ -230,9 +233,10 @@ TEST_F(AssemblerX8664LowLevelTest, 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, Encoded_GPR_##Dst(), \
Address(Encoded_GPR_##Base(), Encoded_GPR_##Index(), \
- Traits::TIMES_##Scale, Disp)); \
+ Traits::TIMES_##Scale, Disp, Fixup)); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
<< TestString; \
@@ -246,9 +250,10 @@ TEST_F(AssemblerX8664LowLevelTest, 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(Encoded_GPR_##Base(), Encoded_GPR_##Index(), \
- Traits::TIMES_##Scale, Disp), \
+ Traits::TIMES_##Scale, Disp, Fixup), \
Immediate(Imm)); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \
@@ -263,9 +268,10 @@ TEST_F(AssemblerX8664LowLevelTest, 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(Encoded_GPR_##Base(), Encoded_GPR_##Index(), \
- Traits::TIMES_##Scale, Disp), \
+ Traits::TIMES_##Scale, Disp, Fixup), \
Encoded_GPR_##Src()); \
ASSERT_EQ(ByteCount, codeBytesSize()) << TestString; \
ASSERT_TRUE(verifyBytes<ByteCount>(codeBytes(), __VA_ARGS__)) \

Powered by Google App Engine
This is Rietveld 408576698