From mboxrd@z Thu Jan 1 00:00:00 1970 From: Franz Sirl To: law@cygnus.com, pooh@msu.ru Cc: egcs@cygnus.com Subject: Re: egcs-971127: results on powerpc-ibm-aix4.2.1.0 Date: Sun, 30 Nov 1997 14:29:00 -0000 Message-id: References: <34801C0C.A67C5FAB@msu.ru> <7105.880842361@hurl.cygnus.com> X-SW-Source: 1997-11/msg00986.html At 22:26 Uhr -0000 29.11.1997, Jeffrey A Law wrote: > In message < 34801C0C.A67C5FAB@msu.ru >you write: > > Why there is a regression in gcc testsuite > > (gcc.c-torture/execute/va-arg-5.c)? >Bug in Meissner's rework of some of Geoffrey Keating's patches; > >This should fix the problem (and will be included in the release). > >Index: rs6000.c >=================================================================== >RCS file: /cvs/cvsfiles/egcs/gcc/config/rs6000/rs6000.c,v >retrieving revision 1.3.2.4 >retrieving revision 1.3.2.5 >diff -c -3 -p -r1.3.2.4 -r1.3.2.5 >*** rs6000.c 1997/11/27 00:06:51 1.3.2.4 >--- rs6000.c 1997/11/29 21:37:41 1.3.2.5 >*************** function_arg_partial_nregs (cum, mode, t >*** 1387,1395 **** > return 0; > } > >- if (GET_MODE_CLASS (mode) == MODE_FLOAT && TARGET_HARD_FLOAT) >- return 0; >- > if (cum->words < GP_ARG_NUM_REG > && GP_ARG_NUM_REG < (cum->words + RS6000_ARG_SIZE (mode, type, >named))) > { >--- 1387,1392 ---- Hmm, this also solves a sig11 while compiling glibc-2.1 for me, but it didn't change the test behaviour on powerpc-unknown-linux-gnulibc1. The strange thing is, after getting the sig11 I started applying Geoff's remaining patches step by step and the following one also prohibited the sig11. Is Michaels rework really buggy? BTW, while looking at *.s files generated by -save-temps I noticed that I can't switch on -mmultiple, it is always directly followed by -mno-multiple. I tried with various combinations of -mpowerpc, -mcpu=powerpc, etc. and was never able to get rid of the -mno-multiple. According to the docs this should be possible. Is there any other option that forces -mno-multiple? Anyway, egcs-971127 is now quite fit for release from the Linux/PPC viewpoint ;-). Thanks all the helpful guys involved in this! Bye, Franz. Patch by Geoff Keating, originally for an older version of egcs, so it applies with offset: * PIC code breaks when nested functions are used; for instance, the following compiled with 'cc1 -O2 -fpic -Wall'. (The -Wall gives a nice visible crash, rather than quietly generating invalid code.) extern void x1(int), x2(int); extern int c1, c2; void x3 (int p) { static inline void i1 (void) { x1(c1); } static inline void i2 (void) { i1(); } if (p) i2(); x2(c2); } --- config/rs6000/rs6000.c~ Thu Aug 28 00:39:28 1997 +++ config/rs6000/rs6000.c Fri Aug 29 01:16:00 1997 @@ -2292,6 +2292,12 @@ free (machine); p->machine = (struct machine_function *)0; + + /* If the nested function used the GOT, pic_offset_table_rtx would + have been set to the hard register that the function was using as + a pointer into the GOT table. Reset it to NULL so that if this + function uses the GOT it will get GOT_TOC_REGNUM. */ + pic_offset_table_rtx = NULL; } /* Do anything needed before RTL is emitted for each function. */