mips.gni 1.9 KB

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