summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>2016-10-04 12:31:21 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-07 16:43:57 +0100
commit8be92dcd5979a9cae55342b7493b36497de97fea (patch)
tree9718fd5c7fdcaa8d1fe163b1cda560e7cd45b468
parent559f52fe9cce0614d1523e735860f055cbb99b4d (diff)
downloadpoky-8be92dcd5979a9cae55342b7493b36497de97fea.tar.gz
arch-mips: Add mipsisa{32, 64}r6{el, } tunes
Add support for MIPS Release 6 ISA and the various tune configurations. This patch adds the tunes for 32r6 and 64r6 n64 and not the n32 variants at the moment. Release 6 onwards, the tuples are now - mipsisa32r6-linux-gnu - mipsisa32r6el-linux-gnu - mipsisa64r6-linux-gnuabi64 - mipsisa64r6el-linux-gnuabi64 - mipsisa64r6-linux-gnuabin32 - mipsisa64r6el-linux-gnuabin32 For more details, check https://wiki.debian.org/Multiarch/Tuples (From OE-Core rev: 6b2e0c60c3222a13b33284f258d5c340222d759f) Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/machine/include/mips/README19
-rw-r--r--meta/conf/machine/include/mips/arch-mips.inc10
-rw-r--r--meta/conf/machine/include/tune-mips32r6.inc29
-rw-r--r--meta/conf/machine/include/tune-mips64r6.inc32
4 files changed, 88 insertions, 2 deletions
diff --git a/meta/conf/machine/include/mips/README b/meta/conf/machine/include/mips/README
index c375f316df..62fa1561ba 100644
--- a/meta/conf/machine/include/mips/README
+++ b/meta/conf/machine/include/mips/README
@@ -1,3 +1,6 @@
12016/09/30 - Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
2 - Add Release 6 support
3
12012/03/30 - Mark Hatle <mark.hatle@windriver.com> 42012/03/30 - Mark Hatle <mark.hatle@windriver.com>
2 - Initial Version 5 - Initial Version
3 6
@@ -6,9 +9,14 @@ MIPS currently defines 12 ABIs. Combinations of:
6 *) Hardware/Software Floating Point 9 *) Hardware/Software Floating Point
7 *) o32, n32, n64 ABI 10 *) o32, n32, n64 ABI
8 11
12Release 6 of the ISA is a major revision and doesn't build up on previous
13releases of the ISA.
14
15For more details about tuples, check https://wiki.debian.org/Multiarch/Tuples
16
9TUNE_ARCH, the GNU canonical arch, is defined as: 17TUNE_ARCH, the GNU canonical arch, is defined as:
10 18
11mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN} 19"mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}"
12 20
13The package arch is defined in such a way to generated a standard naming 21The package arch is defined in such a way to generated a standard naming
14scheme. The scheme is: <mips variant>[-nf][-n32] 22scheme. The scheme is: <mips variant>[-nf][-n32]
@@ -34,3 +42,12 @@ that the tune is using a non-floating point ABI.
34MIPSPKGSFX_ABI - This is used to specify an alternative ABI when the previous 42MIPSPKGSFX_ABI - This is used to specify an alternative ABI when the previous
35values are not enough to distringuish the package. "-n32" is added when 43values are not enough to distringuish the package. "-n32" is added when
36building for N32 ABI. 44building for N32 ABI.
45
46MIPSPKGSFX_R6 - This is used to specify the presence of release 6.
47"r6" is added in the tuple for release 6 of the isa.
48
49MIPSPKGSFX_64R6 - This is used to specify "isa" in the tuple.
50Release 6 onwards we use "mipsisa64" instead of just "mips64".
51
52MIPSPKGSFX_32R6 - This is used to specify "isa32" in the tuple.
53Release 6 onwards we use "mipsisa32" instead of just "mips".
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
index 28d3b51b05..50c4c82683 100644
--- a/meta/conf/machine/include/mips/arch-mips.inc
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -32,14 +32,22 @@ TUNEVALID[fpu-hard] = "Use hardware FPU"
32TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', ' -mhard-float', ' -msoft-float', d)}" 32TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', ' -mhard-float', ' -msoft-float', d)}"
33TARGET_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '', 'soft', d)}" 33TARGET_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '', 'soft', d)}"
34 34
35# MIPS r6 ABI
36TUNEVALID[r6] = "Use r6"
37TUNEVALID[mipsisa64r6] = "Use 64r6"
38TUNEVALID[mipsisa32r6] = "Use 32r6"
39
35# Package naming 40# Package naming
36MIPSPKGSFX_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el', d)}" 41MIPSPKGSFX_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el', d)}"
37MIPSPKGSFX_BYTE = "${@bb.utils.contains('TUNE_FEATURES', 'n64' , '64', '', d)}" 42MIPSPKGSFX_BYTE = "${@bb.utils.contains('TUNE_FEATURES', 'n64' , '64', '', d)}"
38MIPSPKGSFX_BYTE .= "${@bb.utils.contains('TUNE_FEATURES', 'n32' , '64', '', d)}" 43MIPSPKGSFX_BYTE .= "${@bb.utils.contains('TUNE_FEATURES', 'n32' , '64', '', d)}"
39MIPSPKGSFX_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard' , '', '-nf', d)}" 44MIPSPKGSFX_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard' , '', '-nf', d)}"
40MIPSPKGSFX_ABI = "${@bb.utils.contains('TUNE_FEATURES', 'n32', '-n32', '', d)}" 45MIPSPKGSFX_ABI = "${@bb.utils.contains('TUNE_FEATURES', 'n32', '-n32', '', d)}"
46MIPSPKGSFX_R6 = "${@bb.utils.contains('TUNE_FEATURES', 'r6', 'r6', '', d)}"
47MIPSPKGSFX_64R6 = "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', 'isa', '', d)}"
48MIPSPKGSFX_32R6 = "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa32r6', 'isa32', '', d)}"
41 49
42TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}" 50TUNE_ARCH = "mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}"
43TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}" 51TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
44 52
45# Base tunes 53# Base tunes
diff --git a/meta/conf/machine/include/tune-mips32r6.inc b/meta/conf/machine/include/tune-mips32r6.inc
new file mode 100644
index 0000000000..47213198c4
--- /dev/null
+++ b/meta/conf/machine/include/tune-mips32r6.inc
@@ -0,0 +1,29 @@
1DEFAULTTUNE ?= "mipsisa32r6el"
2
3require conf/machine/include/mips/arch-mips.inc
4
5TUNEVALID[mipsisa32r6] = "Enable mipsisa32r6 specific processor optimizations"
6TUNECONFLICTS[mipsisa32r6] = "n64 n32"
7TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa32r6', ' -march=mips32r6', '', d)}"
8
9# Base Tunes
10AVAILTUNES += "mipsisa32r6 mipsisa32r6el"
11
12TUNE_FEATURES_tune-mipsisa32r6 = "bigendian mipsisa32r6 fpu-hard r6"
13MIPSPKGSFX_VARIANT_tune-mipsisa32r6 = "${TUNE_ARCH}"
14PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6 = "mipsisa32r6"
15
16TUNE_FEATURES_tune-mipsisa32r6el = "fpu-hard mipsisa32r6 r6"
17MIPSPKGSFX_VARIANT_tune-mipsisa32r6el = "${TUNE_ARCH}"
18PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6el = "mipsisa32r6el"
19
20# Soft Float
21AVAILTUNES += "mipsisa32r6-nf mipsisa32r6el-nf"
22
23TUNE_FEATURES_tune-mipsisa32r6-nf = "bigendian mipsisa32r6 r6"
24MIPSPKGSFX_VARIANT_tune-mipsisa32r6-nf = "${TUNE_ARCH}"
25PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6-nf = "mipsisa32r6-nf"
26
27TUNE_FEATURES_tune-mipsisa32r6el-nf = "mipsisa32r6 r6"
28MIPSPKGSFX_VARIANT_tune-mipsisa32r6el-nf = "${TUNE_ARCH}"
29PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6el-nf = "mipsisa32r6el-nf"
diff --git a/meta/conf/machine/include/tune-mips64r6.inc b/meta/conf/machine/include/tune-mips64r6.inc
new file mode 100644
index 0000000000..f0ad564686
--- /dev/null
+++ b/meta/conf/machine/include/tune-mips64r6.inc
@@ -0,0 +1,32 @@
1DEFAULTTUNE ?= "mipsisa64r6el"
2
3require conf/machine/include/mips/arch-mips.inc
4
5TUNEVALID[mipsisa64r6] = "Enable mipsisa64r6 specific processor optimizations"
6TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', ' -march=mips64r6', '', d)}"
7
8# Base Tunes
9AVAILTUNES += "mipsisa64r6 mipsisa64r6el"
10
11TUNE_FEATURES_tune-mipsisa64r6 = "bigendian fpu-hard n64 mipsisa64r6 r6"
12MIPSPKGSFX_VARIANT_tune-mipsisa64r6 = "${TUNE_ARCH}"
13BASE_LIB_tune-mipsisa64r6 = "lib64"
14PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6 = "mipsisa64r6"
15
16TUNE_FEATURES_tune-mipsisa64r6el = "fpu-hard r6 n64 mipsisa64r6"
17MIPSPKGSFX_VARIANT_tune-mipsisa64r6el = "${TUNE_ARCH}"
18BASE_LIB_tune-mipsisa64r6el = "lib64"
19PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6el = "mipsisa64r6el"
20
21# Soft Float
22AVAILTUNES += "mipsisa64r6-nf mipsisa64r6el-nf"
23
24TUNE_FEATURES_tune-mipsisa64r6-nf = "bigendian r6 n64 mipsisa64r6"
25MIPSPKGSFX_VARIANT_tune-mipsisa64r6-nf = "${TUNE_ARCH}"
26BASE_LIB_tune-mipsisa64r6-nf = "lib64"
27PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6-nf = "mipsisa64r6"
28
29TUNE_FEATURES_tune-mipsisa64r6el-nf = "r6 n64 mipsisa64r6"
30MIPSPKGSFX_VARIANT_tune-mipsisa64r6el-nf = "${TUNE_ARCH}"
31BASE_LIB_tune-mipsisa64r6el-nf = "lib64"
32PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6el-nf = "mipsisa64r6el-nf"