Commit:     da2f5f7bf4a39f9613fc04d7030cffb63e435e1d
Parent:     8eb891fc809b2300137bcd247025628c06c95a63
Author:     Paul Mundt <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 21 16:56:56 2007 +0900
Committer:  Paul Mundt <[EMAIL PROTECTED]>
CommitDate: Tue Aug 21 16:56:56 2007 +0900

    sh: Fix DSP opcode regression for SH3-DSP parts.
    Older versions of binutils do not support -Wa,-isa= tuning, which is
    something we rely on for enabling DSP opcode support on the newer
    parts. SH3-DSP parts can still be handled with -Wa,-dsp even if the
    newer parts require the newer versions of binutils for supporting the
    new opcodes.
    This was broken in -rc1 when the SH4AL-DSP support was being reworked,
    and is needed to get SH3-DSP working with older toolchains again.
    Reported-by: Markus Brunner <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mundt <[EMAIL PROTECTED]>
 arch/sh/Makefile |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 3d211aa..97ac586 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -34,6 +34,8 @@ isa-y                 := $(isa-y)-nofpu
+isa-y                  := $(isa-y)-up
 cflags-$(CONFIG_CPU_SH2)               := $(call cc-option,-m2,)
 cflags-$(CONFIG_CPU_SH2A)              += $(call cc-option,-m2a,) \
                                           $(call cc-option,-m2a-nofpu,)
@@ -46,7 +48,20 @@ cflags-$(CONFIG_CPU_SH4A)            += $(call 
cc-option,-m4a,) \
 cflags-$(CONFIG_CPU_BIG_ENDIAN)                += -mb
 cflags-$(CONFIG_CPU_LITTLE_ENDIAN)     += -ml
-cflags-y       += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding
+# -Wa,-isa= tuning implies -Wa,-dsp for the versions of binutils that
+# support it, while -Wa,-dsp by itself limits the range of usable opcodes
+# on certain CPU subtypes. Try the ISA variant first, and if that fails,
+# fall back on -Wa,-dsp for the old binutils versions. Even without DSP
+# opcodes, we always want the best ISA tuning the version of binutils
+# will provide.
+isaflags-y     := $(call as-option,-Wa$(comma)-isa=$(isa-y),)
+isaflags-$(CONFIG_SH_DSP)              := \
+       $(call as-option,-Wa$(comma)-isa=$(isa-y),-Wa$(comma)-dsp)
+cflags-y       += $(isaflags-y) -ffreestanding
        $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to