diff mbox

[1/4] Define __ASSUME_ALIGNED_REGISTER_PAIRS for missing ports

Message ID 1456431555-14182-2-git-send-email-adhemerval.zanella@linaro.org
State New
Headers show

Commit Message

Adhemerval Zanella Netto Feb. 25, 2016, 8:19 p.m. UTC
This patch defines __ASSUME_ALIGNED_REGISTER_PAIRS for the missing
ports that require 64-bit value (e.g., long long) to be aligned to
an even register pair in argument passing.

No code change is expected, tested with builds for powerpc32,
mips-o32, and armhf.

	* sysdeps/unix/sysv/linux/arm/kernel-features.h
	(__ASSUME_ALIGNED_REGISTER_PAIRS): Define.
	* sysdeps/unix/sysv/linux/mips/kernel-features.h
	[_MIPS_SIM == _ABIO32] (__ASSUME_ALIGNED_REGISTER_PAIRS): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
	[!__powerpc64__] (__ASSUME_ALIGNED_REGISTER_PAIRS): Likewise.
---
 sysdeps/unix/sysv/linux/arm/kernel-features.h     | 4 ++++
 sysdeps/unix/sysv/linux/mips/kernel-features.h    | 6 ++++++
 sysdeps/unix/sysv/linux/powerpc/kernel-features.h | 6 ++++++
 4 files changed, 25 insertions(+)

Comments

Mike Frysinger April 10, 2016, 4:12 a.m. UTC | #1
On 25 Feb 2016 17:19, Adhemerval Zanella wrote:
> --- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
>  
> +/* Define this if your 32-bit syscall API requires 64-bit register
> +   pairs to start with an even-number register.  */
> +#ifndef __powerpc64__
> +# define __ASSUME_ALIGNED_REGISTER_PAIRS	1
> +#endif

i'm not familiar with the ABI at this level, but does this also apply
to the new LE ABI ?
-mike
Adhemerval Zanella Netto April 11, 2016, 12:17 p.m. UTC | #2
On 10-04-2016 01:12, Mike Frysinger wrote:
> On 25 Feb 2016 17:19, Adhemerval Zanella wrote:
>> --- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
>> +++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
>>  
>> +/* Define this if your 32-bit syscall API requires 64-bit register
>> +   pairs to start with an even-number register.  */
>> +#ifndef __powerpc64__
>> +# define __ASSUME_ALIGNED_REGISTER_PAIRS	1
>> +#endif
> 
> i'm not familiar with the ABI at this level, but does this also apply
> to the new LE ABI ?
> -mike
> 

New LE ABI is just for 64-bits.
diff mbox

Patch

diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
index 6f1606c..1bcc34d 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -42,3 +42,7 @@ 
 # undef __ASSUME_REQUEUE_PI
 # undef __ASSUME_SET_ROBUST_LIST
 #endif
+
+/* Define this if your 32-bit syscall API requires 64-bit register
+   pairs to start with an even-number register.  */
+#define __ASSUME_ALIGNED_REGISTER_PAIRS	1
diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h
index 83f7a47..ea6a914 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -47,3 +47,9 @@ 
 # undef __ASSUME_REQUEUE_PI
 # undef __ASSUME_SET_ROBUST_LIST
 #endif
+
+/* Define this if your 32-bit syscall API requires 64-bit register
+   pairs to start with an even-number register.  */
+#if _MIPS_SIM == _ABIO32
+# define __ASSUME_ALIGNED_REGISTER_PAIRS	1
+#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
index 14807ad..6dcd77d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
@@ -57,4 +57,10 @@ 
 #endif
 #define __ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL	1
 
+/* Define this if your 32-bit syscall API requires 64-bit register
+   pairs to start with an even-number register.  */
+#ifndef __powerpc64__
+# define __ASSUME_ALIGNED_REGISTER_PAIRS	1
+#endif
+
 #include_next <kernel-features.h>