From bb4a43311c2d64aeaa5c35c583aca758cfa7a4cc Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Wed, 31 Dec 2003 23:45:39 +0000 Subject: [PATCH] ia64.c (ia64_va_arg): Pass pointer for variable-sized type through convert_memory_address. * config/ia64/ia64.c (ia64_va_arg): Pass pointer for variable-sized type through convert_memory_address. (ia64_in_small_data_p): Always return false for FUNCTION_DECLs. From-SVN: r75284 --- gcc/ChangeLog | 10 ++++++++-- gcc/config/ia64/ia64.c | 12 ++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bf6ba568d11c..b0ebb10b5304 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-12-31 Zack Weinberg + + * config/ia64/ia64.c (ia64_va_arg): Pass pointer for + variable-sized type through convert_memory_address. + (ia64_in_small_data_p): Always return false for FUNCTION_DECLs. + 2003-12-24 Andrew Pinski PR bootstrap/13068 @@ -17,7 +23,7 @@ 2003-09-18 Mark Mitchell * explow.c (convert_memory_address): Define even when POINTERS_EXTEND_UNSIGNED is not defined. Do nothing if the address - is already in the right mode. + is already in the right mode. 2003-12-23 Andrew Pinski @@ -54,7 +60,7 @@ 2003-12-22 Gabriel Dos Reis - PR target/11271 + PR target/11271 * reload.c: Revert last backport from mainline. It breaks s390. 2003-12-21 Roger Sayle diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 21447c99ded1..6ffaff6dea22 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -3648,8 +3648,12 @@ ia64_va_arg (valist, type) /* Variable sized types are passed by reference. */ if (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) { - rtx addr = std_expand_builtin_va_arg (valist, build_pointer_type (type)); - return gen_rtx_MEM (ptr_mode, force_reg (Pmode, addr)); + rtx addr = force_reg (ptr_mode, + std_expand_builtin_va_arg (valist, build_pointer_type (type))); +#ifdef POINTERS_EXTEND_UNSIGNED + addr = convert_memory_address (Pmode, addr); +#endif + return gen_rtx_MEM (ptr_mode, addr); } /* Arguments with alignment larger than 8 bytes start at the next even @@ -7284,6 +7288,10 @@ ia64_in_small_data_p (exp) if (TARGET_NO_SDATA) return false; + /* Functions are never small data. */ + if (TREE_CODE (exp) == FUNCTION_DECL) + return false; + if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp)) { const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp)); -- 2.47.2