Make ARM assembler VFP3 test pass on machines without VFP3 floating point hardware.
authorwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 25 Jan 2010 15:17:58 +0000 (15:17 +0000)
committerwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 25 Jan 2010 15:17:58 +0000 (15:17 +0000)
Review URL: http://codereview.chromium.org/543187

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/cctest/test-assembler-arm.cc

index 8bd9ab9..459b862 100644 (file)
@@ -242,7 +242,6 @@ TEST(4) {
   Label L, C;
 
 
-  ASSERT(CpuFeatures::IsSupported(VFP3));
   if (CpuFeatures::IsSupported(VFP3)) {
     CpuFeatures::Scope scope(VFP3);
 
@@ -261,26 +260,27 @@ TEST(4) {
     __ vstr(d4, r4, OFFSET_OF(T, b));
 
     __ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit());
-  }
-  CodeDesc desc;
-  assm.GetCode(&desc);
-  Object* code = Heap::CreateCode(desc,
-                                  NULL,
-                                  Code::ComputeFlags(Code::STUB),
-                                  Handle<Object>(Heap::undefined_value()));
-  CHECK(code->IsCode());
+
+    CodeDesc desc;
+    assm.GetCode(&desc);
+    Object* code = Heap::CreateCode(desc,
+                                    NULL,
+                                    Code::ComputeFlags(Code::STUB),
+                                    Handle<Object>(Heap::undefined_value()));
+    CHECK(code->IsCode());
 #ifdef DEBUG
-  Code::cast(code)->Print();
+    Code::cast(code)->Print();
 #endif
-  F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
-  t.a = 1.5;
-  t.b = 2.75;
-  t.c = 17.17;
-  Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
-  USE(dummy);
-  CHECK_EQ(4.25, t.c);
-  CHECK_EQ(4.25, t.b);
-  CHECK_EQ(1.5, t.a);
+    F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
+    t.a = 1.5;
+    t.b = 2.75;
+    t.c = 17.17;
+    Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
+    USE(dummy);
+    CHECK_EQ(4.25, t.c);
+    CHECK_EQ(4.25, t.b);
+    CHECK_EQ(1.5, t.a);
+  }
 }
 
 #undef __