23070 – [3.4 only] CALL_V4_CLEAR_FP_ARGS flag not properly set (original) (raw)
| When a prototyped function of var-arg is called without any arguments to the variable part, "crxor 6,6,6" is not generated. "-O0 -mno-prototype" does NOT resolve the problem either. --------test.c-------- int test(const char *a, ...); void test1(const char *a) { test(a, 0); } void test2(const char *a) { test(a); } --------test.s-------- .file "test.c" .section ".text" .align 2 .globl test1 .type test1, @function test1: stwu 1,-24(1) mflr 0 stw 31,20(1) stw 0,28(1) mr 31,1 stw 3,8(31) lwz 3,8(31) li 4,0 crxor 6,6,6 <== has it bl test lwz 11,0(1) lwz 0,4(11) mtlr 0 lwz 31,-4(11) mr 1,11 blr .size test1, .-test1 .align 2 .globl test2 .type test2, @function test2: stwu 1,-24(1) mflr 0 stw 31,20(1) stw 0,28(1) mr 31,1 stw 3,8(31) lwz 3,8(31) bl test <== does not have lwz 11,0(1) lwz 0,4(11) mtlr 0 lwz 31,-4(11) mr 1,11 blr .size test2, .-test2 .ident "GCC: (GNU) 3.4.3" Comment 1 Alan Modra 2005-08-19 03:21:14 UTC Confirmed Comment 5 Alan Modra 2005-10-29 22:35:41 UTC Subject: Bug 23070 Author: amodra Date: Sat Oct 29 22:35:37 2005 New Revision: 105998 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=105998 Log: PR target/23070 * config/rs6000/rs6000.c (function_arg): For ABI_V4 calls to stdarg functions, set/clear the fp marker even when no variable args are passed. * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Describe -mprototype and -mno-prototype. Modified: branches/gcc-3_4-branch/gcc/ChangeLog branches/gcc-3_4-branch/gcc/config/rs6000/rs6000.c branches/gcc-3_4-branch/gcc/config/rs6000/sysv4.h Comment 6 Alan Modra 2005-10-29 22:36:46 UTC Fixed. Comment 7 Carlos O'Donell 2006-04-04 01:11:45 UTC Subject: Bug 23070 Author: carlos Date: Tue Apr 4 01:11:42 2006 New Revision: 112655 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112655 Log: 2006-04-03 Carlos O'Donell <carlos@codesourcery.com> Backport: 2005-08-23 Alan Modra <amodra@bigpond.net.au> PR target/23070 * config/rs6000/rs6000.c (function_arg): For ABI_V4 calls to stdarg functions, set/clear the fp marker even when no variable args are passed. * config/rs6000/sysv4.h (mprototype): Describe. Modified: branches/csl-gxxpro-3_4-branch/ChangeLog.csl branches/csl-gxxpro-3_4-branch/gcc/config/rs6000/rs6000.c branches/csl-gxxpro-3_4-branch/gcc/config/rs6000/sysv4.h | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |