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

Unified Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 1633153002: [interpreter] Reduce move operations for wide register support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove RegisterOperandIsMovable from RegisterMover interface 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
« no previous file with comments | « src/interpreter/register-translator.cc ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/interpreter/test-bytecode-generator.cc
diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc
index 17823340625c67ef6ac616771ae959fd034d0355..acd91182104ae49eee27df6ef17e305a669a90dd 100644
--- a/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/test/cctest/interpreter/test-bytecode-generator.cc
@@ -7298,11 +7298,10 @@ TEST(WideRegisters) {
"return x0;\n",
161 * kPointerSize,
1,
- 15,
+ 10,
{
B(MovWide), R16(131), R16(125), //
B(Ldar), R(125), //
- B(MovWide), R16(125), R16(131), //
B(Star), R(0), //
B(Return), //
}},
@@ -7310,42 +7309,35 @@ TEST(WideRegisters) {
"return x127;\n",
161 * kPointerSize,
1,
- 37,
+ 22,
{
B(MovWide), R16(130), R16(125), //
B(Ldar), R(125), //
- B(MovWide), R16(125), R16(130), //
- B(MovWide), R16(131), R16(125), //
B(Star), R(125), //
B(MovWide), R16(125), R16(131), //
B(MovWide), R16(131), R16(125), //
B(Ldar), R(125), //
- B(MovWide), R16(125), R16(131), //
B(Return), //
}},
{"if (x2 > 3) { return x129; }\n"
"return x128;\n",
162 * kPointerSize,
1,
- 56,
+ 36,
{
- B(Ldar), R(2), //
- B(MovWide), R16(161), R16(125), //
- B(Star), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(LdaSmi8), U8(3), //
- B(MovWide), R16(161), R16(125), //
- B(TestGreaterThan), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(JumpIfToBooleanFalse), U8(15), //
- B(MovWide), R16(133), R16(125), //
- B(Ldar), R(125), //
- B(MovWide), R16(125), R16(133), //
- B(Return), //
- B(MovWide), R16(132), R16(125), //
- B(Ldar), R(125), //
- B(MovWide), R16(125), R16(132), //
- B(Return), //
+ B(Ldar), R(2), //
+ B(Star), R(125), //
+ B(MovWide), R16(125), R16(161), //
+ B(LdaSmi8), U8(3), //
+ B(MovWide), R16(161), R16(125), //
+ B(TestGreaterThan), R(125), //
+ B(JumpIfFalse), U8(10), //
+ B(MovWide), R16(133), R16(125), //
+ B(Ldar), R(125), //
+ B(Return), //
+ B(MovWide), R16(132), R16(125), //
+ B(Ldar), R(125), //
+ B(Return), //
}},
{"var x0 = 0;\n"
"if (x129 == 3) { var x129 = x0; }\n"
@@ -7353,40 +7345,33 @@ TEST(WideRegisters) {
"return x129;\n",
162 * kPointerSize,
1,
- 103,
+ 68,
{
- B(LdaZero), //
- B(Star), R(0), //
- B(MovWide), R16(133), R16(125), //
- B(Ldar), R(125), //
- B(MovWide), R16(125), R16(133), //
- B(MovWide), R16(161), R16(125), //
- B(Star), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(LdaSmi8), U8(3), //
- B(MovWide), R16(161), R16(125), //
- B(TestEqual), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(JumpIfToBooleanFalse), U8(16), //
- B(Ldar), R(0), //
- B(MovWide), R16(133), R16(125), //
- B(Star), R(125), //
- B(MovWide), R16(125), R16(133), //
- B(Ldar), R(2), //
- B(MovWide), R16(161), R16(125), //
- B(Star), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(LdaSmi8), U8(3), //
- B(MovWide), R16(161), R16(125), //
- B(TestGreaterThan), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(JumpIfToBooleanFalse), U8(5), //
- B(Ldar), R(0), //
- B(Return), //
- B(MovWide), R16(133), R16(125), //
- B(Ldar), R(125), //
- B(MovWide), R16(125), R16(133), //
- B(Return), //
+ B(LdaZero), //
+ B(Star), R(0), //
+ B(MovWide), R16(133), R16(125), //
+ B(Ldar), R(125), //
+ B(Star), R(125), //
+ B(MovWide), R16(125), R16(161), //
+ B(LdaSmi8), U8(3), //
+ B(MovWide), R16(161), R16(125), //
+ B(TestEqual), R(125), //
+ B(JumpIfFalse), U8(11), //
+ B(Ldar), R(0), //
+ B(Star), R(125), //
+ B(MovWide), R16(125), R16(133), //
+ B(Ldar), R(2), //
+ B(Star), R(125), //
+ B(MovWide), R16(125), R16(161), //
+ B(LdaSmi8), U8(3), //
+ B(MovWide), R16(161), R16(125), //
+ B(TestGreaterThan), R(125), //
+ B(JumpIfFalse), U8(5), //
+ B(Ldar), R(0), //
+ B(Return), //
+ B(MovWide), R16(133), R16(125), //
+ B(Ldar), R(125), //
+ B(Return), //
}},
{"var x0 = 0;\n"
"var x1 = 0;\n"
@@ -7396,54 +7381,43 @@ TEST(WideRegisters) {
"return x128;\n",
162 * kPointerSize,
1,
- 152,
+ 97,
{
- B(LdaZero), //
- B(Star), R(0), //
- B(LdaZero), //
- B(Star), R(1), //
- B(LdaZero), //
- B(MovWide), R16(132), R16(125), //
- B(Star), R(125), //
- B(MovWide), R16(125), R16(132), //
- B(MovWide), R16(132), R16(125), //
- B(Ldar), R(125), //
- B(MovWide), R16(125), R16(132), //
- B(MovWide), R16(161), R16(125), //
- B(Star), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(LdaSmi8), U8(64), //
- B(MovWide), R16(161), R16(125), //
- B(TestLessThan), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(JumpIfToBooleanFalse), U8(82), //
- B(Ldar), R(1), //
- B(MovWide), R16(161), R16(125), //
- B(Star), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(MovWide), R16(132), R16(125), //
- B(Ldar), R(125), //
- B(MovWide), R16(125), R16(132), //
- B(MovWide), R16(161), R16(125), //
- B(Add), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(Star), R(1), //
- B(MovWide), R16(132), R16(125), //
- B(Ldar), R(125), //
- B(MovWide), R16(125), R16(132), //
- B(ToNumber), //
- B(MovWide), R16(161), R16(125), //
- B(Star), R(125), //
- B(MovWide), R16(125), R16(161), //
- B(Inc), //
- B(MovWide), R16(132), R16(125), //
- B(Star), R(125), //
- B(MovWide), R16(125), R16(132), //
- B(Jump), U8(-118), //
- B(MovWide), R16(132), R16(125), //
- B(Ldar), R(125), //
- B(MovWide), R16(125), R16(132), //
- B(Return), //
+ B(LdaZero), //
+ B(Star), R(0), //
+ B(LdaZero), //
+ B(Star), R(1), //
+ B(LdaZero), //
+ B(Star), R(125), //
+ B(MovWide), R16(125), R16(132), //
+ B(MovWide), R16(132), R16(125), //
+ B(Ldar), R(125), //
+ B(Star), R(125), //
+ B(MovWide), R16(125), R16(161), //
+ B(LdaSmi8), U8(64), //
+ B(MovWide), R16(161), R16(125), //
+ B(TestLessThan), R(125), //
+ B(JumpIfFalse), U8(52), //
+ B(Ldar), R(1), //
+ B(Star), R(125), //
+ B(MovWide), R16(125), R16(161), //
+ B(MovWide), R16(132), R16(125), //
+ B(Ldar), R(125), //
+ B(MovWide), R16(161), R16(125), //
+ B(Add), R(125), //
+ B(Star), R(1), //
+ B(MovWide), R16(132), R16(125), //
+ B(Ldar), R(125), //
+ B(ToNumber), //
+ B(Star), R(125), //
+ B(MovWide), R16(125), R16(161), //
+ B(Inc), //
+ B(Star), R(125), //
+ B(MovWide), R16(125), R16(132), //
+ B(Jump), U8(-73), //
+ B(MovWide), R16(132), R16(125), //
+ B(Ldar), R(125), //
+ B(Return), //
}},
{"var x0 = 1234;\n"
"var x1 = 0;\n"
@@ -7453,85 +7427,70 @@ TEST(WideRegisters) {
"return x1;\n",
167 * kPointerSize,
1,
- 159,
+ 109,
{
B(LdaConstant), U8(0), //
B(Star), R(0), //
B(LdaZero), //
B(Star), R(1), //
B(Ldar), R(0), //
- B(JumpIfUndefinedConstant), U8(3), //
- B(JumpIfNullConstant), U8(2), //
+ B(JumpIfUndefined), U8(97), //
+ B(JumpIfNull), U8(95), //
B(ToObject), //
- B(JumpIfNullConstant), U8(1), //
- B(MovWide), R16(161), R16(125), //
+ B(JumpIfNull), U8(92), //
B(Star), R(125), //
B(MovWide), R16(125), R16(161), //
B(ForInPrepareWide), R16(162), //
B(LdaZero), //
- B(MovWide), R16(165), R16(125), //
B(Star), R(125), //
B(MovWide), R16(125), R16(165), //
B(MovWide), R16(165), R16(125), //
B(MovWide), R16(164), R16(126), //
B(ForInDone), R(125), R(126), //
- B(MovWide), R16(126), R16(164), //
- B(MovWide), R16(125), R16(165), //
- B(JumpIfToBooleanTrue), U8(89), //
+ B(JumpIfTrue), U8(59), //
B(ForInNextWide), R16(161), R16(165), R16(162), //
- B(JumpIfUndefined), U8(54), //
- B(MovWide), R16(132), R16(125), //
+ B(JumpIfUndefined), U8(34), //
B(Star), R(125), //
B(MovWide), R16(125), R16(132), //
B(Ldar), R(1), //
- B(MovWide), R16(166), R16(125), //
B(Star), R(125), //
B(MovWide), R16(125), R16(166), //
B(MovWide), R16(132), R16(125), //
B(Ldar), R(125), //
- B(MovWide), R16(125), R16(132), //
B(MovWide), R16(166), R16(125), //
B(Add), R(125), //
- B(MovWide), R16(125), R16(166), //
B(Star), R(1), //
B(MovWide), R16(165), R16(125), //
B(ForInStep), R(125), //
- B(MovWide), R16(125), R16(165), //
- B(MovWide), R16(165), R16(125), //
B(Star), R(125), //
B(MovWide), R16(125), R16(165), //
- B(Jump), U8(-110), //
+ B(Jump), U8(-70), //
B(Ldar), R(1), //
B(Return), //
},
- 4,
- {1234, 142, 145, 147}},
+ 1,
+ {1234}},
{"x0 = %Add(x64, x63);\n"
"x1 = %Add(x27, x143);\n"
"%TheHole();\n"
"return x1;\n",
163 * kPointerSize,
1,
- 90,
+ 65,
{
B(Ldar), R(64), //
- B(MovWide), R16(161), R16(125), //
B(Star), R(125), //
B(MovWide), R16(125), R16(161), //
B(Ldar), R(63), //
- B(MovWide), R16(162), R16(125), //
B(Star), R(125), //
B(MovWide), R16(125), R16(162), //
B(CallRuntimeWide), U16(Runtime::kAdd), R16(161), U8(2), //
B(Star), R(0), //
B(Ldar), R(27), //
- B(MovWide), R16(161), R16(125), //
B(Star), R(125), //
B(MovWide), R16(125), R16(161), //
B(MovWide), R16(147), R16(125), //
B(Ldar), R(125), //
- B(MovWide), R16(125), R16(147), //
- B(MovWide), R16(162), R16(125), //
B(Star), R(125), //
B(MovWide), R16(125), R16(162), //
B(CallRuntimeWide), U16(Runtime::kAdd), R16(161), U8(2), //
« no previous file with comments | « src/interpreter/register-translator.cc ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698