Microblaze tune updates
v4 cover Microblaze tune updates
Version 4 of the patch set.
I've collected all of the patches resently sent, and reworked them per the comments on the mailing list.
The patches are directly available at:
git://git.openembedded.org/openembedded-core-contrib mgh/xilinx-microblaze
The work was broken up into a few more individual pieces. This will allow backports to Zeus for fixes vs new features.
Mark Hatle (5):
microblaze tune: change microblazeeb to microblaze microblaze tune: Allow no version to be set microblaze tune: Enable 64-bit
microblaze tune: cleanup +=
Microblaze: Adjust Linux items from microblazeeb to microblaze
meta/classes/meson.bbclass | 2 +-
meta/classes/siteinfo.bbclass | 3 --
.../include/microblaze/arch-microblaze.inc | 35 ++++++++++++-------
.../microblaze/feature-microblaze-math.inc | 12 +++----
.../feature-microblaze-versions.inc | 4 +--
meta/lib/oe/elf.py | 3 --
.../{microblazeeb => microblaze}/objarch.h | 0
7 files changed, 31 insertions(+), 28 deletions(-)
rename meta/recipes-extended/ghostscript/ghostscript/{microblazeeb => microblaze}/objarch.h (100%)Signature · 1 line
2.17.1
PATCH v4 1/5 microblaze tune: change microblazeeb to microblaze
From: Mark Hatle <[email protected]>
Using microblazeeb breaks a number of autoconf recipes, including newlib components. 'microblaze' is defined as the big-endian version, while microblazeel is defined as the little-endian version.
config.sub: 2018-07-03
...
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
...
| microblaze-* | microblazeel-* \...
microblaze*)
basic_machine=microblaze-xilinx
...
--- meta/conf/machine/include/microblaze/arch-microblaze.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/machine/include/microblaze/arch-microblaze.inc +2 -2
@@ -45,8 +45,8 @@ MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", require conf/machine/include/microblaze/feature-microblaze-versions.inc require conf/machine/include/microblaze/feature-microblaze-math.inc -# Architecture name, either 'microblazeeb' or 'microblazeel' depending on endianess -TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}" +# Architecture name, either 'microblaze' or 'microblazeel' depending on endianess +TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "", "el", d)}" # Package Architecture formatting TUNE_PKGARCH = "microblaze${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}"
Signature · 1 line
2.17.1
PATCH v4 2/5 microblaze tune: Allow no version to be set
In reply to Mark HatleFrom: Mark Hatle <[email protected]>
We want to allow no version to be configured. This should use the GCC default which is the latest defined version, currently 11.0.
--- .../include/microblaze/feature-microblaze-versions.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/machine/include/microblaze/feature-microblaze-versions.inc +2 -2
@@ -64,6 +64,6 @@ TUNECONFLICTS[v10.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 TUNECONFLICTS[v11.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6 v10.0" # Version flags -TUNE_CCARGS += "-mcpu=${@microblaze_current_version(d, True)}" -MBPKGARCH_VERSION = "-${@microblaze_current_version(d)}" +TUNE_CCARGS += "${@'-mcpu=%s' % (microblaze_current_version(d, True)) if microblaze_current_version(d, True) != '' else ''}" +MBPKGARCH_VERSION = "${@'-%s' % (microblaze_current_version(d, True)) if microblaze_current_version(d, True) != '' else ''}"
Signature · 1 line
2.17.1
PATCH v4 3/5 microblaze tune: Enable 64-bit
In reply to Mark HatleFrom: Mark Hatle <[email protected]>
64-bit is not yet available in Linux, but some non-Linux uses exist.
--- .../machine/include/microblaze/arch-microblaze.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
meta/conf/machine/include/microblaze/arch-microblaze.inc +10 -1
@@ -4,6 +4,11 @@ TUNEVALID[microblaze] = "MicroBlaze" MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "microblaze:", "", d)}" +# 64-bit +TUNEVALID[64-bit] = "64-bit MicroBlaze" +TUNECONFLICTS[64-bit] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6 v10.0" +MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "64-bit", "microblaze64:", "", d)}" + # Endian TUNEVALID[bigendian] = "Use Microblaze Big Endian" TUNECONFLICTS[bigendian] += "v10.0"
@@ -26,6 +31,7 @@ TUNECONFLICTS[frequency-optimized] += "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 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", "frequency-optimized", "-mxl-frequency", "", d)}" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "64-bit", "-m64", "", d)}" # Disable reorder for v8.30 if pattern-compare is not enabled TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \
@@ -48,6 +54,9 @@ require conf/machine/include/microblaze/feature-microblaze-math.inc # Architecture name, either 'microblaze' or 'microblazeel' depending on endianess TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "", "el", d)}" +# Add 64-bit to the PKGARCH if enabled. +MBPKGARCH_SIZE = "${@bb.utils.contains("TUNE_FEATURES", "64-bit", "64", "", d)}" + # Package Architecture formatting -TUNE_PKGARCH = "microblaze${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}" +TUNE_PKGARCH = "microblaze${MBPKGARCH_SIZE}${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}"
Signature · 1 line
2.17.1
PATCH v4 4/5 microblaze tune: cleanup +=
In reply to Mark HatleFrom: Mark Hatle <[email protected]>
Various += were used, refactor these to be either = or .= depending on usuage.
CONFLICTS should be '=', as no leading space is required and they are not amending any other conflict settings.
The TUNE_CCARGS should be .= so that if the feature does not define a CCARG blank spaces are not added to the CFLAGS. This is consistent to how the arm tuning is implemented.
--- .../include/microblaze/arch-microblaze.inc | 22 +++++++++---------- .../microblaze/feature-microblaze-math.inc | 12 +++++----- 2 files changed, 17 insertions(+), 17 deletions(-)
meta/conf/machine/include/microblaze/arch-microblaze.inc +11 -11
@@ -11,34 +11,34 @@ MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "64-bit", "microblaze # Endian TUNEVALID[bigendian] = "Use Microblaze Big Endian" -TUNECONFLICTS[bigendian] += "v10.0" +TUNECONFLICTS[bigendian] = "v10.0" MBPKGARCH_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "-mbig-endian", "-mlittle-endian", d)}" +TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endian", " -mlittle-endian", d)}" # General features TUNEVALID[barrel-shift] = "Enable Hardware Barrel Shifter" TUNEVALID[pattern-compare] = "Enable Pattern Compare Instructions" TUNEVALID[reorder] = "Enable Reorder Instructions" -TUNECONFLICTS[reorder] += "v8.00 v8.10 v8.20" +TUNECONFLICTS[reorder] = "v8.00 v8.10 v8.20" # Core configuration tune optimizations TUNEVALID[frequency-optimized] = "Enabling tuning for frequency optimized core (AREA_OPTIMIZED_2)" -TUNECONFLICTS[frequency-optimized] += "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6" +TUNECONFLICTS[frequency-optimized] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6" # 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", "frequency-optimized", "-mxl-frequency", "", d)}" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "64-bit", "-m64", "", d)}" +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", "frequency-optimized", " -mxl-frequency", "", d)}" +TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "64-bit", " -m64", "", d)}" # Disable reorder for v8.30 if pattern-compare is not enabled -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \ +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)}" + " -mxl-reorder", " -mno-xl-reorder", d), \ + " -mxl-reorder", d), " -mno-xl-reorder", d)}" # Feature package architecture formatting MBPKGARCH_TUNE = ""
meta/conf/machine/include/microblaze/feature-microblaze-math.inc +6 -6
@@ -13,14 +13,14 @@ TUNECONFLICTS[fpu-hard] = "fpu-soft" TUNECONFLICTS[fpu-hard-extended] = "fpu-soft" # Compiler args -TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['multiply-low', 'multiply-high'], '-mno-xl-soft-mul', '-mxl-soft-mul', d)}" -TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mxl-multiply-high', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains_any('TUNE_FEATURES', ['multiply-low', 'multiply-high'], ' -mno-xl-soft-mul', ' -mxl-soft-mul', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', ' -mxl-multiply-high', '', d)}" -TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-mno-xl-soft-div', '-mxl-soft-div', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', ' -mno-xl-soft-div', ' -mxl-soft-div', d)}" -TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-soft', '', '', d)}" -TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['fpu-hard', 'fpu-hard-extended'], '-mhard-float', '', d)}" -TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-mxl-float-convert -mxl-float-sqrt', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-soft', '', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains_any('TUNE_FEATURES', ['fpu-hard', 'fpu-hard-extended'], ' -mhard-float', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', ' -mxl-float-convert -mxl-float-sqrt', '', d)}" # Set target fpu (bitbake known target) to soft or hard (basic or extended) TARGET_FPU = "${@bb.utils.contains_any('TUNE_FEATURES', 'fpu-hard fpu-hard-extended', 'fpu-hard', 'fpu-soft', d)}"
Signature · 1 line
2.17.1
PATCH v4 5/5 Microblaze: Adjust Linux items from microblazeeb to microblaze
In reply to Mark HatleDue to recent changes to the tune, in order to match config.guess, the name of the big-endian microblaze architecture was changes to 'microblaze'.
---
meta/classes/meson.bbclass | 2 +-
meta/classes/siteinfo.bbclass | 3 ---
meta/lib/oe/elf.py | 3 ---
.../ghostscript/{microblazeeb => microblaze}/objarch.h | 0
4 files changed, 1 insertion(+), 7 deletions(-)
rename meta/recipes-extended/ghostscript/ghostscript/{microblazeeb => microblaze}/objarch.h (100%)meta/classes/meson.bbclass +1 -1
@@ -57,7 +57,7 @@ def meson_cpu_family(var, d): return 'mips64' elif re.match(r"i[3-6]86", arch): return "x86" - elif arch == "microblazeel" or arch == "microblazeeb": + elif arch == "microblazeel": return "microblaze" else: return arch
meta/classes/siteinfo.bbclass +0 -3
@@ -35,7 +35,6 @@ def siteinfo_data_for_machine(arch, os, d): "lm32": "endian-big bit-32", "m68k": "endian-big bit-32", "microblaze": "endian-big bit-32 microblaze-common", - "microblazeeb": "endian-big bit-32 microblaze-common", "microblazeel": "endian-little bit-32 microblaze-common", "mips": "endian-big bit-32 mips-common", "mips64": "endian-big bit-64 mips-common",
@@ -89,8 +88,6 @@ def siteinfo_data_for_machine(arch, os, d): "arm-linux-musleabi": "arm-linux", "armeb-linux-gnueabi": "armeb-linux", "armeb-linux-musleabi": "armeb-linux", - "microblazeeb-linux" : "microblaze-linux", - "microblazeeb-linux-musl" : "microblaze-linux", "microblazeel-linux" : "microblaze-linux", "microblazeel-linux-musl" : "microblaze-linux", "mips-linux-musl": "mips-linux",
meta/lib/oe/elf.py +0 -3
@@ -22,7 +22,6 @@ def machine_dict(d): "mips": ( 8, 0, 0, False, 32), "mipsel": ( 8, 0, 0, True, 32), "microblaze": (189, 0, 0, False, 32), - "microblazeeb":(189, 0, 0, False, 32), "microblazeel":(189, 0, 0, True, 32), "powerpc": (20, 0, 0, False, 32), "riscv32": (243, 0, 0, True, 32),
@@ -60,7 +59,6 @@ def machine_dict(d): "sh4": (42, 0, 0, True, 32), "sparc": ( 2, 0, 0, False, 32), "microblaze": (189, 0, 0, False, 32), - "microblazeeb":(189, 0, 0, False, 32), "microblazeel":(189, 0, 0, True, 32), }, "linux-musl" : {
@@ -81,7 +79,6 @@ def machine_dict(d): "mips64": ( 8, 0, 0, False, 64), "mips64el": ( 8, 0, 0, True, 64), "microblaze": (189, 0, 0, False, 32), - "microblazeeb":(189, 0, 0, False, 32), "microblazeel":(189, 0, 0, True, 32), "riscv32": (243, 0, 0, True, 32), "riscv64": (243, 0, 0, True, 64),
meta/recipes-extended/ghostscript/ghostscript/microblaze/objarch.h renamed from meta/recipes-extended/ghostscript/ghostscript/microblazeeb/objarch.h +0 -0
Signature · 1 line
2.17.1
Quoted 13 lines · Mark Hatle
Version 4 of the patch set.
I've collected all of the patches resently sent, and reworked them per the comments on the mailing list.
The patches are directly available at:
git://git.openembedded.org/openembedded-core-contribmgh/xilinx-microblazeThe work was broken up into a few more individual pieces. This will allow backports to Zeus for fixes vs new features.
Quoted 6 lines
Mark Hatle (5):
microblaze tune: change microblazeeb to microblaze microblaze tune: Allow no version to be set microblaze tune: Enable 64-bit
microblaze tune: cleanup +=
Microblaze: Adjust Linux items from microblazeeb to microblaze
Looks good. I gave it a quick test, qemu big endian builds and boots core-image-minimal now.
Thanks,
Nathan