From: Andrew Pinski Date: Mon, 19 Jan 2015 04:46:27 +0000 (+0000) Subject: abitest.S (LABEL_TEST_FUNC_RETURN): Load testfunc_ptr as 32bit for ILP32 and 64bit... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f3b40a7302be02c6eb99e1b13ba6b9591890e3f;p=gcc.git abitest.S (LABEL_TEST_FUNC_RETURN): Load testfunc_ptr as 32bit for ILP32 and 64bit for LP64. * gcc.target/aarch64/aapcs64/abitest.S (LABEL_TEST_FUNC_RETURN): Load testfunc_ptr as 32bit for ILP32 and 64bit for LP64. Co-Authored-By: Naveen H.S From-SVN: r219832 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 88be2da4f39..29ad3f4db8e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-01-15 Andrew Pinski + Naveen H.S + + * gcc.target/aarch64/aapcs64/abitest.S (LABEL_TEST_FUNC_RETURN): Load + testfunc_ptr as 32bit for ILP32 and 64bit for LP64. + 2015-01-18 Andre Vehreschild PR fortran/60255 diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.S b/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.S index 68845fbcdb5..c2fbd83fcb3 100644 --- a/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.S +++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.S @@ -2,6 +2,13 @@ .global myfunc .type dumpregs,%function .type myfunc,%function + +#ifdef __LP64__ +#define PTR_REG(n) x##n +#else +#define PTR_REG(n) w##n +#endif + dumpregs: myfunc: mov x16, sp @@ -48,7 +55,7 @@ myfunc: LABEL_TEST_FUNC_RETURN: adrp x9, testfunc_ptr add x9, x9, :lo12:testfunc_ptr - ldr x9, [x9, #0] + ldr PTR_REG(9), [x9, #0] blr x9 // function return value test adrp x9, saved_return_address add x9, x9, :lo12:saved_return_address