Index: test/cctest/test-cpu-x64.cc |
diff --git a/test/mjsunit/regress/regress-crbug-242870.js b/test/cctest/test-cpu-x64.cc |
similarity index 84% |
copy from test/mjsunit/regress/regress-crbug-242870.js |
copy to test/cctest/test-cpu-x64.cc |
index 7183375ca811cedc81c870d34e694e98cf727f9b..a2c45cf8621e7aabb1879620b7a897f5a5ca56b8 100644 |
--- a/test/mjsunit/regress/regress-crbug-242870.js |
+++ b/test/cctest/test-cpu-x64.cc |
@@ -25,19 +25,20 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --allow-natives-syntax |
+#include "v8.h" |
-var non_const_true = true; |
+#include "cctest.h" |
+#include "cpu.h" |
-function f() { |
- return (non_const_true || true && g()); |
-} |
+using namespace v8::internal; |
-function g() { |
- for (;;) {} |
-} |
-assertTrue(f()); |
-assertTrue(f()); |
-%OptimizeFunctionOnNextCall(f); |
-assertTrue(f()); |
+TEST(RequiredFeaturesX64) { |
+ // Test for the features required by every x64 CPU. |
+ CPU cpu; |
+ CHECK(cpu.has_fpu()); |
+ CHECK(cpu.has_cmov()); |
+ CHECK(cpu.has_mmx()); |
+ CHECK(cpu.has_sse()); |
+ CHECK(cpu.has_sse2()); |
+} |