Commit 05069822 by Milko Leporis

[MIPS] Add support for mips32r1 arch variant

Change-Id: I37dfecd8c92f3f34c117432956d169f4b191c849 Reviewed-on: https://swiftshader-review.googlesource.com/c/23248Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarMilko Leporis <milko.leporis@mips.com>
parent 6d8d3c36
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
import("//build/config/c++/c++.gni") import("//build/config/c++/c++.gni")
import("//build/config/compiler/compiler.gni") import("//build/config/compiler/compiler.gni")
import("//build/config/mips.gni")
config("swiftshader_config") { config("swiftshader_config") {
defines = [] defines = []
...@@ -99,11 +100,19 @@ config("swiftshader_config") { ...@@ -99,11 +100,19 @@ config("swiftshader_config") {
} else if (target_cpu == "mipsel" && current_cpu == target_cpu) { } else if (target_cpu == "mipsel" && current_cpu == target_cpu) {
cflags += [ cflags += [
"-march=mipsel", "-march=mipsel",
"-mcpu=mips32r2",
"-fPIC", "-fPIC",
"-mhard-float", "-mhard-float",
"-mfp32", "-mfp32",
] ]
if (mips_arch_variant == "r1") {
cflags += [
"-mcpu=mips32",
]
} else {
cflags += [
"-mcpu=mips32r2",
]
}
} else if (target_cpu == "mips64el" && current_cpu == target_cpu) { } else if (target_cpu == "mips64el" && current_cpu == target_cpu) {
cflags += [ cflags += [
"-march=mips64el", "-march=mips64el",
...@@ -119,8 +128,16 @@ config("swiftshader_config") { ...@@ -119,8 +128,16 @@ config("swiftshader_config") {
if (target_cpu == "mipsel") { if (target_cpu == "mipsel") {
ldflags += [ ldflags += [
"-Wl,--hash-style=sysv", "-Wl,--hash-style=sysv",
"-mips32r2",
] ]
if (mips_arch_variant == "r1") {
ldflags += [
"-mips32",
]
} else {
ldflags += [
"-mips32r2",
]
}
} else if (target_cpu == "mips64el") { } else if (target_cpu == "mips64el") {
ldflags += [ ldflags += [
"-Wl,--hash-style=sysv", "-Wl,--hash-style=sysv",
......
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