1# Copyright 2015 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//build/config/v8_target_cpu.gni") 6 7# These are primarily relevant in current_cpu == "mips*" contexts, where 8# MIPS code is being compiled. But they can also be relevant in the 9# other contexts when the code will change its behavior based on the 10# cpu it wants to generate code for. 11declare_args() { 12 # MIPS MultiMedia Instruction compilation flag. 13 mips_use_mmi = false 14} 15 16if (current_cpu == "mipsel" || v8_current_cpu == "mipsel" || 17 current_cpu == "mips" || v8_current_cpu == "mips") { 18 declare_args() { 19 # MIPS arch variant. Possible values are: 20 # "r1" 21 # "r2" 22 # "r6" 23 # "loongson3" 24 mips_arch_variant = "r1" 25 26 # MIPS DSP ASE revision. Possible values are: 27 # 0: unavailable 28 # 1: revision 1 29 # 2: revision 2 30 mips_dsp_rev = 0 31 32 # MIPS SIMD Arch compilation flag. 33 mips_use_msa = false 34 35 # MIPS floating-point ABI. Possible values are: 36 # "hard": sets the GCC -mhard-float option. 37 # "soft": sets the GCC -msoft-float option. 38 mips_float_abi = "hard" 39 40 # MIPS32 floating-point register width. Possible values are: 41 # "fp32": sets the GCC -mfp32 option. 42 # "fp64": sets the GCC -mfp64 option. 43 # "fpxx": sets the GCC -mfpxx option. 44 mips_fpu_mode = "fp32" 45 } 46} else if (current_cpu == "mips64el" || v8_current_cpu == "mips64el" || 47 current_cpu == "mips64" || v8_current_cpu == "mips64") { 48 # MIPS arch variant. Possible values are: 49 # "r2" 50 # "r6" 51 # "loongson3" 52 if (current_os == "android" || target_os == "android") { 53 declare_args() { 54 mips_arch_variant = "r6" 55 56 # MIPS SIMD Arch compilation flag. 57 mips_use_msa = true 58 } 59 } else { 60 declare_args() { 61 mips_arch_variant = "r2" 62 63 # MIPS SIMD Arch compilation flag. 64 mips_use_msa = false 65 } 66 } 67} 68