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

Unified Diff: test/cctest/test-cpu-x64.cc

Issue 23401002: Fix the CPU feature detection. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Improve cpuinfo parsing. Created 7 years, 4 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 | « test/cctest/test-cpu-ia32.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
+}
« no previous file with comments | « test/cctest/test-cpu-ia32.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698