* [PATCH][ARM] Big Endian and Generic tuning
@ 2011-10-25 12:49 Andrew Stubbs
2011-10-25 13:04 ` Richard Earnshaw
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Stubbs @ 2011-10-25 12:49 UTC (permalink / raw)
To: gcc-patches; +Cc: patches
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
My recent patch to add -mcpu=generic-armv7-a omitted support for big
endian. This patch should solve that.
As far as I know the only this missing is the linker spec. (I have no
big-endian targets to test with.)
OK?
Andrew
[-- Attachment #2: be.patch --]
[-- Type: text/x-patch, Size: 481 bytes --]
2011-10-25 Andrew Stubbs <ams@codesourcery.com>
gcc/
* config/arm/bpabi.h (BE8_LINK_SPEC): Recognize generic-armv7 tuning.
--- a/gcc/config/arm/bpabi.h
+++ b/gcc/config/arm/bpabi.h
@@ -58,6 +58,7 @@
#define BE8_LINK_SPEC \
" %{mbig-endian:%{march=armv7-a|mcpu=cortex-a5 \
|mcpu=cortex-a8|mcpu=cortex-a9|mcpu=cortex-a15 \
+ |mcpu=generic-armv7* \
|march=armv7-m|mcpu=cortex-m3 \
|march=armv7e-m|mcpu=cortex-m4 \
|march=armv6-m|mcpu=cortex-m0 \
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] Big Endian and Generic tuning
2011-10-25 12:49 [PATCH][ARM] Big Endian and Generic tuning Andrew Stubbs
@ 2011-10-25 13:04 ` Richard Earnshaw
2011-10-25 13:15 ` Andrew Stubbs
0 siblings, 1 reply; 7+ messages in thread
From: Richard Earnshaw @ 2011-10-25 13:04 UTC (permalink / raw)
To: Andrew Stubbs; +Cc: gcc-patches, patches
On 25/10/11 11:51, Andrew Stubbs wrote:
> My recent patch to add -mcpu=generic-armv7-a omitted support for big
> endian. This patch should solve that.
>
> As far as I know the only this missing is the linker spec. (I have no
> big-endian targets to test with.)
>
> OK?
>
> Andrew
>
>
> be.patch
>
>
> 2011-10-25 Andrew Stubbs <ams@codesourcery.com>
>
> gcc/
> * config/arm/bpabi.h (BE8_LINK_SPEC): Recognize generic-armv7 tuning.
>
> --- a/gcc/config/arm/bpabi.h
> +++ b/gcc/config/arm/bpabi.h
> @@ -58,6 +58,7 @@
> #define BE8_LINK_SPEC \
> " %{mbig-endian:%{march=armv7-a|mcpu=cortex-a5 \
> |mcpu=cortex-a8|mcpu=cortex-a9|mcpu=cortex-a15 \
> + |mcpu=generic-armv7* \
> |march=armv7-m|mcpu=cortex-m3 \
> |march=armv7e-m|mcpu=cortex-m4 \
> |march=armv6-m|mcpu=cortex-m0 \
Hmm, just thought. Shouldn't this be generic-armv7-a and not generic-armv7?
A generic armv7 implies (to me) code that will run on all variants of
armv7, which includes both R and M profiles.
R.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] Big Endian and Generic tuning
2011-10-25 13:04 ` Richard Earnshaw
@ 2011-10-25 13:15 ` Andrew Stubbs
2011-10-25 15:07 ` Richard Earnshaw
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Stubbs @ 2011-10-25 13:15 UTC (permalink / raw)
To: Richard Earnshaw; +Cc: gcc-patches, patches
On 25/10/11 13:19, Richard Earnshaw wrote:
>> 2011-10-25 Andrew Stubbs<ams@codesourcery.com>
>>
>> gcc/
>> * config/arm/bpabi.h (BE8_LINK_SPEC): Recognize generic-armv7 tuning.
>>
>> --- a/gcc/config/arm/bpabi.h
>> +++ b/gcc/config/arm/bpabi.h
>> @@ -58,6 +58,7 @@
>> #define BE8_LINK_SPEC \
>> " %{mbig-endian:%{march=armv7-a|mcpu=cortex-a5 \
>> |mcpu=cortex-a8|mcpu=cortex-a9|mcpu=cortex-a15 \
>> + |mcpu=generic-armv7* \
>> |march=armv7-m|mcpu=cortex-m3 \
>> |march=armv7e-m|mcpu=cortex-m4 \
>> |march=armv6-m|mcpu=cortex-m0 \
>
>
> Hmm, just thought. Shouldn't this be generic-armv7-a and not generic-armv7?
>
> A generic armv7 implies (to me) code that will run on all variants of
> armv7, which includes both R and M profiles.
The actual option is indeed -mcpu=generic-armv7-a, but I thought I might
as well wildcard it since this option appears to apply to all the
profiles, and I couldn't really see why all the existing contents should
all be listed individually (I mean, this patch proves that doing so is a
maintenance burden, even if in this case it wouldn't have helped).
Having said that, I now see it doesn't list any R-profile options. Is
that because it doesn't apply, or because there are just missing?
I can certainly make this patch A-profile specific if this is wrong.
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] Big Endian and Generic tuning
2011-10-25 13:15 ` Andrew Stubbs
@ 2011-10-25 15:07 ` Richard Earnshaw
2011-10-26 14:30 ` Andrew Stubbs
0 siblings, 1 reply; 7+ messages in thread
From: Richard Earnshaw @ 2011-10-25 15:07 UTC (permalink / raw)
To: Andrew Stubbs; +Cc: gcc-patches, patches, Joey Ye
On 25/10/11 13:48, Andrew Stubbs wrote:
> On 25/10/11 13:19, Richard Earnshaw wrote:
>>> 2011-10-25 Andrew Stubbs<ams@codesourcery.com>
>>>
>>> gcc/
>>> * config/arm/bpabi.h (BE8_LINK_SPEC): Recognize generic-armv7 tuning.
>>>
>>> --- a/gcc/config/arm/bpabi.h
>>> +++ b/gcc/config/arm/bpabi.h
>>> @@ -58,6 +58,7 @@
>>> #define BE8_LINK_SPEC \
>>> " %{mbig-endian:%{march=armv7-a|mcpu=cortex-a5 \
>>> |mcpu=cortex-a8|mcpu=cortex-a9|mcpu=cortex-a15 \
>>> + |mcpu=generic-armv7* \
>>> |march=armv7-m|mcpu=cortex-m3 \
>>> |march=armv7e-m|mcpu=cortex-m4 \
>>> |march=armv6-m|mcpu=cortex-m0 \
>>
>>
>> Hmm, just thought. Shouldn't this be generic-armv7-a and not generic-armv7?
>>
>> A generic armv7 implies (to me) code that will run on all variants of
>> armv7, which includes both R and M profiles.
>
> The actual option is indeed -mcpu=generic-armv7-a, but I thought I might
> as well wildcard it since this option appears to apply to all the
> profiles, and I couldn't really see why all the existing contents should
> all be listed individually (I mean, this patch proves that doing so is a
> maintenance burden, even if in this case it wouldn't have helped).
>
> Having said that, I now see it doesn't list any R-profile options. Is
> that because it doesn't apply, or because there are just missing?
>
> I can certainly make this patch A-profile specific if this is wrong.
>
> Andrew
>
The difficulty on R profile is that although BE-32 mode is obsolete,
there is a config bit that can be set to make the CPU byte-swap the
instruction stream to make it behave largely like it is running in BE-32
mode.
I think really we should be pushing the R-profile code towards having
BE-8 as the default; but to do that we really need a compiler option
that can override this behaviour (probably -mbe-[8|32]). Once we have
that option, we can fix the compiler to prefer BE-8 as there is then a
way to get back the legacy behaviour.
R.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] Big Endian and Generic tuning
2011-10-25 15:07 ` Richard Earnshaw
@ 2011-10-26 14:30 ` Andrew Stubbs
2011-10-26 15:04 ` Richard Earnshaw
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Stubbs @ 2011-10-26 14:30 UTC (permalink / raw)
To: Richard Earnshaw; +Cc: gcc-patches, patches, Joey Ye
[-- Attachment #1: Type: text/plain, Size: 667 bytes --]
On 25/10/11 15:16, Richard Earnshaw wrote:
> The difficulty on R profile is that although BE-32 mode is obsolete,
> there is a config bit that can be set to make the CPU byte-swap the
> instruction stream to make it behave largely like it is running in BE-32
> mode.
>
> I think really we should be pushing the R-profile code towards having
> BE-8 as the default; but to do that we really need a compiler option
> that can override this behaviour (probably -mbe-[8|32]). Once we have
> that option, we can fix the compiler to prefer BE-8 as there is then a
> way to get back the legacy behaviour.
Here's an updated patch that makes no generalizations.
OK?
Andrew
[-- Attachment #2: be.patch --]
[-- Type: text/x-patch, Size: 481 bytes --]
2011-10-26 Andrew Stubbs <ams@codesourcery.com>
gcc/
* config/arm/bpabi.h (BE8_LINK_SPEC): Recognize generic-armv7 tuning.
--- a/gcc/config/arm/bpabi.h
+++ b/gcc/config/arm/bpabi.h
@@ -58,6 +58,7 @@
#define BE8_LINK_SPEC \
" %{mbig-endian:%{march=armv7-a|mcpu=cortex-a5 \
|mcpu=cortex-a8|mcpu=cortex-a9|mcpu=cortex-a15 \
+ |mcpu=generic-armv7-a \
|march=armv7-m|mcpu=cortex-m3 \
|march=armv7e-m|mcpu=cortex-m4 \
|march=armv6-m|mcpu=cortex-m0 \
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] Big Endian and Generic tuning
2011-10-26 14:30 ` Andrew Stubbs
@ 2011-10-26 15:04 ` Richard Earnshaw
2011-11-01 22:41 ` Andrew Stubbs
0 siblings, 1 reply; 7+ messages in thread
From: Richard Earnshaw @ 2011-10-26 15:04 UTC (permalink / raw)
To: Andrew Stubbs; +Cc: gcc-patches, patches, Joey Ye
On 26/10/11 14:54, Andrew Stubbs wrote:
> On 25/10/11 15:16, Richard Earnshaw wrote:
>> The difficulty on R profile is that although BE-32 mode is obsolete,
>> there is a config bit that can be set to make the CPU byte-swap the
>> instruction stream to make it behave largely like it is running in BE-32
>> mode.
>>
>> I think really we should be pushing the R-profile code towards having
>> BE-8 as the default; but to do that we really need a compiler option
>> that can override this behaviour (probably -mbe-[8|32]). Once we have
>> that option, we can fix the compiler to prefer BE-8 as there is then a
>> way to get back the legacy behaviour.
>
> Here's an updated patch that makes no generalizations.
>
> OK?
>
Yep
R.
> Andrew
>
>
> be.patch
>
>
> 2011-10-26 Andrew Stubbs <ams@codesourcery.com>
>
> gcc/
> * config/arm/bpabi.h (BE8_LINK_SPEC): Recognize generic-armv7 tuning.
>
> --- a/gcc/config/arm/bpabi.h
> +++ b/gcc/config/arm/bpabi.h
> @@ -58,6 +58,7 @@
> #define BE8_LINK_SPEC \
> " %{mbig-endian:%{march=armv7-a|mcpu=cortex-a5 \
> |mcpu=cortex-a8|mcpu=cortex-a9|mcpu=cortex-a15 \
> + |mcpu=generic-armv7-a \
> |march=armv7-m|mcpu=cortex-m3 \
> |march=armv7e-m|mcpu=cortex-m4 \
> |march=armv6-m|mcpu=cortex-m0 \
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] Big Endian and Generic tuning
2011-10-26 15:04 ` Richard Earnshaw
@ 2011-11-01 22:41 ` Andrew Stubbs
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Stubbs @ 2011-11-01 22:41 UTC (permalink / raw)
To: Richard Earnshaw; +Cc: gcc-patches, patches, Joey Ye
On 26/10/11 10:15, Richard Earnshaw wrote:
>> Here's an updated patch that makes no generalizations.
>>
>> OK?
>>
>
> Yep
Committed.
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-01 22:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-25 12:49 [PATCH][ARM] Big Endian and Generic tuning Andrew Stubbs
2011-10-25 13:04 ` Richard Earnshaw
2011-10-25 13:15 ` Andrew Stubbs
2011-10-25 15:07 ` Richard Earnshaw
2011-10-26 14:30 ` Andrew Stubbs
2011-10-26 15:04 ` Richard Earnshaw
2011-11-01 22:41 ` Andrew Stubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).