Przeglądaj źródła

allow to select MIPSr2 ISA and Soft-Float for MIPS32

Waldemar Brodkorb 9 lat temu
rodzic
commit
671042b2e0

+ 1 - 0
Config.in

@@ -26,6 +26,7 @@ source "target/config/Config.in.system"
 source "target/config/Config.in.endian"
 source "target/config/Config.in.arm"
 source "target/config/Config.in.cris"
+source "target/config/Config.in.mips"
 source "target/config/Config.in.x86"
 source "target/config/Config.in.qemu"
 source "target/config/Config.in.qemuopts"

+ 3 - 0
target/config/Config.in.cpu

@@ -104,6 +104,9 @@ config ADK_CPU_M68K
 config ADK_CPU_MIPS32
 	boolean
 
+config ADK_CPU_MIPS32R2
+	boolean
+
 config ADK_CPU_MIPS64
 	boolean
 

+ 5 - 0
target/config/Config.in.mips

@@ -0,0 +1,5 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+source target/config/Config.in.mips.choice
+source target/config/Config.in.mips.default

+ 30 - 0
target/config/Config.in.mips.choice

@@ -0,0 +1,30 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+choice ADK_TARGET_MIPS_CPU_ARCH
+prompt "MIPS ISA"
+depends on ADK_TARGET_ARCH_MIPS
+
+config ADK_CPU_MIPS_MIPS32
+        bool "MIPS32"
+        select ADK_CPU_MIPS32
+
+config ADK_CPU_MIPS_MIPS32R2
+        bool "MIPS32r2"
+        select ADK_CPU_MIPS32R2
+
+endchoice
+
+choice ADK_TARGET_MIPS_FLOAT
+prompt "Float configuration"
+depends on ADK_TARGET_ARCH_MIPS
+
+config ADK_TARGET_MIPS_HARD_FLOAT
+	bool "hard-float"
+	select ADK_hard_float
+
+config ADK_TARGET_MIPS_SOFT_FLOAT
+	bool "soft-float"
+	select ADK_soft_float
+
+endchoice

+ 13 - 0
target/config/Config.in.mips.default

@@ -0,0 +1,13 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+config ADK_soft_float
+	bool
+
+config ADK_hard_float
+	bool
+
+config ADK_TARGET_FLOAT
+	string
+	default "hard" if ADK_hard_float
+	default "soft" if ADK_soft_float

+ 1 - 0
target/config/Config.in.target

@@ -25,6 +25,7 @@ config ADK_TARGET_CFLAGS
 	default "-mcpu=ultrasparc -m64" if ADK_CPU_SPARC_V9
 	default "-march=loongson2f -Wa,-mfix-loongson2f-nop" if ADK_CPU_LOONGSON2F
 	default "-march=mips32" if ADK_CPU_MIPS32
+	default "-march=mips32r2" if ADK_CPU_MIPS32R2
 	default "-march=mips64" if ADK_CPU_MIPS64
 	default "-march=armv8-a" if ADK_CPU_ARMV8
 	default "-march=armv5te -mtune=iwmmxt" if ADK_CPU_XSCALE

+ 0 - 1
target/mips/systems/qemu-mips

@@ -2,7 +2,6 @@ config ADK_TARGET_SYSTEM_QEMU_MIPS
 	bool "Qemu Emulator"
 	select ADK_mips
 	select ADK_qemu_mips
-	select ADK_CPU_MIPS32
 	select ADK_TARGET_QEMU
 	select ADK_TARGET_KERNEL_VMLINUZ
 	help

+ 4 - 0
toolchain/gcc/Makefile

@@ -119,6 +119,10 @@ GCC_CONFOPTS+=		--with-float=soft
 endif
 endif
 
+ifeq ($(ADK_TARGET_ARCH_MIPS),y)
+GCC_CONFOPTS+=		--with-float=$(ADK_TARGET_FLOAT)
+endif
+
 ifeq ($(ADK_TARGET_ARCH_ARM),y)
 GCC_CONFOPTS+=		--with-float=$(ADK_TARGET_FLOAT)
 ifneq ($(ADK_TARGET_FPU),)