From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/7] MIPS: add support for MSA
Date: Sun, 16 Oct 2016 18:05:17 +0100 [thread overview]
Message-ID: <20161016170522.36074-2-Vincent.Riera@imgtec.com> (raw)
In-Reply-To: <20161016170522.36074-1-Vincent.Riera@imgtec.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
arch/Config.in.mips | 17 +++++++++++++++++
toolchain/toolchain-wrapper.mk | 3 +++
2 files changed, 20 insertions(+)
diff --git a/arch/Config.in.mips b/arch/Config.in.mips
index f7bfa21..fb9053c 100644
--- a/arch/Config.in.mips
+++ b/arch/Config.in.mips
@@ -16,6 +16,14 @@ config BR2_MIPS_CPU_MIPS64R5
config BR2_MIPS_CPU_MIPS64R6
bool
+# mips cpu features
+config BR2_MIPS_CPU_HAS_MSA
+ bool
+
+# for some cores, MSA support is optional
+config BR2_MIPS_CPU_MAYBE_HAS_MSA
+ bool
+
choice
prompt "Target Architecture Variant"
depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
@@ -113,6 +121,15 @@ config BR2_MIPS_SOFT_FLOAT
floating point functions, then everything will need to be
compiled with soft floating point support (-msoft-float).
+config BR2_MIPS_ENABLE_MSA
+ bool "Enable MIPS SIMD Architecture (MSA) support"
+ depends on BR2_MIPS_CPU_MAYBE_HAS_MSA && !BR2_SOFT_FLOAT
+ select BR2_MIPS_CPU_HAS_MSA
+ help
+ For some CPU cores, the MSA extension is optional.
+ Select this option if you are certain your particular
+ implementation has MSA support and you want to use it.
+
config BR2_ARCH
default "mips" if BR2_mips
default "mipsel" if BR2_mipsel
diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
index 6e480e6..f9a1899 100644
--- a/toolchain/toolchain-wrapper.mk
+++ b/toolchain/toolchain-wrapper.mk
@@ -14,6 +14,9 @@ TOOLCHAIN_WRAPPER_ARGS += -DBR_SYSROOT='"$(STAGING_SUBDIR)"'
# MIPS optimization flags
TOOLCHAIN_WRAPPER_MIPS_OPTS =
+ifeq ($(BR2_MIPS_CPU_HAS_MSA),y)
+TOOLCHAIN_WRAPPER_MIPS_OPTS += -mmsa
+endif
# We create a list like '"-mfoo", "-mbar", "-mbarfoo"' so that each flag is a
# separate argument when used in execv() by the toolchain wrapper.
--
2.10.0
next prev parent reply other threads:[~2016-10-16 17:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-16 17:05 [Buildroot] [PATCH 1/7] toolchain-wrapper: pass MIPS optimizations to TOOLCHAIN_WRAPPER_OPTS Vicente Olivert Riera
2016-10-16 17:05 ` Vicente Olivert Riera [this message]
2016-10-16 17:05 ` [Buildroot] [PATCH 3/7] MIPS: add optional MSA support for M5100 core Vicente Olivert Riera
2016-10-16 17:05 ` [Buildroot] [PATCH 4/7] MIPS: add optional MSA support for M5101 core Vicente Olivert Riera
2016-10-16 17:05 ` [Buildroot] [PATCH 5/7] MIPS: add optional MSA support for P5600 core Vicente Olivert Riera
2016-10-16 17:05 ` [Buildroot] [PATCH 6/7] MIPS: add optional MSA support for I6400 core Vicente Olivert Riera
2016-10-16 17:05 ` [Buildroot] [PATCH 7/7] MIPS: add optional MSA support for P6600 core Vicente Olivert Riera
2016-10-18 18:59 ` [Buildroot] [PATCH 1/7] toolchain-wrapper: pass MIPS optimizations to TOOLCHAIN_WRAPPER_OPTS Arnout Vandecappelle
2016-10-25 21:15 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161016170522.36074-2-Vincent.Riera@imgtec.com \
--to=vincent.riera@imgtec.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox