NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-macppc/54827: alloca() is broken in gcc 8 on powerpc



The following reply was made to PR port-macppc/54827; it has been noted by GNATS.

From: christos%zoulas.com@localhost (Christos Zoulas)
To: gnats-bugs%netbsd.org@localhost, port-macppc-maintainer%netbsd.org@localhost, 
	gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, uwe%stderr.spb.ru@localhost
Cc: 
Subject: Re: port-macppc/54827: alloca() is broken in gcc 8 on powerpc
Date: Mon, 6 Jan 2020 16:35:34 -0500

 On Jan 6,  8:45pm, david%gutteridge.ca@localhost ("David H. Gutteridge") wrote:
 -- Subject: Re: port-macppc/54827: alloca() is broken in gcc 8 on powerpc
 
 | The following reply was made to PR port-macppc/54827; it has been noted by GNATS.
 | 
 | From: "David H. Gutteridge" <david%gutteridge.ca@localhost>
 | To: gnats-bugs%netbsd.org@localhost
 | Cc: 
 | Subject: Re: port-macppc/54827: alloca() is broken in gcc 8 on powerpc
 | Date: Mon, 06 Jan 2020 15:40:42 -0500
 | 
 |  I'm not sure there is an upstream GCC fix for this, as I've found the
 |  issue is isolated to the GCC built as part of the NetBSD tooling. That
 |  is, I tested by building the following natively on a G4 Mac:
 |  
 |  GCC 8.3 from the NetBSD tree
 |  GCC 8.3 from pkgsrc
 |  GCC 9-snapshot from pkgsrc-wip
 |  
 |  The two GCCs from pkgsrc generate the correct instruction (as
 |  previously detailed), where the one from the NetBSD src tree does not,
 |  e.g.:
 |  
 |  --- alloca-ppc8.s       2020-01-06 08:49:43.908981299 -0500
 |  +++ alloca-ppc8native.s 2020-01-06 11:21:06.732122549 -0500
 |  @@ -7,17 +7,17 @@
 |   foo:
 |   .LFB0:
 |          .cfi_startproc
 |  -       stwu 1,-32(1)
 |  -       .cfi_def_cfa_offset 32
 |  +       stwu 1,-48(1)
 |  +       .cfi_def_cfa_offset 48
 |          mflr 0
 |  -       stw 0,36(1)
 |  -       stw 31,28(1)
 |  +       stw 0,52(1)
 |  +       stw 31,44(1)
 |          .cfi_offset 65, 4
 |          .cfi_offset 31, -4
 |          mr 31,1
 |          .cfi_def_cfa_register 31
 |          lwz 9,0(1)
 |  -       stwu 9,-32(1)
 |  +       stwu 9,-16(1)
 |          addi 9,1,8
 |          addi 9,9,15
 |          srwi 9,9,4
 |  @@ -30,7 +30,7 @@
 |          lwz 3,8(31)
 |          bl bar
 |          nop
 |  -       addi 11,31,32
 |  +       addi 11,31,48
 |          lwz 0,4(11)
 |          mtlr 0
 |          lwz 31,-4(11)
 |  @@ -42,4 +42,4 @@
 |          .cfi_endproc
 |   .LFE0:
 |          .size   foo, .-foo
 |  -       .ident  "GCC: (GNU) 8.3.0"
 |  +       .ident  "GCC: (NetBSD nb1 20190930) 8.3.0"
 |  
 |  I also looked through GCC PRs and commit entries, but didn't find
 |  anything that seemed to directly relate to this. (Having said that, I'm
 |  out of my depths here, so I could well have missed something!)
 
 I think that perhaps the order of the include files is affecting some
 of the stack related macros?
 
 christos
 


Home | Main Index | Thread Index | Old Index