This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Serious PPC stdarg problem with 2.95.2


At 03:25 23.02.00 , Ralph Schmidt wrote:

>I have a serious problems with the System V.4 stdargs support since 
>2.95.2. I use the ppc-amigaos 68k/ppc crosscompiler which may be the cause 
>of this but i somehow doubt that as the old 2.91.57 va_ppc.h works for me 
>with 2.95.2. Please look at the documented asm below as it contains 
>several really bogus code parts. (Look for !!!!)
>
Maybe because it doesn't happen? :-)

Do you have any modification in your sources? On powerpc-linux-gnu this 
works just fine as the appended source shows.

Franz.

PS. Please refrain from sending pseudo-HTML messages to this list.


         .file   "varargs17.c"

  # rs6000/powerpc options: -msdata=data -G 8
  # GNU C version 2.95.2 19991024 (release/franzo) (ppc-redhat-linux) 
compiled by GNU C version 2.95.2 19991024 (release/franzo).
  # options passed:  -mregnames -mstrict-align -O2 -fverbose-asm
  # options enabled:  -fdefer-pop -fomit-frame-pointer -fcse-follow-jumps
  # -fcse-skip-blocks -fexpensive-optimizations -fthread-jumps
  # -fstrength-reduce -fpeephole -fforce-mem -ffunction-cse -finline
  # -fkeep-static-consts -fcaller-saves -fpcc-struct-return -fgcse
  # -frerun-cse-after-loop -frerun-loop-opt -fschedule-insns
  # -fschedule-insns2 -fsched-interblock -fsched-spec -fbranch-count-reg
  # -fcommon -fverbose-asm -fgnu-linker -fregmove -foptimize-register-move
  # -fargument-alias -fident -mpowerpc -mnew-mnemonics -mstrict-align
  # -mregnames -mcall-sysv -msdata=data

gcc2_compiled.:
         .section        ".rodata"
         .align 2
.LC0:
         .string "0x%lx\n"
         .section        ".text"
         .align 2
         .globl main
         .type    main,@function
main:
         stwu %r1,-16(%r1)
         mflr %r0
         stw %r0,20(%r1)
         lis %r3,.LC0@ha
         lis %r4,0xfedc
         la %r3,.LC0@l(%r3)
         ori %r4,%r4,47768
         crxor 6,6,6
         bl test
         li %r3,0
         lwz %r0,20(%r1)
         mtlr %r0
         la %r1,16(%r1)
         blr
.Lfe1:
         .size    main,.Lfe1-main
         .align 2
         .globl vtest
         .type    vtest,@function
vtest:
         lbz %r9,0(%r4)
         cmplwi %cr0,%r9,7
         bc 12,1,.L20
         addi %r11,%r9,1
         lwz %r0,8(%r4)
         slwi %r9,%r9,2
         add %r3,%r0,%r9
         stb %r11,0(%r4)
         b .L9
.L20:
         lwz %r3,4(%r4)
         addi %r0,%r3,4
         stw %r0,4(%r4)
.L9:
         lwz %r3,0(%r3)
         blr
.Lfe2:
         .size    vtest,.Lfe2-vtest
         .align 2
         .globl test
         .type    test,@function
test:
         stwu %r1,-160(%r1)
         mflr %r0
         stw %r28,144(%r1)
         stw %r29,148(%r1)
         stw %r30,152(%r1)
         stw %r31,156(%r1)
         stw %r0,164(%r1)
         lis %r0,0x100
         addi %r11,%r1,168
         addi %r29,%r1,8
         stw %r0,128(%r1)
         stw %r11,132(%r1)
         stw %r29,136(%r1)
         stw %r4,12(%r1)
         stw %r5,16(%r1)
         stw %r6,20(%r1)
         stw %r7,24(%r1)
         stw %r8,28(%r1)
         stw %r9,32(%r1)
         stw %r10,36(%r1)
         bc 4,6,.L24
         stfd %f1,40(%r1)
         stfd %f2,48(%r1)
         stfd %f3,56(%r1)
         stfd %f4,64(%r1)
         stfd %f5,72(%r1)
         stfd %f6,80(%r1)
         stfd %f7,88(%r1)
         stfd %f8,96(%r1)
.L24:
         addi %r29,%r1,112
         mr %r28,%r3
         addi %r4,%r1,128
         li %r5,12
         mr %r3,%r29
         crxor 6,6,6
         bl memcpy
         mr %r3,%r28
         mr %r4,%r29
         bl vtest
         lwz %r0,164(%r1)
         mtlr %r0
         lwz %r28,144(%r1)
         lwz %r29,148(%r1)
         lwz %r30,152(%r1)
         lwz %r31,156(%r1)
         la %r1,160(%r1)
         blr
.Lfe3:
         .size    test,.Lfe3-test
         .ident  "GCC: (GNU) 2.95.2 19991024 (release/franzo)"





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]