| Index: unittest/AssemblerX8664/Locked.cpp
|
| diff --git a/unittest/AssemblerX8664/Locked.cpp b/unittest/AssemblerX8664/Locked.cpp
|
| index 9a0904de2898ec59c79401d89268f6fbd0092895..f6dc4948ada1d925c56a42bc75581bb5d002f3bb 100644
|
| --- a/unittest/AssemblerX8664/Locked.cpp
|
| +++ b/unittest/AssemblerX8664/Locked.cpp
|
| @@ -204,8 +204,8 @@ TEST_F(AssemblerX8664LowLevelTest, Xadd) {
|
|
|
| // Ensures that xadd emits a lock prefix accordingly.
|
| {
|
| - __ xadd(IceType_i8, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), NotLocked);
|
| + __ xadd(IceType_i8, Address::Absolute(0x1FF00), Encoded_GPR_r14(),
|
| + NotLocked);
|
| static constexpr uint8_t ByteCountNotLocked8 = 10;
|
| ASSERT_EQ(ByteCountNotLocked8, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountNotLocked8>(codeBytes(), 0x67, 0x44, 0x0F,
|
| @@ -213,8 +213,7 @@ TEST_F(AssemblerX8664LowLevelTest, Xadd) {
|
| 0x01, 0x00));
|
| reset();
|
|
|
| - __ xadd(IceType_i8, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), Locked);
|
| + __ xadd(IceType_i8, Address::Absolute(0x1FF00), Encoded_GPR_r14(), Locked);
|
| static constexpr uint8_t ByteCountLocked8 = 1 + ByteCountNotLocked8;
|
| ASSERT_EQ(ByteCountLocked8, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountLocked8>(codeBytes(), 0xF0, 0x67, 0x44,
|
| @@ -224,8 +223,8 @@ TEST_F(AssemblerX8664LowLevelTest, Xadd) {
|
| }
|
|
|
| {
|
| - __ xadd(IceType_i16, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), NotLocked);
|
| + __ xadd(IceType_i16, Address::Absolute(0x1FF00), Encoded_GPR_r14(),
|
| + NotLocked);
|
| static constexpr uint8_t ByteCountNotLocked16 = 11;
|
| ASSERT_EQ(ByteCountNotLocked16, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountNotLocked16>(codeBytes(), 0x66, 0x67, 0x44,
|
| @@ -233,8 +232,7 @@ TEST_F(AssemblerX8664LowLevelTest, Xadd) {
|
| 0xFF, 0x01, 0x00));
|
| reset();
|
|
|
| - __ xadd(IceType_i16, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), Locked);
|
| + __ xadd(IceType_i16, Address::Absolute(0x1FF00), Encoded_GPR_r14(), Locked);
|
| static constexpr uint8_t ByteCountLocked16 = 1 + ByteCountNotLocked16;
|
| ASSERT_EQ(ByteCountLocked16, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountLocked16>(codeBytes(), 0x66, 0xF0, 0x67,
|
| @@ -244,8 +242,8 @@ TEST_F(AssemblerX8664LowLevelTest, Xadd) {
|
| }
|
|
|
| {
|
| - __ xadd(IceType_i32, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), NotLocked);
|
| + __ xadd(IceType_i32, Address::Absolute(0x1FF00), Encoded_GPR_r14(),
|
| + NotLocked);
|
| static constexpr uint8_t ByteCountNotLocked32 = 10;
|
| ASSERT_EQ(ByteCountNotLocked32, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountNotLocked32>(codeBytes(), 0x67, 0x44, 0x0F,
|
| @@ -253,8 +251,7 @@ TEST_F(AssemblerX8664LowLevelTest, Xadd) {
|
| 0x01, 0x00));
|
| reset();
|
|
|
| - __ xadd(IceType_i32, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), Locked);
|
| + __ xadd(IceType_i32, Address::Absolute(0x1FF00), Encoded_GPR_r14(), Locked);
|
| static constexpr uint8_t ByteCountLocked32 = 1 + ByteCountNotLocked32;
|
| ASSERT_EQ(ByteCountLocked32, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountLocked32>(codeBytes(), 0xF0, 0x67, 0x44,
|
| @@ -337,14 +334,14 @@ TEST_F(AssemblerX8664LowLevelTest, Cmpxchg8b) {
|
| static constexpr bool Locked = true;
|
|
|
| // Ensures that cmpxchg8b emits a lock prefix accordingly.
|
| - __ cmpxchg8b(Address(0x1FF00, AssemblerFixup::NoFixup), NotLocked);
|
| + __ cmpxchg8b(Address::Absolute(0x1FF00), NotLocked);
|
| static constexpr uint8_t ByteCountNotLocked = 9;
|
| ASSERT_EQ(ByteCountNotLocked, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountNotLocked>(
|
| codeBytes(), 0x67, 0x0F, 0xC7, 0x0C, 0x25, 0x00, 0xFF, 0x01, 0x00));
|
| reset();
|
|
|
| - __ cmpxchg8b(Address(0x1FF00, AssemblerFixup::NoFixup), Locked);
|
| + __ cmpxchg8b(Address::Absolute(0x1FF00), Locked);
|
| static constexpr uint8_t ByteCountLocked = 1 + ByteCountNotLocked;
|
| ASSERT_EQ(ByteCountLocked, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountLocked>(codeBytes(), 0xF0, 0x67, 0x0F, 0xC7,
|
| @@ -444,8 +441,8 @@ TEST_F(AssemblerX8664LowLevelTest, Cmpxchg) {
|
|
|
| // Ensures that cmpxchg emits a lock prefix accordingly.
|
| {
|
| - __ cmpxchg(IceType_i8, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), NotLocked);
|
| + __ cmpxchg(IceType_i8, Address::Absolute(0x1FF00), Encoded_GPR_r14(),
|
| + NotLocked);
|
| static constexpr uint8_t ByteCountNotLocked8 = 10;
|
| ASSERT_EQ(ByteCountNotLocked8, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountNotLocked8>(codeBytes(), 0x67, 0x44, 0x0F,
|
| @@ -453,8 +450,8 @@ TEST_F(AssemblerX8664LowLevelTest, Cmpxchg) {
|
| 0x01, 0x00));
|
| reset();
|
|
|
| - __ cmpxchg(IceType_i8, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), Locked);
|
| + __ cmpxchg(IceType_i8, Address::Absolute(0x1FF00), Encoded_GPR_r14(),
|
| + Locked);
|
| static constexpr uint8_t ByteCountLocked8 = 1 + ByteCountNotLocked8;
|
| ASSERT_EQ(ByteCountLocked8, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountLocked8>(codeBytes(), 0xF0, 0x67, 0x44,
|
| @@ -464,8 +461,8 @@ TEST_F(AssemblerX8664LowLevelTest, Cmpxchg) {
|
| }
|
|
|
| {
|
| - __ cmpxchg(IceType_i16, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), NotLocked);
|
| + __ cmpxchg(IceType_i16, Address::Absolute(0x1FF00), Encoded_GPR_r14(),
|
| + NotLocked);
|
| static constexpr uint8_t ByteCountNotLocked16 = 11;
|
| ASSERT_EQ(ByteCountNotLocked16, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountNotLocked16>(codeBytes(), 0x66, 0x67, 0x44,
|
| @@ -473,8 +470,8 @@ TEST_F(AssemblerX8664LowLevelTest, Cmpxchg) {
|
| 0xFF, 0x01, 0x00));
|
| reset();
|
|
|
| - __ cmpxchg(IceType_i16, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), Locked);
|
| + __ cmpxchg(IceType_i16, Address::Absolute(0x1FF00), Encoded_GPR_r14(),
|
| + Locked);
|
| static constexpr uint8_t ByteCountLocked16 = 1 + ByteCountNotLocked16;
|
| ASSERT_EQ(ByteCountLocked16, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountLocked16>(codeBytes(), 0x66, 0xF0, 0x67,
|
| @@ -484,8 +481,8 @@ TEST_F(AssemblerX8664LowLevelTest, Cmpxchg) {
|
| }
|
|
|
| {
|
| - __ cmpxchg(IceType_i32, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), NotLocked);
|
| + __ cmpxchg(IceType_i32, Address::Absolute(0x1FF00), Encoded_GPR_r14(),
|
| + NotLocked);
|
| static constexpr uint8_t ByteCountNotLocked32 = 10;
|
| ASSERT_EQ(ByteCountNotLocked32, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountNotLocked32>(codeBytes(), 0x67, 0x44, 0x0F,
|
| @@ -493,8 +490,8 @@ TEST_F(AssemblerX8664LowLevelTest, Cmpxchg) {
|
| 0x01, 0x00));
|
| reset();
|
|
|
| - __ cmpxchg(IceType_i32, Address(0x1FF00, AssemblerFixup::NoFixup),
|
| - Encoded_GPR_r14(), Locked);
|
| + __ cmpxchg(IceType_i32, Address::Absolute(0x1FF00), Encoded_GPR_r14(),
|
| + Locked);
|
| static constexpr uint8_t ByteCountLocked32 = 1 + ByteCountNotLocked32;
|
| ASSERT_EQ(ByteCountLocked32, codeBytesSize());
|
| ASSERT_TRUE(verifyBytes<ByteCountLocked32>(codeBytes(), 0xF0, 0x67, 0x44,
|
|
|