[meta-xilinx] [PATCH 4/5] arch-microblaze.inc: Invert how the 'reorder' feature is used for v8.30
Nathan Rossi
nathan at nathanrossi.com
Wed May 24 08:58:03 PDT 2017
With Xilinx MicroBlaze v8.30 a configuration issue requires that the
'pattern-compare' feature is enable for the 'reorder' feature to be
correctly functional. Previously the MicroBlaze tune setup would assume
that 'pattern-compare' was available even when it may not actually be,
and would force enable the 'pattern-compare' feature automatically. This
behaviour is prone to issues and may emit broken binaries for a target
when the user was not aware or expected that there target CPU was
broken.
This change inverts the behaviour such that instead of implicitly
enabling the 'pattern-compare' feature it instead does not enable
generation of reorder instructions for the compiler by setting
'-mno-xl-reorder' in the same way as the case that the target does not
have the feature enabled.
Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
---
conf/machine/include/microblaze/arch-microblaze.inc | 8 +++++++-
.../machine/include/microblaze/feature-microblaze-versions.inc | 10 ----------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/conf/machine/include/microblaze/arch-microblaze.inc b/conf/machine/include/microblaze/arch-microblaze.inc
index 9a5e685f08..b01f03b679 100644
--- a/conf/machine/include/microblaze/arch-microblaze.inc
+++ b/conf/machine/include/microblaze/arch-microblaze.inc
@@ -23,7 +23,13 @@ TUNEVALID[reorder] = "Enable Reorder Instructions"
# General feature compiler args
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "-mno-xl-barrel-shift" ,d)}"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "-mno-xl-pattern-compare" ,d)}"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-mxl-reorder", "-mno-xl-reorder" ,d)}"
+
+# Disable reorder for v8.30 if pattern-compare is not enabled
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \
+ bb.utils.contains("TUNE_FEATURES", "v8.30", \
+ bb.utils.contains("TUNE_FEATURES", "pattern-compare", \
+ "-mxl-reorder", "-mno-xl-reorder", d), \
+ "-mxl-reorder", d), "-mno-xl-reorder", d)}"
# General feature package architecture formatting
MBPKGARCH_TUNE = ""
diff --git a/conf/machine/include/microblaze/feature-microblaze-versions.inc b/conf/machine/include/microblaze/feature-microblaze-versions.inc
index dcdf020dd2..53d0b9bfb0 100644
--- a/conf/machine/include/microblaze/feature-microblaze-versions.inc
+++ b/conf/machine/include/microblaze/feature-microblaze-versions.inc
@@ -92,13 +92,3 @@ TUNECONFLICTS[v8.20] += "reorder"
TUNE_CCARGS += "-mcpu=${@microblaze_format_gcc_version(microblaze_current_version(d))}"
MBPKGARCH_VERSION = "-${@microblaze_format_pkg_version(microblaze_current_version(d))}"
-# Perform some additional tune feature dependency enforcement
-python __anonymous () {
- tunes = (d.getVar('TUNE_FEATURES') or "").split()
- if len(tunes) != 0:
- # For v8.30 pattern-compare is required if reorder is enabled, enforce
- # this in tune features.
- if 'v8.30' in tunes and 'reorder' in tunes and 'pattern-compare' not in tunes:
- d.setVar("TUNE_FEATURES_append", " pattern-compare")
-}
-
--
2.11.0
More information about the meta-xilinx
mailing list