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

Unified Diff: src/trusted/validator/x86/nacl_cpuid_test.c

Issue 11864002: Move CPU features into its own static library. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Address bsy's comments by not building x86 target when host isn't x86. This is how things are curre… Created 7 years, 11 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 | « src/trusted/validator/x86/nacl_cpuid.c ('k') | src/trusted/validator/x86/nacl_xgetbv.S » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/validator/x86/nacl_cpuid_test.c
diff --git a/src/trusted/validator/x86/nacl_cpuid_test.c b/src/trusted/validator/x86/nacl_cpuid_test.c
deleted file mode 100644
index a676e482c5d6bee1e58b9fe6887ea3baa8b8344d..0000000000000000000000000000000000000000
--- a/src/trusted/validator/x86/nacl_cpuid_test.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2012 The Native Client Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef NACL_TRUSTED_BUT_NOT_TCB
-#error("This file is not meant for use in the TCB")
-#endif
-
-/*
- * nacl_cpuid_test.c
- * test main and subroutines for nacl_cpuid
- */
-#include "native_client/src/include/portability.h"
-#include <stdio.h>
-#include "native_client/src/trusted/validator/x86/nacl_cpuid.h"
-
-int main(int argc, char *argv[]) {
- NaClCPUFeaturesX86 fv;
- NaClCPUData cpu_data;
- int feature_id;
- NaClCPUDataGet(&cpu_data);
-
- NaClGetCurrentCPUFeaturesX86((NaClCPUFeatures *) &fv);
- if (NaClArchSupportedX86(&fv)) {
- printf("This is a native client %d-bit %s compatible computer\n",
- NACL_TARGET_SUBARCH, GetCPUIDString(&cpu_data));
- } else {
- if (!NaClGetCPUFeatureX86(&fv, NaClCPUFeatureX86_CPUIDSupported)) {
- printf("Computer doesn't support CPUID\n");
- }
- if (!NaClGetCPUFeatureX86(&fv, NaClCPUFeatureX86_CPUSupported)) {
- printf("Computer id %s is not supported\n", GetCPUIDString(&cpu_data));
- }
- }
-
- printf("This processor has:\n");
- for (feature_id = 0; feature_id < NaClCPUFeatureX86_Max; ++feature_id) {
- if (NaClGetCPUFeatureX86(&fv, feature_id))
- printf(" %s\n", NaClGetCPUFeatureX86Name(feature_id));
- }
- return 0;
-}
« no previous file with comments | « src/trusted/validator/x86/nacl_cpuid.c ('k') | src/trusted/validator/x86/nacl_xgetbv.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698