ARM: Changed the handling of compiletime CPU feature detection
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 3 May 2011 06:51:59 +0000 (06:51 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 3 May 2011 06:51:59 +0000 (06:51 +0000)
commit01707c71065afb9365db3d96168117f740aded06
treef0cdd8e62bc805a7bc1203c143a60e61da4ebaf4
parent8aeaa5e90a94b26c58b39c1aec7b4f69107d2727
ARM: Changed the handling of compiletime CPU feature detection

Always use CpuFeaturesImpliedByCompiler() when selecting CPU features. This checks both for CAN_USE_ARMV7_INSTRUCTIONS and CAN_USE_VFP_INSTRUCTIONS and for GCC preprocessor symbols. This will support using the CAN_USE_XXX for a simulator build used for generating a snapshot followed by a crosscompile using -march= and -mfpu= for selecting the (minimal) target device CPU features. The snapshot will use instructions based on the CAN_USE_XXX whereas the target will at least use features based on both CAN_USE_XXX and -march= and -mfpu=, but will try runtime CPU feature detection a well looking for somethis better.

Remove the compiler based CPU feature detection from the OS::CpuFeaturesImpliedByPlatform() as it did not belong there. Also was already in the CpuFeaturesImpliedByCompiler().

Add the variable 'v8_can_use_vfp_instructions' to the GYP file which can be used to turn on CAN_USE_VFP_INSTRUCTIONS when building V8. I did not add any -mfpu= cflags for this, as there are several options here (e.g. vfp and neon).

R=erik.corry@gmail.com, karlklose@chromium.org

BUG=none
TEST=none

Review URL: http://codereview.chromium.org//6904164

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
.gitignore
src/arm/assembler-arm.cc
src/platform-linux.cc
tools/gyp/v8.gyp