All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: <linux-mips@linux-mips.org>
Subject: Re: [PATCH 1/2] MIPS: Makefile: Set correct ISA level for MIPS ASEs
Date: Fri, 30 Jan 2015 16:53:43 +0000	[thread overview]
Message-ID: <54CBB717.7000106@imgtec.com> (raw)
In-Reply-To: <alpine.LFD.2.11.1501301638050.28301@eddie.linux-mips.org>

On 01/30/2015 04:50 PM, Maciej W. Rozycki wrote:
> On Fri, 30 Jan 2015, Markos Chandras wrote:
> 
>>>>  cflags-$(CONFIG_SB1XXX_CORELIS)	+= $(call cc-option,-mno-sched-prolog) \
>>>>  				   -fno-omit-frame-pointer
>>>>  
>>>>  ifeq ($(CONFIG_CPU_HAS_MSA),y)
>>>> -toolchain-msa	:= $(call cc-option-yn,-mhard-float -mfp64
>> -Wa$(comma)-mmsa)
>>>> +toolchain-msa	:= $(call cc-option-yn,-march=mips32r2 -mhard-float
>> -mfp64 -Wa$(comma)-mmsa)
>>>>  cflags-$(toolchain-msa)		+= -DTOOLCHAIN_SUPPORTS_MSA
>>>>  endif
>>>
>>>  Similarly here, is CPU_HAS_MSA incompatible with `-march=mips64r2'?
>> I am not sure but like I explained above, it does not have to be 100%
>> accurate. Just something to keep your toolchain happy and really enable
>> MSA support even if you happen and old ISA level as the default one for
>> your toolchain.
>>
>> for example, if your toolchain has -march=mips2 as default then
>>
>> -mhard-float -mfp64 will fail
>>
>> but
>>
>> -march=mips32r2 -mhard-float -mfp64
>>
>> will pass. Your toolchain does support MSA, but because you combined the
>> check with incompatible flags, then the end result is not what you want.
> 
>  Hmm doesn't `cc-option-yn' pull options accumulated in $(cflags-y) 
> already for the check it makes?  If not, then it's rather less than useful 
> for us and I can see two options here:

I think it does but IIRC at this point no -march=XXXX was set. Perhaps
moving the ASEs checks after the CPU_* code in Makefile to fix this
problem indirectly.

-- 
markos

WARNING: multiple messages have this Message-ID (diff)
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH 1/2] MIPS: Makefile: Set correct ISA level for MIPS ASEs
Date: Fri, 30 Jan 2015 16:53:43 +0000	[thread overview]
Message-ID: <54CBB717.7000106@imgtec.com> (raw)
Message-ID: <20150130165343.VK5x9xuv0sOt0E7tBQ47nu1h0paHoCGuvKODOXVN56A@z> (raw)
In-Reply-To: <alpine.LFD.2.11.1501301638050.28301@eddie.linux-mips.org>

On 01/30/2015 04:50 PM, Maciej W. Rozycki wrote:
> On Fri, 30 Jan 2015, Markos Chandras wrote:
> 
>>>>  cflags-$(CONFIG_SB1XXX_CORELIS)	+= $(call cc-option,-mno-sched-prolog) \
>>>>  				   -fno-omit-frame-pointer
>>>>  
>>>>  ifeq ($(CONFIG_CPU_HAS_MSA),y)
>>>> -toolchain-msa	:= $(call cc-option-yn,-mhard-float -mfp64
>> -Wa$(comma)-mmsa)
>>>> +toolchain-msa	:= $(call cc-option-yn,-march=mips32r2 -mhard-float
>> -mfp64 -Wa$(comma)-mmsa)
>>>>  cflags-$(toolchain-msa)		+= -DTOOLCHAIN_SUPPORTS_MSA
>>>>  endif
>>>
>>>  Similarly here, is CPU_HAS_MSA incompatible with `-march=mips64r2'?
>> I am not sure but like I explained above, it does not have to be 100%
>> accurate. Just something to keep your toolchain happy and really enable
>> MSA support even if you happen and old ISA level as the default one for
>> your toolchain.
>>
>> for example, if your toolchain has -march=mips2 as default then
>>
>> -mhard-float -mfp64 will fail
>>
>> but
>>
>> -march=mips32r2 -mhard-float -mfp64
>>
>> will pass. Your toolchain does support MSA, but because you combined the
>> check with incompatible flags, then the end result is not what you want.
> 
>  Hmm doesn't `cc-option-yn' pull options accumulated in $(cflags-y) 
> already for the check it makes?  If not, then it's rather less than useful 
> for us and I can see two options here:

I think it does but IIRC at this point no -march=XXXX was set. Perhaps
moving the ASEs checks after the CPU_* code in Makefile to fix this
problem indirectly.

-- 
markos

  reply	other threads:[~2015-01-30 16:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 14:44 [PATCH 1/2] MIPS: Makefile: Set correct ISA level for MIPS ASEs Markos Chandras
2015-01-30 14:44 ` Markos Chandras
2015-01-30 14:44 ` [PATCH 2/2] MIPS: Makefile: Set default ISA level Markos Chandras
2015-01-30 14:44   ` Markos Chandras
2015-01-30 16:37   ` Maciej W. Rozycki
2015-01-30 16:52     ` Markos Chandras
2015-01-30 16:52       ` Markos Chandras
2015-01-30 17:11       ` Maciej W. Rozycki
2015-01-30 16:20 ` [PATCH 1/2] MIPS: Makefile: Set correct ISA level for MIPS ASEs Maciej W. Rozycki
2015-01-30 16:27   ` Markos Chandras
2015-01-30 16:27     ` Markos Chandras
2015-01-30 16:50     ` Maciej W. Rozycki
2015-01-30 16:53       ` Markos Chandras [this message]
2015-01-30 16:53         ` Markos Chandras
2015-01-30 17:13         ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54CBB717.7000106@imgtec.com \
    --to=markos.chandras@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.