Revision: 22746
Author: [email protected]
Date: Thu Jul 31 10:24:44 2014 UTC
Log: Fix cctest/test-run-machops/RunLoadImmIndex
[email protected]
Review URL: https://codereview.chromium.org/436533002
http://code.google.com/p/v8/source/detail?r=22746
Modified:
/branches/bleeding_edge/test/cctest/compiler/test-run-machops.cc
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-run-machops.cc Thu
Jul 31 07:44:29 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-run-machops.cc Thu
Jul 31 10:24:44 2014 UTC
@@ -2492,7 +2492,7 @@
}
-template <typename CType>
+template <typename Type, typename CType>
static void RunLoadImmIndex(MachineRepresentation rep) {
const int kNumElems = 3;
CType buffer[kNumElems];
@@ -2506,12 +2506,12 @@
// 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 @@
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.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.