Hi, This is a simple patch which allows all of the boehm-gc testsuite that is included with GCC to pass for AARCH64:ILP32. Basically we need to set CPP_WORDSZ to 32 and the alignment to 4 so we detect pointers correctly.
OK for GCC? Bootstrapped and tested for aarch64-linux-gnu with no regressions and many libjava testcases now pass. OK for boehm-gc upstream? I don't have write access to upstream sources though, if approved there please apply it also. Thanks, Andrew Pinski GCC ChangeLog: * include/private/gcconfig.h (CPP_WORDSZ): Correct for AARCH64:ILP32. (ALIGNMENT): Correct for AARCH64:ILP32.
commit 7d15d08c61991c3f7fea822fb567106dde83a166 Author: Andrew Pinski <apin...@cavium.com> Date: Wed Feb 11 02:35:45 2015 +0000 Fix boehm-gc for AARCH64:ILP32 * include/private/gcconfig.h (CPP_WORDSZ): Correct for AARCH64:ILP32. (ALIGNMENT): Correct for AARCH64:ILP32. diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h index 7e081d9..049e24c 100644 --- a/boehm-gc/include/private/gcconfig.h +++ b/boehm-gc/include/private/gcconfig.h @@ -1854,9 +1854,14 @@ # endif # ifdef AARCH64 -# define CPP_WORDSZ 64 # define MACH_TYPE "AARCH64" -# define ALIGNMENT 8 +# ifdef __ILP32__ +# define CPP_WORDSZ 32 +# define ALIGNMENT 4 +# else +# define CPP_WORDSZ 64 +# define ALIGNMENT 8 +# endif # ifndef HBLKSIZE # define HBLKSIZE 4096 # endif
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index aa80d53..989a734 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2020,9 +2020,14 @@ # endif # ifdef AARCH64 -# define CPP_WORDSZ 64 # define MACH_TYPE "AARCH64" -# define ALIGNMENT 8 +# ifdef __ILP32__ +# define CPP_WORDSZ 32 +# define ALIGNMENT 4 +# else +# define CPP_WORDSZ 64 +# define ALIGNMENT 8 +# endif # ifndef HBLKSIZE # define HBLKSIZE 4096 # endif