[oe-commits] [openembedded-core] 42/47: mips: add a tune for using MIPS16e ASE instructions

git at git.openembedded.org git at git.openembedded.org
Sun Jun 12 22:48:24 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit e9d8b02a42eb08802e202770409cb5378b79b281
Author: André Draszik <adraszik at tycoint.com>
AuthorDate: Fri Jun 10 16:12:38 2016 +0100

    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.
    
    Signed-off-by: André Draszik <adraszik at tycoint.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/conf/machine/include/mips/feature-mips-mips16e.inc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

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 0000000..05011de
--- /dev/null
+++ b/meta/conf/machine/include/mips/feature-mips-mips16e.inc
@@ -0,0 +1,17 @@
+TUNEVALID[mips16e] = "Build target packages with MIPS16e ASE instructions"
+MIPS_MIPS16E_OPT = "${@['mno-mips16', 'mips16'][d.getVar('MIPS_INSTRUCTION_SET', True) == 'mips16e']}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ' -${MIPS_MIPS16E_OPT}', '', d)}"
+
+MIPSPKGSFX_MIPS16E .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', '-m16', '', d) if d.getVar('MIPS_MIPS16E_OPT', True) == 'mips16' else ''}"
+
+# Whether to compile with code to allow interworking between the two
+# instruction sets. This allows mips16e code to be executed on a primarily
+# mips32/64 system and vice versa. It is strongly recommended that DISTROs not
+# turn this off - the actual cost is very small.
+TUNEVALID[no-interlink-compressed] = "Disable mixing of standard and MIPS16e code"
+MIPS16_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-interlink-compressed', ' -mno-interlink-compressed', ' -minterlink-compressed', d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ' ${MIPS16_TUNE_CCARGS}', '', d)}"
+OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ':mips16e', '', d)}"
+
+# show status (if compiling in MIPS16e mode)
+BUILDCFG_VARS += "${@['', 'MIPS_INSTRUCTION_SET'][d.getVar('MIPS_INSTRUCTION_SET', True) == 'mips16e']}"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list