Commit 5486eb6b authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[Interpreter] Fix U16() calls in test-bytecode-generator for big endian.

Avoid double incrementing the variable in the U16() macro.

BUG=v8:4280
LOG=N

Review URL: https://codereview.chromium.org/1431803004

Cr-Commit-Position: refs/heads/master@{#31803}
parent 55e1cfeb
...@@ -771,7 +771,7 @@ TEST(HeapNumberConstants) { ...@@ -771,7 +771,7 @@ TEST(HeapNumberConstants) {
REPEAT_256(COMMA, // REPEAT_256(COMMA, //
B(LdaConstant), U8(wide_idx++), // B(LdaConstant), U8(wide_idx++), //
B(Star), R(0)), // B(Star), R(0)), //
B(LdaConstantWide), U16(wide_idx++), // B(LdaConstantWide), U16(wide_idx), //
B(Star), R(0), // B(Star), R(0), //
B(LdaUndefined), // B(LdaUndefined), //
B(Return), // B(Return), //
...@@ -944,7 +944,7 @@ TEST(PropertyLoads) { ...@@ -944,7 +944,7 @@ TEST(PropertyLoads) {
REPEAT_127(COMMA, // REPEAT_127(COMMA, //
B(LoadICSloppy), A(1, 2), U8(0), U8((wide_idx_1 += 2)), // B(LoadICSloppy), A(1, 2), U8(0), U8((wide_idx_1 += 2)), //
B(Star), R(0)), // B(Star), R(0)), //
B(LoadICSloppyWide), A(1, 2), U16(0), U16(wide_idx_1 += 2), // B(LoadICSloppyWide), A(1, 2), U16(0), U16(wide_idx_1 + 2), //
B(Return), // B(Return), //
}, },
1, 1,
...@@ -962,7 +962,7 @@ TEST(PropertyLoads) { ...@@ -962,7 +962,7 @@ TEST(PropertyLoads) {
REPEAT_127(COMMA, // REPEAT_127(COMMA, //
B(LoadICStrict), A(1, 2), U8(0), U8((wide_idx_2 += 2)), // B(LoadICStrict), A(1, 2), U8(0), U8((wide_idx_2 += 2)), //
B(Star), R(0)), // B(Star), R(0)), //
B(LoadICStrictWide), A(1, 2), U16(0), U16(wide_idx_2 += 2), // B(LoadICStrictWide), A(1, 2), U16(0), U16(wide_idx_2 + 2), //
B(Return), // B(Return), //
}, },
1, 1,
...@@ -982,7 +982,7 @@ TEST(PropertyLoads) { ...@@ -982,7 +982,7 @@ TEST(PropertyLoads) {
B(KeyedLoadICSloppy), A(1, 3), U8((wide_idx_3 += 2)), // B(KeyedLoadICSloppy), A(1, 3), U8((wide_idx_3 += 2)), //
B(Star), R(0)), // B(Star), R(0)), //
B(Ldar), A(2, 3), // B(Ldar), A(2, 3), //
B(KeyedLoadICSloppyWide), A(1, 3), U16(wide_idx_3 += 2), // B(KeyedLoadICSloppyWide), A(1, 3), U16(wide_idx_3 + 2), //
B(Return), // B(Return), //
}}, }},
{ {
...@@ -1000,7 +1000,7 @@ TEST(PropertyLoads) { ...@@ -1000,7 +1000,7 @@ TEST(PropertyLoads) {
B(KeyedLoadICStrict), A(1, 3), U8((wide_idx_4 += 2)), // B(KeyedLoadICStrict), A(1, 3), U8((wide_idx_4 += 2)), //
B(Star), R(0)), // B(Star), R(0)), //
B(Ldar), A(2, 3), // B(Ldar), A(2, 3), //
B(KeyedLoadICStrictWide), A(1, 3), U16(wide_idx_4 += 2), // B(KeyedLoadICStrictWide), A(1, 3), U16(wide_idx_4 + 2), //
B(Return), // B(Return), //
}}, }},
}; };
...@@ -1136,7 +1136,7 @@ TEST(PropertyStores) { ...@@ -1136,7 +1136,7 @@ TEST(PropertyStores) {
B(LdaSmi8), U8(1), // B(LdaSmi8), U8(1), //
B(StoreICSloppy), A(1, 2), U8(0), U8((wide_idx_1 += 2))), // B(StoreICSloppy), A(1, 2), U8(0), U8((wide_idx_1 += 2))), //
B(LdaSmi8), U8(2), // B(LdaSmi8), U8(2), //
B(StoreICSloppyWide), A(1, 2), U16(0), U16(wide_idx_1 += 2), // B(StoreICSloppyWide), A(1, 2), U16(0), U16(wide_idx_1 + 2), //
B(LdaUndefined), // B(LdaUndefined), //
B(Return), // B(Return), //
}, },
...@@ -1155,7 +1155,7 @@ TEST(PropertyStores) { ...@@ -1155,7 +1155,7 @@ TEST(PropertyStores) {
B(LdaSmi8), U8(1), // B(LdaSmi8), U8(1), //
B(StoreICStrict), A(1, 2), U8(0), U8((wide_idx_2 += 2))), // B(StoreICStrict), A(1, 2), U8(0), U8((wide_idx_2 += 2))), //
B(LdaSmi8), U8(2), // B(LdaSmi8), U8(2), //
B(StoreICStrictWide), A(1, 2), U16(0), U16(wide_idx_2 += 2), // B(StoreICStrictWide), A(1, 2), U16(0), U16(wide_idx_2 + 2), //
B(LdaUndefined), // B(LdaUndefined), //
B(Return), // B(Return), //
}, },
...@@ -1175,7 +1175,7 @@ TEST(PropertyStores) { ...@@ -1175,7 +1175,7 @@ TEST(PropertyStores) {
U8((wide_idx_3 += 2))), // U8((wide_idx_3 += 2))), //
B(LdaSmi8), U8(2), // B(LdaSmi8), U8(2), //
B(KeyedStoreICSloppyWide), A(1, 3), A(2, 3), // B(KeyedStoreICSloppyWide), A(1, 3), A(2, 3), //
U16(wide_idx_3 += 2), // U16(wide_idx_3 + 2), //
B(LdaUndefined), // B(LdaUndefined), //
B(Return), // B(Return), //
}}, }},
...@@ -1194,7 +1194,7 @@ TEST(PropertyStores) { ...@@ -1194,7 +1194,7 @@ TEST(PropertyStores) {
U8((wide_idx_4 += 2))), // U8((wide_idx_4 += 2))), //
B(LdaSmi8), U8(2), // B(LdaSmi8), U8(2), //
B(KeyedStoreICStrictWide), A(1, 3), A(2, 3), // B(KeyedStoreICStrictWide), A(1, 3), A(2, 3), //
U16(wide_idx_4 += 2), // U16(wide_idx_4 + 2), //
B(LdaUndefined), // B(LdaUndefined), //
B(Return), // B(Return), //
}}}; }}};
...@@ -1347,7 +1347,7 @@ TEST(LoadGlobal) { ...@@ -1347,7 +1347,7 @@ TEST(LoadGlobal) {
{ {
REPEAT_127(COMMA, // REPEAT_127(COMMA, //
B(LoadICSloppy), A(1, 2), U8(0), U8(wide_idx_1 += 2)), // B(LoadICSloppy), A(1, 2), U8(0), U8(wide_idx_1 += 2)), //
B(LdaGlobalSloppyWide), U16(1), U16(wide_idx_1 += 2), // B(LdaGlobalSloppyWide), U16(1), U16(wide_idx_1 + 2), //
B(Return), // B(Return), //
}, },
2, 2,
...@@ -1362,7 +1362,7 @@ TEST(LoadGlobal) { ...@@ -1362,7 +1362,7 @@ TEST(LoadGlobal) {
{ {
REPEAT_127(COMMA, // REPEAT_127(COMMA, //
B(LoadICStrict), A(1, 2), U8(0), U8(wide_idx_2 += 2)), // B(LoadICStrict), A(1, 2), U8(0), U8(wide_idx_2 += 2)), //
B(LdaGlobalStrictWide), U16(1), U16(wide_idx_2 += 2), // B(LdaGlobalStrictWide), U16(1), U16(wide_idx_2 + 2), //
B(Return), // B(Return), //
}, },
2, 2,
...@@ -1451,7 +1451,7 @@ TEST(StoreGlobal) { ...@@ -1451,7 +1451,7 @@ TEST(StoreGlobal) {
REPEAT_127(COMMA, // REPEAT_127(COMMA, //
B(LoadICSloppy), A(1, 2), U8(0), U8(wide_idx_1 += 2)), // B(LoadICSloppy), A(1, 2), U8(0), U8(wide_idx_1 += 2)), //
B(LdaSmi8), U8(2), // B(LdaSmi8), U8(2), //
B(StaGlobalSloppyWide), U16(1), U16(wide_idx_1 += 2), // B(StaGlobalSloppyWide), U16(1), U16(wide_idx_1 + 2), //
B(LdaUndefined), // B(LdaUndefined), //
B(Return), // B(Return), //
}, },
...@@ -1468,7 +1468,7 @@ TEST(StoreGlobal) { ...@@ -1468,7 +1468,7 @@ TEST(StoreGlobal) {
REPEAT_127(COMMA, // REPEAT_127(COMMA, //
B(LoadICStrict), A(1, 2), U8(0), U8(wide_idx_2 += 2)), // B(LoadICStrict), A(1, 2), U8(0), U8(wide_idx_2 += 2)), //
B(LdaSmi8), U8(2), // B(LdaSmi8), U8(2), //
B(StaGlobalStrictWide), U16(1), U16(wide_idx_2 += 2), // B(StaGlobalStrictWide), U16(1), U16(wide_idx_2 + 2), //
B(LdaUndefined), // B(LdaUndefined), //
B(Return), // B(Return), //
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment