MIPS/MIPS32 tune -> MIPS
cover MIPS/MIPS32 tune -> MIPS
The following is in reference to the recent discussion about the mips32 -package- arch changing from mips to mips32. One of the potential options was to get rid of the previous "mips" and replace it with the mips32 definition standard. This patch does just that.
Working with Khem, we have moved the default "mips" (32-bit) tune to be -march=mips32 based, and produce package with the package arch of "mips".
The side effect of this work is that the prior 'mips' tune was actually "mips1". I don't believe that was really desired by anyone, but it is a change. Also there is no longer a "mips32" tune, just an include file that automatically inherits and chooses the "mips" tune.
The following changes since commit 1a82989345fb98becb487d270fd93a5e6dffeb47:
runqemu-internal: Add console=tty for qemuppc and NFS (2012-04-06 01:12:15 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib mhatle/mips-tune
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/mips-tune
Mark Hatle (1):
tune-mips32: Update the default MIPS tuning to be mips32
meta/conf/machine/include/mips/arch-mips.inc | 13 +++++++++---- meta/conf/machine/include/tune-mips32.inc | 24 +----------------------- 2 files changed, 10 insertions(+), 27 deletions(-)
PATCH 1/1 tune-mips32: Update the default MIPS tuning to be mips32
Previously the default mips tuning was defined as "mips1" internally in the compiler. Revise this and change to "mips32".
This eliminates the need for the mips32 specific tunings, which were not being used anyway. (They exists and were used, but were not differentiated by package arch prior to a recent commit.)
--- meta/conf/machine/include/mips/arch-mips.inc | 13 +++++++++---- meta/conf/machine/include/tune-mips32.inc | 24 +----------------------- 2 files changed, 10 insertions(+), 27 deletions(-)
meta/conf/machine/include/mips/arch-mips.inc +9 -4
@@ -28,6 +28,11 @@ TUNEVALID[fpu-hard] = "Use hardware FPU" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-mhard-float", "-msoft-float", d)}" TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "", "soft", d)}" +# mips32 is the default o32 tuning +TUNEVALID[mips32] = "Enable mips32 specific processor optimizations" +TUNE_CONFLICTS[mips32] = "n64 n32" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips32", "-march=mips32", "", d)}" + # Package naming MIPSPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "", "el", d)}" MIPSPKGSFX_BYTE = "${@bb.utils.contains("TUNE_FEATURES", "n64" , "64", "", d)}"
@@ -40,7 +45,7 @@ TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPS # Base tunes AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf" -TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard" +TUNE_FEATURES_tune-mips = "mips32 o32 bigendian fpu-hard" BASE_LIB_tune-mips = "lib" MIPSPKGSFX_VARIANT_tune-mips = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS_tune-mips = "mips"
@@ -55,7 +60,7 @@ BASE_LIB_tune-mips64 = "lib64" MIPSPKGSFX_VARIANT_tune-mips64 = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS_tune-mips64 = "mips64" -TUNE_FEATURES_tune-mipsel = "o32 fpu-hard" +TUNE_FEATURES_tune-mipsel = "mips32 o32 fpu-hard" BASE_LIB_tune-mipsel = "lib" MIPSPKGSFX_VARIANT_tune-mipsel = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS_tune-mipsel = "mipsel"
@@ -70,7 +75,7 @@ BASE_LIB_tune-mips64el = "lib64" MIPSPKGSFX_VARIANT_tune-mips64el = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS_tune-mips64el = "mips64el" -TUNE_FEATURES_tune-mips-nf = "o32 bigendian" +TUNE_FEATURES_tune-mips-nf = "mips32 o32 bigendian" BASE_LIB_tune-mips-nf = "lib" MIPSPKGSFX_VARIANT_tune-mips-nf = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS_tune-mips-nf = "mips-nf"
@@ -85,7 +90,7 @@ BASE_LIB_tune-mips64-nf = "lib64" MIPSPKGSFX_VARIANT_tune-mips64-nf = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS_tune-mips64-nf = "mips64-nf" -TUNE_FEATURES_tune-mipsel-nf = "o32" +TUNE_FEATURES_tune-mipsel-nf = "mips32 o32" BASE_LIB_tune-mipsel-nf = "lib" MIPSPKGSFX_VARIANT_tune-mipsel-nf = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS_tune-mipsel-nf = "mipsel-nf"
meta/conf/machine/include/tune-mips32.inc +1 -23
@@ -1,25 +1,3 @@ -DEFAULTTUNE ?= "mips32" +DEFAULTTUNE ?= "mips" require conf/machine/include/mips/arch-mips.inc - -TUNEVALID[mips32] = "Enable mips32 specific processor optimizations" -TUNE_CONFLICTS[mips32] = "n64 n32" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips32", "-march=mips32", "", d)}" - -AVAILTUNES += "mips32 mips32el mips32-nf mips32el-nf" - -TUNE_FEATURES_tune-mips32 = "${TUNE_FEATURES_tune-mips} mips32" -MIPSPKGSFX_VARIANT_tune-mips32 = "mips32" -PACKAGE_EXTRA_ARCHS_tune-mips32 = "mips mips32" - -TUNE_FEATURES_tune-mips32el = "${TUNE_FEATURES_tune-mipsel} mips32" -MIPSPKGSFX_VARIANT_tune-mips32el = "mips32el" -PACKAGE_EXTRA_ARCHS_tune-mips32el = "mipsel mips32el" - -TUNE_FEATURES_tune-mips32-nf = "${TUNE_FEATURES_tune-mips-nf} mips32" -MIPSPKGSFX_VARIANT_tune-mips32-nf = "mips32" -PACKAGE_EXTRA_ARCHS_tune-mips32-nf = "mips-nf mips32-nf" - -TUNE_FEATURES_tune-mips32el-nf = "${TUNE_FEATURES_tune-mipsel-nf} mips32" -MIPSPKGSFX_VARIANT_tune-mips32el-nf = "mips32el" -PACKAGE_EXTRA_ARCHS_tune-mips32el-nf = "mipsel-nf mips32el-nf"
Signature · 1 line
1.7.1
Re: [PATCH 1/1] tune-mips32: Update the default MIPS tuning to be mips32
Quoted 6 lines · Mark Hatle
Previously the default mips tuning was defined as "mips1" internally in the compiler. Revise this and change to "mips32".
This eliminates the need for the mips32 specific tunings, which were not being used anyway. (They exists and were used, but were not differentiated by package arch prior to a recent commit.)
This change is slightly more far-reaching than the description above suggests, in that it isn't just changing the default tuning: it seems actually to remove the ability to tune for pre-mips32 altogether. Obviously there's nothing to stop anybody creating tune files for earlier MIPS in some other BSP layer, but this is a feature that exists in oe-core today and would be removed by this patch.
Also, the second paragraph of your checkin message above doesn't make a lot of sense. In the first sentence you say that the mips32 tunings were not being used, and then in the second sentence you say that they were. It doesn't seem that both those statements can logically be true.
And, finally, the checkin message doesn't make it entirely clear why this change represents an improvement, i.e. why MIPS32 is a better default tune than MIPS I.
p.
Re: [PATCH 1/1] tune-mips32: Update the default MIPS tuning to be mips32
Quoted 8 lines · Phil Blundell
Quoted 6 lines · Mark Hatle
Previously the default mips tuning was defined as "mips1" internally in the compiler. Revise this and change to "mips32".
This eliminates the need for the mips32 specific tunings, which were not being used anyway. (They exists and were used, but were not differentiated by package arch prior to a recent commit.)
Quoted 6 lines
This change is slightly more far-reaching than the description above suggests, in that it isn't just changing the default tuning: it seems actually to remove the ability to tune for pre-mips32 altogether. Obviously there's nothing to stop anybody creating tune files for earlier MIPS in some other BSP layer, but this is a feature that exists in oe-core today and would be removed by this patch.
I also meant to ask: just to be absolutely clear, will MIPS32-tuned code still run on older cores? That is, if someone is targetting (say) MIPS IV today, is this going to break their system?
p.
Quoted 5 lines · Mark Hatle
The following is in reference to the recent discussion about the mips32 -package- arch changing from mips to mips32. One of the potential options was to get rid of the previous "mips" and replace it with the mips32 definition standard. This patch does just that.
Quoted 7 lines
Working with Khem, we have moved the default "mips" (32-bit) tune to be -march=mips32 based, and produce package with the package arch of "mips".
The side effect of this work is that the prior 'mips' tune was actually "mips1". I don't believe that was really desired by anyone, but it is a change. Also there is no longer a "mips32" tune, just an include file that automatically inherits and chooses the "mips" tune.
There's no backwards compatibility, but I'm fine with the new options. The "mips" tune already gets selected by default in arch-mips.inc, so you can remove it from tune-mips32.inc. Actually I'd prefer removing tune-mips32.inc completely, so people will notice the backwards-incompatible change.
Regards,
Andreas
Quoted 9 lines · Andreas Oberritter
Quoted 8 lines · Mark Hatle
The following is in reference to the recent discussion about the mips32 -package- arch changing from mips to mips32. One of the potential options was to get rid of the previous "mips" and replace it with the mips32 definition standard. This patch does just that.
Working with Khem, we have moved the default "mips" (32-bit) tune to be -march=mips32 based, and produce package with the package arch of "mips".
Quoted 10 lines
Quoted 4 lines
The side effect of this work is that the prior 'mips' tune was actually "mips1". I don't believe that was really desired by anyone, but it is a change. Also there is no longer a "mips32" tune, just an include file that automatically inherits and chooses the "mips" tune.
There's no backwards compatibility, but I'm fine with the new options. The "mips" tune already gets selected by default in arch-mips.inc, so you can remove it from tune-mips32.inc. Actually I'd prefer removing tune-mips32.inc completely, so people will notice the backwards-incompatible change.
This is backwards compatible if someone was previously including the mips32 tune. It only "breaks" if someone was setting the default tune to "mips32" or "mips32el" manually.
If that is a concern, then adding a:
TUNE_FEATURES_tune-mips32 = "${TUNE_FEATURES_tune-mips}" MIPSPKGSFX_VARIANT_tune-mips32 = "${MIPSPKGSFX_VARIANT_tune-mips}" PACKAGE_EXTRA_ARCHS_tune-mips32 = "${PACKAGE_EXTRA_ARCHS_tune-mips}"
(and the same for mips32el). That would ensure that they remain the same, and that the package arch of "mips" can't deviate.
--Mark
Quoted 2 lines
Regards,
Andreas