Commit 64a60599 authored by sreten.kovacevic's avatar sreten.kovacevic Committed by Commit Bot

MIPS[64]: Add support for big endian build using GN

Chromium_BUG=616017
R=machenbach@chromium.org, dpranke@chromium.org, ivica.bogosavljevic@imgtec.com

Review-Url: https://codereview.chromium.org/2913353004
Cr-Commit-Position: refs/heads/master@{#45691}
parent 70f428bd
...@@ -337,8 +337,7 @@ config("toolchain") { ...@@ -337,8 +337,7 @@ config("toolchain") {
defines += [ "_MIPS_TARGET_SIMULATOR" ] defines += [ "_MIPS_TARGET_SIMULATOR" ]
} }
# TODO(jochen): Add support for mips. if (v8_current_cpu == "mipsel" || v8_current_cpu == "mips") {
if (v8_current_cpu == "mipsel") {
defines += [ "V8_TARGET_ARCH_MIPS" ] defines += [ "V8_TARGET_ARCH_MIPS" ]
if (v8_can_use_fpu_instructions) { if (v8_can_use_fpu_instructions) {
defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
...@@ -372,15 +371,17 @@ config("toolchain") { ...@@ -372,15 +371,17 @@ config("toolchain") {
# TODO(jochen): Add support for mips_arch_variant rx and loongson. # TODO(jochen): Add support for mips_arch_variant rx and loongson.
} }
# TODO(jochen): Add support for mips64. if (v8_current_cpu == "mips64el" || v8_current_cpu == "mips64") {
if (v8_current_cpu == "mips64el") {
defines += [ "V8_TARGET_ARCH_MIPS64" ] defines += [ "V8_TARGET_ARCH_MIPS64" ]
if (v8_can_use_fpu_instructions) { if (v8_can_use_fpu_instructions) {
defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
} }
# TODO(jochen): Add support for big endian host byteorder. if (host_byteorder == "little") {
defines += [ "V8_TARGET_ARCH_MIPS64_LE" ] defines += [ "V8_TARGET_ARCH_MIPS64_LE" ]
} else if (host_byteorder == "big") {
defines += [ "V8_TARGET_ARCH_MIPS64_BE" ]
}
if (v8_use_mips_abi_hardfloat) { if (v8_use_mips_abi_hardfloat) {
defines += [ defines += [
"__mips_hard_float=1", "__mips_hard_float=1",
......
...@@ -76,9 +76,11 @@ if (v8_snapshot_toolchain == "") { ...@@ -76,9 +76,11 @@ if (v8_snapshot_toolchain == "") {
if (v8_current_cpu == "x64" || v8_current_cpu == "x86") { if (v8_current_cpu == "x64" || v8_current_cpu == "x86") {
_cpus = v8_current_cpu _cpus = v8_current_cpu
} else if (v8_current_cpu == "arm64" || v8_current_cpu == "mips64el") { } else if (v8_current_cpu == "arm64" || v8_current_cpu == "mips64el" ||
v8_current_cpu == "mips64") {
_cpus = "x64_v8_${v8_current_cpu}" _cpus = "x64_v8_${v8_current_cpu}"
} else if (v8_current_cpu == "arm" || v8_current_cpu == "mipsel") { } else if (v8_current_cpu == "arm" || v8_current_cpu == "mipsel" ||
v8_current_cpu == "mips") {
_cpus = "x86_v8_${v8_current_cpu}" _cpus = "x86_v8_${v8_current_cpu}"
} else { } else {
# This branch should not be reached; leave _cpus blank so the assert # This branch should not be reached; leave _cpus blank so the assert
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment