diff options
| author | Nathan Rossi <nathan@nathanrossi.com> | 2017-05-30 18:46:21 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan@nathanrossi.com> | 2017-05-30 18:46:21 +1000 |
| commit | c519c5ee2b725e6f946ffd11c862463b3391876e (patch) | |
| tree | 15c11202241ea59f411afbc90ed2450075d2f290 /conf/machine | |
| parent | 4a86b530b17a76dbda6e29690e6d46523869e7d8 (diff) | |
| download | meta-xilinx-c519c5ee2b725e6f946ffd11c862463b3391876e.tar.gz | |
arch-microblaze.inc: Invert how the 'reorder' feature is used for v8.30
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@nathanrossi.com>
Diffstat (limited to 'conf/machine')
| -rw-r--r-- | conf/machine/include/microblaze/arch-microblaze.inc | 8 | ||||
| -rw-r--r-- | conf/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 9a5e685f..b01f03b6 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" | |||
| 23 | # General feature compiler args | 23 | # General feature compiler args |
| 24 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "-mno-xl-barrel-shift" ,d)}" | 24 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "-mno-xl-barrel-shift" ,d)}" |
| 25 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "-mno-xl-pattern-compare" ,d)}" | 25 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "-mno-xl-pattern-compare" ,d)}" |
| 26 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-mxl-reorder", "-mno-xl-reorder" ,d)}" | 26 | |
| 27 | # Disable reorder for v8.30 if pattern-compare is not enabled | ||
| 28 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \ | ||
| 29 | bb.utils.contains("TUNE_FEATURES", "v8.30", \ | ||
| 30 | bb.utils.contains("TUNE_FEATURES", "pattern-compare", \ | ||
| 31 | "-mxl-reorder", "-mno-xl-reorder", d), \ | ||
| 32 | "-mxl-reorder", d), "-mno-xl-reorder", d)}" | ||
| 27 | 33 | ||
| 28 | # General feature package architecture formatting | 34 | # General feature package architecture formatting |
| 29 | MBPKGARCH_TUNE = "" | 35 | MBPKGARCH_TUNE = "" |
diff --git a/conf/machine/include/microblaze/feature-microblaze-versions.inc b/conf/machine/include/microblaze/feature-microblaze-versions.inc index dcdf020d..53d0b9bf 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" | |||
| 92 | TUNE_CCARGS += "-mcpu=${@microblaze_format_gcc_version(microblaze_current_version(d))}" | 92 | TUNE_CCARGS += "-mcpu=${@microblaze_format_gcc_version(microblaze_current_version(d))}" |
| 93 | MBPKGARCH_VERSION = "-${@microblaze_format_pkg_version(microblaze_current_version(d))}" | 93 | MBPKGARCH_VERSION = "-${@microblaze_format_pkg_version(microblaze_current_version(d))}" |
| 94 | 94 | ||
| 95 | # Perform some additional tune feature dependency enforcement | ||
| 96 | python __anonymous () { | ||
| 97 | tunes = (d.getVar('TUNE_FEATURES') or "").split() | ||
| 98 | if len(tunes) != 0: | ||
| 99 | # For v8.30 pattern-compare is required if reorder is enabled, enforce | ||
| 100 | # this in tune features. | ||
| 101 | if 'v8.30' in tunes and 'reorder' in tunes and 'pattern-compare' not in tunes: | ||
| 102 | d.setVar("TUNE_FEATURES_append", " pattern-compare") | ||
| 103 | } | ||
| 104 | |||
