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

Unified Diff: test/unittests/compiler/mips/instruction-selector-mips-unittest.cc

Issue 2500863003: Revert of MIPS: Optimize load/store with large offset (Closed)
Patch Set: Created 4 years, 1 month 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/mips/assembler-mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/mips/instruction-selector-mips-unittest.cc
diff --git a/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc b/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc
index 9a17e642ef2c8063f43fe06ed75d7f83285baa6f..dc14b8536146a0f4f0947d0c26e060ce6c48503e 100644
--- a/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc
+++ b/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc
@@ -916,13 +916,14 @@
-87, -86, -82, -44, -23, -3, 0, 7, 10, 39, 52, 69, 71, 91, 92, 107, 109,
115, 124, 286, 655, 1362, 1569, 2587, 3067, 3096, 3462, 3510, 4095}}};
+
const MemoryAccessImm1 kMemoryAccessImmMoreThan16bit[] = {
{MachineType::Int8(),
kMipsLb,
kMipsSb,
&InstructionSelectorTest::Stream::IsInteger,
{-65000, -55000, 32777, 55000, 65000}},
- {MachineType::Uint8(),
+ {MachineType::Int8(),
kMipsLbu,
kMipsSb,
&InstructionSelectorTest::Stream::IsInteger,
@@ -932,7 +933,7 @@
kMipsSh,
&InstructionSelectorTest::Stream::IsInteger,
{-65000, -55000, 32777, 55000, 65000}},
- {MachineType::Uint16(),
+ {MachineType::Int16(),
kMipsLhu,
kMipsSh,
&InstructionSelectorTest::Stream::IsInteger,
@@ -1064,9 +1065,11 @@
StreamBuilder m(this, memacc.type, MachineType::Pointer());
m.Return(m.Load(memacc.type, m.Parameter(0), m.Int32Constant(index)));
Stream s = m.Build();
- ASSERT_EQ(1U, s.size());
- EXPECT_EQ(memacc.load_opcode, s[0]->arch_opcode());
- EXPECT_EQ(kMode_MRI, s[0]->addressing_mode());
+ ASSERT_EQ(2U, s.size());
+ // kMipsAdd is expected opcode.
+ // size more than 16 bits wide.
+ EXPECT_EQ(kMipsAdd, s[0]->arch_opcode());
+ EXPECT_EQ(kMode_None, s[0]->addressing_mode());
EXPECT_EQ(2U, s[0]->InputCount());
EXPECT_EQ(1U, s[0]->OutputCount());
}
@@ -1083,11 +1086,13 @@
m.Int32Constant(index), m.Parameter(1), kNoWriteBarrier);
m.Return(m.Int32Constant(0));
Stream s = m.Build();
- ASSERT_EQ(1U, s.size());
- EXPECT_EQ(memacc.store_opcode, s[0]->arch_opcode());
- EXPECT_EQ(kMode_MRI, s[0]->addressing_mode());
- EXPECT_EQ(3U, s[0]->InputCount());
- EXPECT_EQ(0, s[0]->OutputCount());
+ ASSERT_EQ(2U, s.size());
+ // kMipsAdd is expected opcode
+ // size more than 16 bits wide
+ EXPECT_EQ(kMipsAdd, s[0]->arch_opcode());
+ EXPECT_EQ(kMode_None, s[0]->addressing_mode());
+ EXPECT_EQ(2U, s[0]->InputCount());
+ EXPECT_EQ(1U, s[0]->OutputCount());
}
}
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698