[20/29,AARCH64] Set up wordsize for ILP32.

Message ID 1414396793-9005-21-git-send-email-apinski@cavium.com
State New, archived
Headers

Commit Message

Andrew Pinski Oct. 27, 2014, 7:59 a.m. UTC
  __WORDSIZE needs to be set to 32 for ILP32.

* sysdeps/aarch64/bits/wordsize.h (__WORDSIZE): Set to 32 for ILP32.
Update comments.
---
 sysdeps/aarch64/bits/wordsize.h |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
  

Comments

Will Newton Nov. 18, 2014, 1:58 p.m. UTC | #1
On 27 October 2014 07:59, Andrew Pinski <apinski@cavium.com> wrote:
> __WORDSIZE needs to be set to 32 for ILP32.
>
> * sysdeps/aarch64/bits/wordsize.h (__WORDSIZE): Set to 32 for ILP32.
> Update comments.
> ---
>  sysdeps/aarch64/bits/wordsize.h |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h
> index 3ecccaa..3d5a79d 100644
> --- a/sysdeps/aarch64/bits/wordsize.h
> +++ b/sysdeps/aarch64/bits/wordsize.h
> @@ -15,12 +15,16 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>
> -#define __WORDSIZE     64
> +#ifdef __LP64__
> +# define __WORDSIZE    64
> +#else
> +# define __WORDSIZE    32
> +#endif
>
> -/* LP64 ABI has a 64bit time_t.
> +/* LP64 and ILP32s ABI uses a 64bit time_t.

LP64 and ILP32 ABIs have a 64bit time_t.

Otherwise OK.

>     This allows aarch32 and AARCH64 applications
>     both access utmp. */
>  #define __WORDSIZE_TIME64_COMPAT32     1
>
> -/* LP64 use the 64bit system call interface. */
> +/* LP64 and ILP32 use the 64bit system call interface. */
>  #define __SYSCALL_WORDSIZE 64
> --
> 1.7.2.5
>
  

Patch

diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h
index 3ecccaa..3d5a79d 100644
--- a/sysdeps/aarch64/bits/wordsize.h
+++ b/sysdeps/aarch64/bits/wordsize.h
@@ -15,12 +15,16 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define __WORDSIZE	64
+#ifdef __LP64__
+# define __WORDSIZE	64
+#else
+# define __WORDSIZE	32
+#endif
 
-/* LP64 ABI has a 64bit time_t.
+/* LP64 and ILP32s ABI uses a 64bit time_t.
    This allows aarch32 and AARCH64 applications
    both access utmp. */
 #define __WORDSIZE_TIME64_COMPAT32	1
 
-/* LP64 use the 64bit system call interface. */
+/* LP64 and ILP32 use the 64bit system call interface. */
 #define __SYSCALL_WORDSIZE 64