* [PATCH] arm: respect both __ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__ macros
@ 2017-11-30 5:57 Andre McCurdy
2017-11-30 6:01 ` Rich Felker
0 siblings, 1 reply; 4+ messages in thread
From: Andre McCurdy @ 2017-11-30 5:57 UTC (permalink / raw)
To: musl; +Cc: Andre McCurdy
6KZ is the correct form, 6ZK is a gcc specific historical typo.
Respect both for the widest compatibility with clang and older
versions of gcc.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
arch/arm/atomic_arch.h | 2 +-
arch/arm/pthread_arch.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/atomic_arch.h b/arch/arm/atomic_arch.h
index c5c56f8..d1d09d8 100644
--- a/arch/arm/atomic_arch.h
+++ b/arch/arm/atomic_arch.h
@@ -7,7 +7,7 @@
extern uintptr_t __attribute__((__visibility__("hidden")))
__a_cas_ptr, __a_barrier_ptr;
-#if ((__ARM_ARCH_6__ || __ARM_ARCH_6K__ || __ARM_ARCH_6ZK__) && !__thumb__) \
+#if ((__ARM_ARCH_6__ || __ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \
|| __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
#define a_ll a_ll
diff --git a/arch/arm/pthread_arch.h b/arch/arm/pthread_arch.h
index 197752e..6657e19 100644
--- a/arch/arm/pthread_arch.h
+++ b/arch/arm/pthread_arch.h
@@ -1,4 +1,4 @@
-#if ((__ARM_ARCH_6K__ || __ARM_ARCH_6ZK__) && !__thumb__) \
+#if ((__ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \
|| __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
static inline pthread_t __pthread_self()
--
1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: respect both __ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__ macros
2017-11-30 5:57 [PATCH] arm: respect both __ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__ macros Andre McCurdy
@ 2017-11-30 6:01 ` Rich Felker
2017-11-30 7:20 ` Andre McCurdy
0 siblings, 1 reply; 4+ messages in thread
From: Rich Felker @ 2017-11-30 6:01 UTC (permalink / raw)
To: musl
On Wed, Nov 29, 2017 at 09:57:55PM -0800, Andre McCurdy wrote:
> 6KZ is the correct form, 6ZK is a gcc specific historical typo.
> Respect both for the widest compatibility with clang and older
> versions of gcc.
Probably ok, but is it needed? Ideally we would just use
__ARM_ARCH>=N, but old gcc lacked __ARM_ARCH, thus necessitating all
the awful cases.
Rich
> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> ---
> arch/arm/atomic_arch.h | 2 +-
> arch/arm/pthread_arch.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/atomic_arch.h b/arch/arm/atomic_arch.h
> index c5c56f8..d1d09d8 100644
> --- a/arch/arm/atomic_arch.h
> +++ b/arch/arm/atomic_arch.h
> @@ -7,7 +7,7 @@
> extern uintptr_t __attribute__((__visibility__("hidden")))
> __a_cas_ptr, __a_barrier_ptr;
>
> -#if ((__ARM_ARCH_6__ || __ARM_ARCH_6K__ || __ARM_ARCH_6ZK__) && !__thumb__) \
> +#if ((__ARM_ARCH_6__ || __ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \
> || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
>
> #define a_ll a_ll
> diff --git a/arch/arm/pthread_arch.h b/arch/arm/pthread_arch.h
> index 197752e..6657e19 100644
> --- a/arch/arm/pthread_arch.h
> +++ b/arch/arm/pthread_arch.h
> @@ -1,4 +1,4 @@
> -#if ((__ARM_ARCH_6K__ || __ARM_ARCH_6ZK__) && !__thumb__) \
> +#if ((__ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \
> || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
>
> static inline pthread_t __pthread_self()
> --
> 1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: respect both __ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__ macros
2017-11-30 6:01 ` Rich Felker
@ 2017-11-30 7:20 ` Andre McCurdy
2017-11-30 16:08 ` Rich Felker
0 siblings, 1 reply; 4+ messages in thread
From: Andre McCurdy @ 2017-11-30 7:20 UTC (permalink / raw)
To: musl
On Wed, Nov 29, 2017 at 10:01 PM, Rich Felker <dalias@libc.org> wrote:
> On Wed, Nov 29, 2017 at 09:57:55PM -0800, Andre McCurdy wrote:
>> 6KZ is the correct form, 6ZK is a gcc specific historical typo.
>> Respect both for the widest compatibility with clang and older
>> versions of gcc.
>
> Probably ok, but is it needed?
As far as I know, __ARM_ARCH_6ZK__ is gcc specific and clang only ever
defines __ARM_ARCH_6KZ__. Older versions of gcc only define
__ARM_ARCH_6ZK__ and newer versions of gcc define both
__ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__.
> Ideally we would just use
> __ARM_ARCH>=N, but old gcc lacked __ARM_ARCH, thus necessitating all
> the awful cases.
In atomic_arch.h, replacing the current ARMv6 tests with __ARM_ARCH >=
6 would be OK (if we could rely on __ARM_ARCH).
For pthread_arch.h, there are ARMv6 cores which lack the c13
coprocessor thread and process ID registers so __ARM_ARCH >= 6
wouldn't be fine grained enough.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: respect both __ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__ macros
2017-11-30 7:20 ` Andre McCurdy
@ 2017-11-30 16:08 ` Rich Felker
0 siblings, 0 replies; 4+ messages in thread
From: Rich Felker @ 2017-11-30 16:08 UTC (permalink / raw)
To: musl
On Wed, Nov 29, 2017 at 11:20:48PM -0800, Andre McCurdy wrote:
> On Wed, Nov 29, 2017 at 10:01 PM, Rich Felker <dalias@libc.org> wrote:
> > On Wed, Nov 29, 2017 at 09:57:55PM -0800, Andre McCurdy wrote:
> >> 6KZ is the correct form, 6ZK is a gcc specific historical typo.
> >> Respect both for the widest compatibility with clang and older
> >> versions of gcc.
> >
> > Probably ok, but is it needed?
>
> As far as I know, __ARM_ARCH_6ZK__ is gcc specific and clang only ever
> defines __ARM_ARCH_6KZ__. Older versions of gcc only define
> __ARM_ARCH_6ZK__ and newer versions of gcc define both
> __ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__.
>
> > Ideally we would just use
> > __ARM_ARCH>=N, but old gcc lacked __ARM_ARCH, thus necessitating all
> > the awful cases.
>
> In atomic_arch.h, replacing the current ARMv6 tests with __ARM_ARCH >=
> 6 would be OK (if we could rely on __ARM_ARCH).
>
> For pthread_arch.h, there are ARMv6 cores which lack the c13
> coprocessor thread and process ID registers so __ARM_ARCH >= 6
> wouldn't be fine grained enough.
I see. That's the core issue here -- that it's needed to choose the
right (or at least optimal) thread pointer access method for v6 vs
v6kz.
Rich
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-30 16:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 5:57 [PATCH] arm: respect both __ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__ macros Andre McCurdy
2017-11-30 6:01 ` Rich Felker
2017-11-30 7:20 ` Andre McCurdy
2017-11-30 16:08 ` Rich Felker
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).