summaryrefslogtreecommitdiffstats
path: root/meta/conf/machine/include
diff options
context:
space:
mode:
authorAndré Draszik <adraszik@tycoint.com>2016-06-10 16:12:38 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-12 23:47:18 +0100
commit7acb3db0b1a93977e67e4e31ff05c4b081e34d90 (patch)
treefc9870deafe2efb6dcf741fb56873f097fd1137c /meta/conf/machine/include
parentef35facd961255fd3fe41603a23a80d378d0a98b (diff)
downloadpoky-7acb3db0b1a93977e67e4e31ff05c4b081e34d90.tar.gz
mips: add a tune for using MIPS16e ASE instructions
The MIPS16e instruction set still has to be enabled by setting MIPS_INSTRUCTION_SET = 'mips16e' in e.g. distro.conf and can be disabled on a per-recipe basis as needed. This is a similar approach as is available on ARM for Thumb support. Note that contrary to the ARM Thumb support in OE, we do add a new OVERRIDE (mips16e), as there are some recipes in OE that need to be compiled slightly differently if mips16e mode is requested. (From OE-Core rev: e9d8b02a42eb08802e202770409cb5378b79b281) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/machine/include')
-rw-r--r--meta/conf/machine/include/mips/feature-mips-mips16e.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/conf/machine/include/mips/feature-mips-mips16e.inc b/meta/conf/machine/include/mips/feature-mips-mips16e.inc
new file mode 100644
index 0000000000..05011dec41
--- /dev/null
+++ b/meta/conf/machine/include/mips/feature-mips-mips16e.inc
@@ -0,0 +1,17 @@
1TUNEVALID[mips16e] = "Build target packages with MIPS16e ASE instructions"
2MIPS_MIPS16E_OPT = "${@['mno-mips16', 'mips16'][d.getVar('MIPS_INSTRUCTION_SET', True) == 'mips16e']}"
3TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ' -${MIPS_MIPS16E_OPT}', '', d)}"
4
5MIPSPKGSFX_MIPS16E .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', '-m16', '', d) if d.getVar('MIPS_MIPS16E_OPT', True) == 'mips16' else ''}"
6
7# Whether to compile with code to allow interworking between the two
8# instruction sets. This allows mips16e code to be executed on a primarily
9# mips32/64 system and vice versa. It is strongly recommended that DISTROs not
10# turn this off - the actual cost is very small.
11TUNEVALID[no-interlink-compressed] = "Disable mixing of standard and MIPS16e code"
12MIPS16_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-interlink-compressed', ' -mno-interlink-compressed', ' -minterlink-compressed', d)}"
13TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ' ${MIPS16_TUNE_CCARGS}', '', d)}"
14OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ':mips16e', '', d)}"
15
16# show status (if compiling in MIPS16e mode)
17BUILDCFG_VARS += "${@['', 'MIPS_INSTRUCTION_SET'][d.getVar('MIPS_INSTRUCTION_SET', True) == 'mips16e']}"