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

Unified Diff: test/cctest/compiler/test-run-machops.cc

Issue 436533002: Fix cctest/test-run-machops/RunLoadImmIndex (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-machops.cc
diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc
index a4f915653fc150c928a80a69392557206e472366..9d947150e6c85c85be1b0fa36b071a8782c86783 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -2492,7 +2492,7 @@ TEST(RunDeadInt32Binops) {
}
-template <typename CType>
+template <typename Type, typename CType>
static void RunLoadImmIndex(MachineRepresentation rep) {
const int kNumElems = 3;
CType buffer[kNumElems];
@@ -2506,12 +2506,12 @@ static void RunLoadImmIndex(MachineRepresentation rep) {
// Test with various large and small offsets.
for (int offset = -1; offset <= 200000; offset *= -5) {
for (int i = 0; i < kNumElems; i++) {
- RawMachineAssemblerTester<CType> m;
+ RawMachineAssemblerTester<Type> m;
Node* base = m.PointerConstant(buffer - offset);
Node* index = m.Int32Constant((offset + i) * sizeof(buffer[0]));
m.Return(m.Load(rep, base, index));
- CHECK_EQ(buffer[i], m.Call());
+ CHECK_EQ(static_cast<Type>(buffer[i]), m.Call());
printf("XXX\n");
}
}
@@ -2519,10 +2519,10 @@ static void RunLoadImmIndex(MachineRepresentation rep) {
TEST(RunLoadImmIndex) {
- RunLoadImmIndex<int8_t>(kMachineWord8);
- RunLoadImmIndex<int16_t>(kMachineWord16);
- RunLoadImmIndex<int32_t>(kMachineWord32);
- RunLoadImmIndex<int32_t*>(kMachineTagged);
+ RunLoadImmIndex<int8_t, uint8_t>(kMachineWord8);
+ RunLoadImmIndex<int16_t, uint16_t>(kMachineWord16);
+ RunLoadImmIndex<int32_t, uint32_t>(kMachineWord32);
+ RunLoadImmIndex<int32_t*, int32_t*>(kMachineTagged);
// TODO(titzer): test kMachineFloat64 loads
// TODO(titzer): test various indexing modes.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698