Reviewers: Sven Panne,

Message:
Committed patchset #1 manually as r22746 (tree was closed).

Description:
Fix cctest/test-run-machops/RunLoadImmIndex

[email protected]

Committed: https://code.google.com/p/v8/source/detail?r=22746

Please review this at https://codereview.chromium.org/436533002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+7, -7 lines):
  M test/cctest/compiler/test-run-machops.cc


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.


--
--
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.

Reply via email to