ARM: Add GYP variables to control V8 code generation
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 4 May 2011 06:18:49 +0000 (06:18 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 4 May 2011 06:18:49 +0000 (06:18 +0000)
Added the GYP variables:
  v8_can_use_unaligned_accesses
  v8_use_arm_eabi_hardfloat

Refer to the comments in v8.gyp on their uses.

R=karlklose@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

SConstruct
tools/gyp/v8.gyp

index fb780a22a67dd7cf20c49656c459f8329f87abc4..0d01e7e5288e0783b20c2e77fd6c444c5113108e 100644 (file)
@@ -162,7 +162,7 @@ LIBRARY_FLAGS = {
         }
       },
       'armeabi:softfp' : {
-        'CPPDEFINES' : ['USE_EABI_HARDFLOAT=0'],
+        'CPPDEFINES' : ['USE_EABI_HARDFLOAT=0', 'CAN_USE_VFP_INSTRUCTIONS'],
         'simulator:none': {
           'CCFLAGS':     ['-mfloat-abi=softfp'],
         }
index 95b0b1cff8aa385be66ad0cbe951fd0384b897f2..0108b12ecfa1cba1455d6c4dba2e2ce588dcb3c3 100644 (file)
     'gcc_version%': 'unknown',
     'v8_compress_startup_data%': 'false',
     'v8_target_arch%': '<(target_arch)',
+
+    # Setting 'v8_can_use_unaligned_accesses' to 'true' will allow the code
+    # generated by V8 to do unaligned memory access, and setting it to 'false'
+    # will ensure that the generated code will always do aligned memory
+    # accesses. The default value of 'default' will try to determine the correct
+    # setting. Note that for Intel architectures (ia32 and x64) unaligned memory
+    # access is allowed for all CPUs.
+    'v8_can_use_unaligned_accesses%': 'default',
+
+    # Setting 'v8_can_use_vfp_instructions' to 'true' will enable use of ARM VFP
+    # instructions in the V8 generated code. VFP instructions will be enabled
+    # both for the snapshot and for the ARM target. Leaving the default value
+    # of 'false' will avoid VFP instructions in the snapshot and use CPU feature
+    # probing when running on the target.
     'v8_can_use_vfp_instructions%': 'false',
+
+    # Setting v8_use_arm_eabi_hardfloat to true will turn on V8 support for ARM
+    # EABI calling convention where double arguments are passed in VFP
+    # registers. Note that the GCC flag '-mfloat-abi=hard' should be used as
+    # well when compiling for the ARM target.
+    'v8_use_arm_eabi_hardfloat%': 'false',
+
     'v8_use_snapshot%': 'true',
     'v8_use_liveobjectlist%': 'false',
   },
                   'V8_TARGET_ARCH_ARM',
                 ],
                 'conditions': [
+                  [ 'v8_can_use_unaligned_accesses=="true"', {
+                    'defines': [
+                      'CAN_USE_UNALIGNED_ACCESSES=1',
+                    ],
+                  }],
+                  [ 'v8_can_use_unaligned_accesses=="false"', {
+                    'defines': [
+                      'CAN_USE_UNALIGNED_ACCESSES=0',
+                    ],
+                  }],
                   [ 'v8_can_use_vfp_instructions=="true"', {
                     'defines': [
                       'CAN_USE_VFP_INSTRUCTIONS',
                     ],
                   }],
+                  [ 'v8_use_arm_eabi_hardfloat=="true"', {
+                    'defines': [
+                      'USE_EABI_HARDFLOAT=1',
+                      'CAN_USE_VFP_INSTRUCTIONS',
+                    ],
+                  }],
                 ],
               }],
               ['v8_target_arch=="ia32"', {
               '../../src/regexp.js',
               '../../src/macros.py',
             ],
-           'experimental_library_files': [
-             '../../src/proxy.js',
+            'experimental_library_files': [
+              '../../src/proxy.js',
               '../../src/macros.py',
-           ],
+            ],
           },
           'actions': [
             {
                 '<@(library_files)'
               ],
             },
-           {
+            {
               'action_name': 'js2c_experimental',
               'inputs': [
                 '../../tools/js2c.py',