summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-03-26 10:58:05 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2017-03-26 10:58:15 +0200
commitfdbb45e6e88e49ceada4025ae893104160b4765a (patch)
treeade4fe6c4f6440c7e38683baa2bbda75ad3db24a
parent51a8de13b3b66f887c18df6f7feb132e19473b9f (diff)
split riscv arch support into riscv32/riscv64
-rw-r--r--rules.mk6
-rw-r--r--target/arch.lst3
-rw-r--r--target/config/Config.in.binutils9
-rw-r--r--target/config/Config.in.compiler9
-rw-r--r--target/config/Config.in.cpu16
-rw-r--r--target/config/Config.in.kernelversion34
-rw-r--r--target/config/Config.in.libc12
-rw-r--r--target/riscv32/Makefile (renamed from target/riscv/Makefile)0
-rw-r--r--toolchain/gcc/patches/git/riscv-preferred-mode-fix.patch19
9 files changed, 61 insertions, 47 deletions
diff --git a/rules.mk b/rules.mk
index d59a30f4e..0b49cdb01 100644
--- a/rules.mk
+++ b/rules.mk
@@ -99,6 +99,12 @@ endif
ifeq ($(ADK_TARGET_ARCH),hppa)
ADK_TARGET_KARCH:=parisc
endif
+ifeq ($(ADK_TARGET_ARCH),riscv32)
+ADK_TARGET_KARCH:=riscv
+endif
+ifeq ($(ADK_TARGET_ARCH),riscv64)
+ADK_TARGET_KARCH:=riscv
+endif
include $(ADK_TOPDIR)/mk/vars.mk
diff --git a/target/arch.lst b/target/arch.lst
index abd8c25d7..8fdcf39c3 100644
--- a/target/arch.lst
+++ b/target/arch.lst
@@ -27,7 +27,8 @@ nios2
or1k
ppc
ppc64
-riscv
+riscv32
+riscv64
rx
s390
sparc
diff --git a/target/config/Config.in.binutils b/target/config/Config.in.binutils
index 4e45af1df..551856796 100644
--- a/target/config/Config.in.binutils
+++ b/target/config/Config.in.binutils
@@ -20,14 +20,16 @@ config ADK_TOOLCHAIN_BINUTILS_2_28
depends on !ADK_TARGET_ARCH_ARC
depends on !ADK_TARGET_ARCH_AVR32
depends on !ADK_TARGET_ARCH_NDS32
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
config ADK_TOOLCHAIN_BINUTILS_2_27
bool "2.27"
depends on !ADK_TARGET_ARCH_ARC
depends on !ADK_TARGET_ARCH_AVR32
depends on !ADK_TARGET_ARCH_NDS32
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_CPU_CRIS_CRISV10
config ADK_TOOLCHAIN_BINUTILS_2_26_1
@@ -37,7 +39,8 @@ config ADK_TOOLCHAIN_BINUTILS_2_26_1
depends on !ADK_TARGET_ARCH_FRV
depends on !ADK_TARGET_ARCH_H8300
depends on !ADK_TARGET_ARCH_NDS32
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_SYSTEM_NUMATO_MIMASV2
config ADK_TOOLCHAIN_BINUTILS_NDS32
diff --git a/target/config/Config.in.compiler b/target/config/Config.in.compiler
index 90612b248..889aa972b 100644
--- a/target/config/Config.in.compiler
+++ b/target/config/Config.in.compiler
@@ -45,7 +45,8 @@ config ADK_TOOLCHAIN_GCC_6
depends on !ADK_TARGET_ARCH_METAG
depends on !ADK_TARGET_ARCH_NDS32
depends on !ADK_TARGET_ARCH_OR1K
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
select ADK_DISABLE_HONOUR_CFLAGS
config ADK_TOOLCHAIN_GCC_5
@@ -63,7 +64,8 @@ config ADK_TOOLCHAIN_GCC_5
depends on !ADK_TARGET_ARCH_NIOS2
depends on !ADK_TARGET_ARCH_OR1K
depends on !ADK_TARGET_ARCH_LM32
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_SYSTEM_KINETIS_K70
depends on !(ADK_TARGET_LIB_GLIBC && ADK_TARGET_ARCH_SH)
depends on !ADK_TARGET_CPU_MIPS_MIPS32R6
@@ -83,7 +85,8 @@ config ADK_TOOLCHAIN_GCC_4_9
depends on !ADK_TARGET_ARCH_NIOS2
depends on !ADK_TARGET_ARCH_OR1K
depends on !ADK_TARGET_ARCH_TILE
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_CPU_MIPS_MIPS32R6
depends on !ADK_TARGET_CPU_MIPS64_MIPS64R6
depends on !ADK_TARGET_SYSTEM_NUMATO_MIMASV2
diff --git a/target/config/Config.in.cpu b/target/config/Config.in.cpu
index 815f96695..5eadc4e92 100644
--- a/target/config/Config.in.cpu
+++ b/target/config/Config.in.cpu
@@ -1009,12 +1009,19 @@ config ADK_TARGET_CPU_PPC64_POWER8
depends on ADK_TARGET_ARCH_PPC64
# riscv
-config ADK_TARGET_CPU_RISCV
- bool "riscv"
+config ADK_TARGET_CPU_RISCV32
+ bool "riscv32"
select ADK_TARGET_SUPPORTS_THREADS
select ADK_TARGET_SUPPORTS_NPTL
select ADK_TARGET_WITH_MMU
- depends on ADK_TARGET_ARCH_RISCV
+ depends on ADK_TARGET_ARCH_RISCV32
+
+config ADK_TARGET_CPU_RISCV64
+ bool "riscv64"
+ select ADK_TARGET_SUPPORTS_THREADS
+ select ADK_TARGET_SUPPORTS_NPTL
+ select ADK_TARGET_WITH_MMU
+ depends on ADK_TARGET_ARCH_RISCV64
# rx
config ADK_TARGET_CPU_RX
@@ -2056,7 +2063,8 @@ config ADK_TARGET_CPU_ARCH
default "ppc" if ADK_TARGET_ARCH_PPC
default "ppc64le" if ADK_TARGET_ARCH_PPC64 && ADK_TARGET_LITTLE_ENDIAN
default "ppc64" if ADK_TARGET_ARCH_PPC64 && ADK_TARGET_BIG_ENDIAN
- default "riscv32" if ADK_TARGET_ARCH_RISCV
+ default "riscv32" if ADK_TARGET_ARCH_RISCV32
+ default "riscv64" if ADK_TARGET_ARCH_RISCV64
default "rx" if ADK_TARGET_ARCH_RX
default "s390x" if ADK_TARGET_ARCH_S390
default "sh" if ADK_TARGET_CPU_SH_SH && ADK_TARGET_LITTLE_ENDIAN
diff --git a/target/config/Config.in.kernelversion b/target/config/Config.in.kernelversion
index c28749dd4..4d2245265 100644
--- a/target/config/Config.in.kernelversion
+++ b/target/config/Config.in.kernelversion
@@ -13,13 +13,14 @@ default ADK_TARGET_KERNEL_VERSION_GIT if ADK_TARGET_ARCH_LM32
default ADK_TARGET_KERNEL_VERSION_4_4 if ADK_TARGET_ARCH_CRIS
default ADK_TARGET_KERNEL_VERSION_4_4 if ADK_TARGET_ARCH_METAG
default ADK_TARGET_KERNEL_VERSION_4_4 if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU
-default ADK_TARGET_KERNEL_VERSION_4_6 if ADK_TARGET_ARCH_RISCV
+default ADK_TARGET_KERNEL_VERSION_4_6 if ADK_TARGET_ARCH_RISCV32 || ADK_TARGET_ARCH_RISCV64
default ADK_TARGET_KERNEL_VERSION_4_9
config ADK_TARGET_KERNEL_VERSION_GIT
bool "git"
depends on !ADK_TARGET_ARCH_NDS32
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
select ADK_HOST_NEED_LZOP if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
select ADK_HOST_NEED_LZOP if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK
select ADK_TARGET_KERNEL_IMAGE if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
@@ -30,19 +31,21 @@ config ADK_TARGET_KERNEL_VERSION_4_9
depends on !ADK_TARGET_ARCH_CRIS
depends on !ADK_TARGET_ARCH_METAG
depends on !ADK_TARGET_ARCH_NDS32
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU
config ADK_TARGET_KERNEL_VERSION_4_6
bool "4.6.2"
- depends on ADK_TARGET_ARCH_RISCV
+ depends on ADK_TARGET_ARCH_RISCV32 || ADK_TARGET_ARCH_RISCV64
config ADK_TARGET_KERNEL_VERSION_4_4
bool "4.4.56"
depends on !ADK_TARGET_ARCH_NDS32
depends on !ADK_TARGET_ARCH_NIOS2
depends on !ADK_TARGET_ARCH_OR1K
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_CPU_MIPS_MIPS32R6
depends on !ADK_TARGET_CPU_MIPS64_MIPS64R6
depends on !ADK_TARGET_SYSTEM_NUMATO_MIMASV2
@@ -56,7 +59,8 @@ config ADK_TARGET_KERNEL_VERSION_4_1
depends on !ADK_TARGET_ARCH_NDS32
depends on !ADK_TARGET_ARCH_OR1K
depends on !ADK_TARGET_ARCH_SPARC
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_SYSTEM_KINETIS_K70
depends on !ADK_TARGET_SYSTEM_QEMU_M68K_MCF5208
depends on !ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU
@@ -71,7 +75,8 @@ config ADK_TARGET_KERNEL_VERSION_3_18
depends on !ADK_TARGET_ARCH_NDS32
depends on !ADK_TARGET_ARCH_NIOS2
depends on !ADK_TARGET_ARCH_OR1K
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_ARCH_SPARC
depends on !ADK_TARGET_BOARD_ATH79
depends on !ADK_TARGET_BOARD_BCM28XX
@@ -92,7 +97,8 @@ config ADK_TARGET_KERNEL_VERSION_3_12
depends on !ADK_TARGET_ARCH_NDS32
depends on !ADK_TARGET_ARCH_NIOS2
depends on !ADK_TARGET_ARCH_OR1K
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_ARCH_SPARC
depends on !ADK_TARGET_BOARD_ATH79
depends on !ADK_TARGET_BOARD_BCM28XX
@@ -112,7 +118,8 @@ config ADK_TARGET_KERNEL_VERSION_3_10
depends on !ADK_TARGET_ARCH_NDS32
depends on !ADK_TARGET_ARCH_NIOS2
depends on !ADK_TARGET_ARCH_OR1K
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_ARCH_SPARC
depends on !ADK_TARGET_BOARD_ATH79
depends on !ADK_TARGET_BOARD_BCM28XX
@@ -134,7 +141,8 @@ config ADK_TARGET_KERNEL_VERSION_3_4
depends on !ADK_TARGET_ARCH_NDS32
depends on !ADK_TARGET_ARCH_NIOS2
depends on !ADK_TARGET_ARCH_OR1K
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_ARCH_SPARC
depends on !ADK_TARGET_BOARD_ATH79
depends on !ADK_TARGET_BOARD_BCM28XX
@@ -159,7 +167,8 @@ config ADK_TARGET_KERNEL_VERSION_3_2
depends on !ADK_TARGET_ARCH_NDS32
depends on !ADK_TARGET_ARCH_NIOS2
depends on !ADK_TARGET_ARCH_OR1K
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_ARCH_SPARC
depends on !ADK_TARGET_BOARD_ATH79
depends on !ADK_TARGET_BOARD_BCM28XX
@@ -180,7 +189,8 @@ config ADK_TARGET_KERNEL_VERSION_2_6_32
depends on !ADK_TARGET_ARCH_NDS32
depends on !ADK_TARGET_ARCH_NIOS2
depends on !ADK_TARGET_ARCH_OR1K
- depends on !ADK_TARGET_ARCH_RISCV
+ depends on !ADK_TARGET_ARCH_RISCV32
+ depends on !ADK_TARGET_ARCH_RISCV64
depends on !ADK_TARGET_ARCH_SPARC
depends on !ADK_TARGET_BOARD_ATH79
depends on !ADK_TARGET_BOARD_BCM28XX
diff --git a/target/config/Config.in.libc b/target/config/Config.in.libc
index 7157c214c..806041b33 100644
--- a/target/config/Config.in.libc
+++ b/target/config/Config.in.libc
@@ -79,7 +79,8 @@ config ADK_TARGET_LIB_GLIBC
ADK_TARGET_CPU_SH_SH4A || \
ADK_TARGET_ARCH_SPARC64 || \
ADK_TARGET_ARCH_TILE || \
- ADK_TARGET_ARCH_RISCV || \
+ ADK_TARGET_ARCH_RISCV32 || \
+ ADK_TARGET_ARCH_RISCV64 || \
ADK_TARGET_ARCH_X86 || \
ADK_TARGET_ARCH_X86_64) && ADK_TARGET_OS_LINUX
help
@@ -111,7 +112,8 @@ config ADK_TARGET_LIB_NEWLIB
ADK_TARGET_ARCH_NDS32 || \
ADK_TARGET_ARCH_OR1K || \
ADK_TARGET_ARCH_PPC || \
- ADK_TARGET_ARCH_RISCV || \
+ ADK_TARGET_ARCH_RISCV32 || \
+ ADK_TARGET_ARCH_RISCV64 || \
ADK_TARGET_ARCH_RX || \
ADK_TARGET_ARCH_SH || \
ADK_TARGET_ARCH_SPARC || \
@@ -138,15 +140,15 @@ config ADK_TARGET_LIB_UCLIBC_NG_GIT
config ADK_TARGET_LIB_GLIBC_2_25
bool "2.25"
- depends on ADK_TARGET_LIB_GLIBC && !ADK_TARGET_ARCH_RISCV
+ depends on ADK_TARGET_LIB_GLIBC && !ADK_TARGET_ARCH_RISCV32 && !ADK_TARGET_ARCH_RISCV64
config ADK_TARGET_LIB_GLIBC_RISCV
bool "riscv"
- depends on ADK_TARGET_LIB_GLIBC && ADK_TARGET_ARCH_RISCV
+ depends on ADK_TARGET_LIB_GLIBC && ADK_TARGET_ARCH_RISCV32 || ADK_TARGET_ARCH_RISCV64
config ADK_TARGET_LIB_GLIBC_GIT
bool "git"
- depends on ADK_TARGET_LIB_GLIBC && !ADK_TARGET_ARCH_RISCV
+ depends on ADK_TARGET_LIB_GLIBC && !ADK_TARGET_ARCH_RISCV32 && !ADK_TARGET_ARCH_RISCV64
config ADK_TARGET_LIB_MUSL_1_1_16
bool "1.1.16"
diff --git a/target/riscv/Makefile b/target/riscv32/Makefile
index 30099fb55..30099fb55 100644
--- a/target/riscv/Makefile
+++ b/target/riscv32/Makefile
diff --git a/toolchain/gcc/patches/git/riscv-preferred-mode-fix.patch b/toolchain/gcc/patches/git/riscv-preferred-mode-fix.patch
deleted file mode 100644
index ebab5bbe4..000000000
--- a/toolchain/gcc/patches/git/riscv-preferred-mode-fix.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -Nur gcc-git.orig/gcc/config/riscv/riscv.c gcc-git/gcc/config/riscv/riscv.c
---- gcc-git.orig/gcc/config/riscv/riscv.c 2017-03-11 21:53:53.000000000 +0100
-+++ gcc-git/gcc/config/riscv/riscv.c 2017-03-11 22:11:38.830507954 +0100
-@@ -3634,8 +3634,13 @@
- static reg_class_t
- riscv_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, reg_class_t rclass)
- {
-- return reg_class_subset_p (FP_REGS, rclass) ? FP_REGS :
-- reg_class_subset_p (GR_REGS, rclass) ? GR_REGS :
-+ machine_mode mode = GET_MODE (x);
-+ if ((GET_MODE_CLASS (mode) == MODE_FLOAT
-+ || GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT)
-+ && reg_class_subset_p (FP_REGS, rclass))
-+ return FP_REGS;
-+
-+ return reg_class_subset_p (GR_REGS, rclass) ? GR_REGS :
- rclass;
- }
-