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

Side by Side Diff: src/trusted/validator/validation_cache_test.cc

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/trusted/validator/ncvalidate.h ('k') | src/trusted/validator/x86/32/ncvalidate_verbose.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include "gtest/gtest.h" 7 #include "gtest/gtest.h"
8 8
9 #include "native_client/src/include/nacl_compiler_annotations.h" 9 #include "native_client/src/include/nacl_compiler_annotations.h"
10 #include "native_client/src/shared/platform/nacl_log.h" 10 #include "native_client/src/shared/platform/nacl_log.h"
11 #include "native_client/src/shared/utils/types.h" 11 #include "native_client/src/shared/utils/types.h"
12 #include "native_client/src/trusted/validator/ncvalidate.h" 12 #include "native_client/src/trusted/validator/ncvalidate.h"
13 #include "native_client/src/trusted/validator/validation_cache.h" 13 #include "native_client/src/trusted/validator/validation_cache.h"
14 #include "native_client/src/trusted/validator/x86/nacl_cpuid.h" 14 #include "native_client/src/trusted/cpu_features/arch/x86/cpu_x86.h"
15 15
16 #define CONTEXT_MARKER 31 16 #define CONTEXT_MARKER 31
17 #define QUERY_MARKER 37 17 #define QUERY_MARKER 37
18 18
19 #define CODE_SIZE 32 19 #define CODE_SIZE 32
20 20
21 // ret 21 // ret
22 const char ret[CODE_SIZE + 1] = 22 const char ret[CODE_SIZE + 1] =
23 "\xc3\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" 23 "\xc3\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
24 "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"; 24 "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // Test driver function. 218 // Test driver function.
219 int main(int argc, char *argv[]) { 219 int main(int argc, char *argv[]) {
220 // The IllegalInst test touches the log mutex deep inside the validator. 220 // The IllegalInst test touches the log mutex deep inside the validator.
221 // This causes an SEH exception to be thrown on Windows if the mutex is not 221 // This causes an SEH exception to be thrown on Windows if the mutex is not
222 // initialized. 222 // initialized.
223 // http://code.google.com/p/nativeclient/issues/detail?id=1696 223 // http://code.google.com/p/nativeclient/issues/detail?id=1696
224 NaClLogModuleInit(); 224 NaClLogModuleInit();
225 testing::InitGoogleTest(&argc, argv); 225 testing::InitGoogleTest(&argc, argv);
226 return RUN_ALL_TESTS(); 226 return RUN_ALL_TESTS();
227 } 227 }
OLDNEW
« no previous file with comments | « src/trusted/validator/ncvalidate.h ('k') | src/trusted/validator/x86/32/ncvalidate_verbose.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698