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

Issue 11864002: Move CPU features into its own static library. (Closed)

Created:
7 years, 11 months ago by JF
Modified:
7 years, 11 months ago
Reviewers:
bsy, bsy_cr, Roland McGrath
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Move CPU features into its own static library. CPU features has outgrown its original x86-only roots and is used in more than just the validators. Move it out of there as a second step to cleaning up this code. The eventual goal is for CPU features to have similar interfaces for all CPUs, as well as for some features to work when host and target are different (e.g. validate an ARM nexe with a certain ARM feature set on an x86 box). This CL doesn't change any code beyond: - moving it; - updating the includes/include guards; - fixing silly build scripts. R= bsy@chromium.org Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=10590

Patch Set 1 #

Patch Set 2 : Fix gyp build. #

Patch Set 3 : Try fixing the platform quality gyp build on Windows. #

Patch Set 4 : Another go at Windows x64, with help from Noel. #

Total comments: 3

Patch Set 5 : Address bsy's comments by not building x86 target when host isn't x86. This is how things are curre… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -1322 lines) Patch
M SConstruct View 1 chunk +1 line, -0 lines 0 comments Download
M build/all.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M site_scons/site_tools/library_deps.py View 5 chunks +9 lines, -5 lines 0 comments Download
A + src/trusted/cpu_features/arch/arm/cpu_arm.h View 3 chunks +4 lines, -4 lines 0 comments Download
A + src/trusted/cpu_features/arch/arm/cpu_arm.c View 2 chunks +3 lines, -3 lines 0 comments Download
A + src/trusted/cpu_features/arch/arm/cpu_arm_features.h View 0 chunks +-1 lines, --1 lines 0 comments Download
A + src/trusted/cpu_features/arch/mips/cpu_mips.h View 3 chunks +4 lines, -4 lines 0 comments Download
A + src/trusted/cpu_features/arch/mips/cpu_mips.c View 2 chunks +3 lines, -3 lines 0 comments Download
A + src/trusted/cpu_features/arch/mips/cpu_mips_features.h View 0 chunks +-1 lines, --1 lines 0 comments Download
A + src/trusted/cpu_features/arch/x86/cpu_x86.h View 4 chunks +6 lines, -6 lines 0 comments Download
A + src/trusted/cpu_features/arch/x86/cpu_x86.c View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
A + src/trusted/cpu_features/arch/x86/cpu_x86_test.c View 1 chunk +4 lines, -4 lines 0 comments Download
A + src/trusted/cpu_features/arch/x86/cpu_xgetbv.S View 1 2 3 4 0 chunks +-1 lines, --1 lines 0 comments Download
A src/trusted/cpu_features/build.scons View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
A src/trusted/cpu_features/cpu_features.h View 1 chunk +24 lines, -0 lines 0 comments Download
A + src/trusted/cpu_features/cpu_features.gyp View 1 2 3 4 2 chunks +41 lines, -25 lines 0 comments Download
M src/trusted/platform_qualify/arch/x86/nacl_cpuwhitelist.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/platform_qualify/arch/x86/nacl_cpuwhitelist_test.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/platform_qualify/arch/x86/platform_qual_test.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/platform_qualify/arch/x86/vcpuid.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/platform_qualify/build.scons View 3 chunks +9 lines, -6 lines 0 comments Download
M src/trusted/platform_qualify/platform_qualify.gyp View 1 2 3 3 chunks +3 lines, -15 lines 0 comments Download
M src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/service_runtime/arch/x86_32/sel_ldr_x86_32.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/service_runtime/arch/x86_32/sel_rt_32.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/service_runtime/arch/x86_64/nacl_switch_to_app_64.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator/ncvalidate.h View 1 chunk +1 line, -7 lines 0 comments Download
M src/trusted/validator/validation_cache_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator/x86/32/ncvalidate_verbose.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator/x86/64/ncvalidate.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator/x86/64/ncvalidate_verbose.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator/x86/build.scons View 2 chunks +0 lines, -18 lines 0 comments Download
D src/trusted/validator/x86/nacl_cpuid.h View 1 chunk +0 lines, -154 lines 0 comments Download
D src/trusted/validator/x86/nacl_cpuid.c View 1 chunk +0 lines, -637 lines 0 comments Download
D src/trusted/validator/x86/nacl_cpuid_test.c View 1 chunk +0 lines, -44 lines 0 comments Download
D src/trusted/validator/x86/nacl_xgetbv.S View 1 chunk +0 lines, -31 lines 0 comments Download
M src/trusted/validator/x86/ncval_reg_sfi/nc_cpu_checks.h View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator/x86/ncval_reg_sfi/ncvalidate_iter.h View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator/x86/ncval_reg_sfi/ncvalidate_iter_internal.h View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator/x86/ncval_seg_sfi/ncvalidate.h View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator/x86/ncval_seg_sfi/ncvalidate_internaltypes.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/trusted/validator/x86/validate_x86.gyp View 1 2 3 4 chunks +3 lines, -2 lines 0 comments Download
M src/trusted/validator_arm/build.scons View 1 chunk +0 lines, -1 line 0 comments Download
D src/trusted/validator_arm/cpuid_arm.h View 1 chunk +0 lines, -64 lines 0 comments Download
D src/trusted/validator_arm/cpuid_arm.c View 1 chunk +0 lines, -87 lines 0 comments Download
D src/trusted/validator_arm/cpuid_arm_features.h View 1 chunk +0 lines, -15 lines 0 comments Download
M src/trusted/validator_arm/ncval.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator_arm/ncvalidate.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator_arm/validator.h View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator_arm/validator_arm.gyp View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/trusted/validator_mips/build.scons View 1 chunk +0 lines, -1 line 0 comments Download
D src/trusted/validator_mips/cpuid_mips.h View 1 chunk +0 lines, -62 lines 0 comments Download
D src/trusted/validator_mips/cpuid_mips.c View 1 chunk +0 lines, -78 lines 0 comments Download
D src/trusted/validator_mips/cpuid_mips_features.h View 1 chunk +0 lines, -16 lines 0 comments Download
M src/trusted/validator_mips/ncvalidate.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator_mips/validator_mips.gyp View 1 1 chunk +4 lines, -2 lines 0 comments Download
M src/trusted/validator_ragel/unreviewed/decoder.h View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator_ragel/unreviewed/validator_features_all.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator_ragel/unreviewed/validator_features_validator.c View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/validator_x86/ncval.c View 1 chunk +1 line, -1 line 0 comments Download
M tests/thread_capture/arch/x86_32/thread_capture_test_injection.c View 1 chunk +1 line, -1 line 0 comments Download
M tools/coverage_helper.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
JF
I seem to have gyp working now, PTAL.
7 years, 11 months ago (2013-01-11 20:49:33 UTC) #1
bsy
one nit. o/w lgtm. https://codereview.chromium.org/11864002/diff/10006/src/trusted/cpu_features/arch/x86/cpu_xgetbv.S File src/trusted/cpu_features/arch/x86/cpu_xgetbv.S (right): https://codereview.chromium.org/11864002/diff/10006/src/trusted/cpu_features/arch/x86/cpu_xgetbv.S#newcode33 src/trusted/cpu_features/arch/x86/cpu_xgetbv.S:33: #endif isn't this a tad ...
7 years, 11 months ago (2013-01-11 21:11:30 UTC) #2
Roland McGrath
https://codereview.chromium.org/11864002/diff/10006/src/trusted/cpu_features/arch/x86/cpu_xgetbv.S File src/trusted/cpu_features/arch/x86/cpu_xgetbv.S (right): https://codereview.chromium.org/11864002/diff/10006/src/trusted/cpu_features/arch/x86/cpu_xgetbv.S#newcode33 src/trusted/cpu_features/arch/x86/cpu_xgetbv.S:33: #endif In other cases we just put #error in ...
7 years, 11 months ago (2013-01-11 21:15:00 UTC) #3
bsy
https://codereview.chromium.org/11864002/diff/10006/src/trusted/cpu_features/arch/x86/cpu_xgetbv.S File src/trusted/cpu_features/arch/x86/cpu_xgetbv.S (right): https://codereview.chromium.org/11864002/diff/10006/src/trusted/cpu_features/arch/x86/cpu_xgetbv.S#newcode33 src/trusted/cpu_features/arch/x86/cpu_xgetbv.S:33: #endif the problem is that this is getting built ...
7 years, 11 months ago (2013-01-11 21:19:53 UTC) #4
JF
As discussed I changed things a bit so that ARM and MIPS target are built ...
7 years, 11 months ago (2013-01-12 00:15:19 UTC) #5
bsy
7 years, 11 months ago (2013-01-12 00:23:14 UTC) #6
lgtm if the bots dance.

Powered by Google App Engine
This is Rietveld 408576698