OLD | NEW |
1 # Copyright 2013 the V8 project authors. All rights reserved. | 1 # Copyright 2013 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 [ 'arm_thumb==1', { | 216 [ 'arm_thumb==1', { |
217 'cflags': ['-mthumb',], | 217 'cflags': ['-mthumb',], |
218 }], | 218 }], |
219 [ 'arm_thumb==0', { | 219 [ 'arm_thumb==0', { |
220 'cflags': ['-marm',], | 220 'cflags': ['-marm',], |
221 }], | 221 }], |
222 ], | 222 ], |
223 }, { | 223 }, { |
224 # 'v8_target_arch!=target_arch' | 224 # 'v8_target_arch!=target_arch' |
225 # Target not built with an Arm CXX compiler (simulator build). | 225 # Target not built with an Arm CXX compiler (simulator build). |
| 226 'cflags': [ |
| 227 '-msse2', |
| 228 '-mfpmath=sse', |
| 229 '-mmmx', # Allows mmintrin.h for MMX intrinsics. |
| 230 ], |
226 'conditions': [ | 231 'conditions': [ |
227 [ 'arm_float_abi=="hard"', { | 232 [ 'arm_float_abi=="hard"', { |
228 'defines': [ | 233 'defines': [ |
229 'USE_EABI_HARDFLOAT=1', | 234 'USE_EABI_HARDFLOAT=1', |
230 ], | 235 ], |
231 }], | 236 }], |
232 [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', { | 237 [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', { |
233 'defines': [ | 238 'defines': [ |
234 'USE_EABI_HARDFLOAT=0', | 239 'USE_EABI_HARDFLOAT=0', |
235 ], | 240 ], |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 ['OS=="win" and v8_enable_prof==1', { | 810 ['OS=="win" and v8_enable_prof==1', { |
806 'msvs_settings': { | 811 'msvs_settings': { |
807 'VCLinkerTool': { | 812 'VCLinkerTool': { |
808 'GenerateMapFile': 'true', | 813 'GenerateMapFile': 'true', |
809 }, | 814 }, |
810 }, | 815 }, |
811 }], | 816 }], |
812 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ | 817 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ |
813 or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \ | 818 or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \ |
814 v8_target_arch=="ia32"', { | 819 v8_target_arch=="ia32"', { |
815 # All floating-point computations on x87 happens in 80-bit | |
816 # precision. Because the C and C++ language standards allow | |
817 # the compiler to keep the floating-point values in higher | |
818 # precision than what's specified in the source and doing so | |
819 # is more efficient than constantly rounding up to 64-bit or | |
820 # 32-bit precision as specified in the source, the compiler, | |
821 # especially in the optimized mode, tries very hard to keep | |
822 # values in x87 floating-point stack (in 80-bit precision) | |
823 # as long as possible. This has important side effects, that | |
824 # the real value used in computation may change depending on | |
825 # how the compiler did the optimization - that is, the value | |
826 # kept in 80-bit is different than the value rounded down to | |
827 # 64-bit or 32-bit. There are possible compiler options to | |
828 # make this behavior consistent (e.g. -ffloat-store would keep | |
829 # all floating-values in the memory, thus force them to be | |
830 # rounded to its original precision) but they have significant | |
831 # runtime performance penalty. | |
832 # | |
833 # -mfpmath=sse -msse2 makes the compiler use SSE instructions | |
834 # which keep floating-point values in SSE registers in its | |
835 # native precision (32-bit for single precision, and 64-bit | |
836 # for double precision values). This means the floating-point | |
837 # value used during computation does not change depending on | |
838 # how the compiler optimized the code, since the value is | |
839 # always kept in its specified precision. | |
840 # | |
841 # Refer to http://crbug.com/348761 for rationale behind SSE2 | |
842 # being a minimum requirement for 32-bit Linux builds and | |
843 # http://crbug.com/313032 for an example where this has "bit" | |
844 # us in the past. | |
845 'cflags': [ | 820 'cflags': [ |
846 '-msse2', | 821 '-msse2', |
847 '-mfpmath=sse', | 822 '-mfpmath=sse', |
848 '-mmmx', # Allows mmintrin.h for MMX intrinsics. | 823 '-mmmx', # Allows mmintrin.h for MMX intrinsics. |
849 ], | 824 ], |
850 }], | 825 }], |
851 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ | 826 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ |
852 or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \ | 827 or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \ |
853 (v8_target_arch=="arm" or v8_target_arch=="ia32" or \ | 828 (v8_target_arch=="arm" or v8_target_arch=="ia32" or \ |
854 v8_target_arch=="x87" or v8_target_arch=="mips" or \ | 829 v8_target_arch=="x87" or v8_target_arch=="mips" or \ |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 ['v8_enable_slow_dchecks==1', { | 1137 ['v8_enable_slow_dchecks==1', { |
1163 'defines': [ | 1138 'defines': [ |
1164 'ENABLE_SLOW_DCHECKS', | 1139 'ENABLE_SLOW_DCHECKS', |
1165 ], | 1140 ], |
1166 }], | 1141 }], |
1167 ], # conditions | 1142 ], # conditions |
1168 }, # Release | 1143 }, # Release |
1169 }, # configurations | 1144 }, # configurations |
1170 }, # target_defaults | 1145 }, # target_defaults |
1171 } | 1146 } |
OLD | NEW |