Re: GDC generates invalid assembly around fiber yield operations (Not re-reading data from clobberedd memory to registers)

2015-05-15 Thread Liran Zvibel via D.gnu
Please feel free to use my code sample in the test suite. I fill post a bug report. Thanks! Liran > On May 15, 2015, at 10:23, Iain Buclaw via D.gnu wrote: > > On 15 May 2015 at 09:13, Iain Buclaw wrote: >> On 15 May 2015 at 09:08, Johannes Pfau via D.gnu wrote: >>> Am Thu, 14 May 2015 19:02

Re: GDC generates invalid assembly around fiber yield operations (Not re-reading data from clobberedd memory to registers)

2015-05-15 Thread Liran Zvibel via D.gnu
Hi, I’m trying to port a 120k loc fiber based application from dmd to gdc, so applying this work around is not a good option for me (also, there are many engineers that will continue generating code…) Thanks Liran > On May 15, 2015, at 10:08, Johannes Pfau via D.gnu > wrote: > > Am Thu, 14 Ma

[Bug 185] Wrong codegen is used for = expressions when there is a function as part of the rvalue.

2015-05-15 Thread via D.gnu
http://bugzilla.gdcproject.org/show_bug.cgi?id=185 --- Comment #1 from Iain Buclaw --- FYI, we enforce strict LTR. The rewrite that was observed in C seems to be as a result of one of the passes in const-fold.c executed by the front-end, and not as a result of the front-end explicitly righting i

Re: -fno-rtti (disable TypeInfo) support ready for testing

2015-05-15 Thread Mike via D.gnu
On Thursday, 14 May 2015 at 15:21:46 UTC, Johannes Pfau wrote: ^ The compiler was still building the xopEquals and xopCMP functions. These use TypeInfo internally but they're also only accessible through TypeInfo. Solution: We should not generate these functions with -fno-rtti. Bo

[Bug 185] New: Wrong codegen is used for = expressions when there is a function as part of the rvalue.

2015-05-15 Thread via D.gnu
http://bugzilla.gdcproject.org/show_bug.cgi?id=185 Bug ID: 185 Summary: Wrong codegen is used for = expressions when there is a function as part of the rvalue. Product: GDC Version: 4.9.x Hardware: x86_64 OS

Re: GDC generates invalid assembly around fiber yield operations (Not re-reading data from clobberedd memory to registers)

2015-05-15 Thread Johannes Pfau via D.gnu
Am Fri, 15 May 2015 09:23:33 +0200 schrieb "Iain Buclaw via D.gnu" : > On 15 May 2015 at 09:13, Iain Buclaw wrote: > > On 15 May 2015 at 09:08, Johannes Pfau via D.gnu > > wrote: > >> Am Thu, 14 May 2015 19:02:48 +0200 > >> schrieb Johannes Pfau : > >> > >>> ... > >> > >> TLDR > >> As a workarou

Re: GDC generates invalid assembly around fiber yield operations (Not re-reading data from clobberedd memory to registers)

2015-05-15 Thread Iain Buclaw via D.gnu
On 15 May 2015 at 09:13, Iain Buclaw wrote: > On 15 May 2015 at 09:08, Johannes Pfau via D.gnu wrote: >> Am Thu, 14 May 2015 19:02:48 +0200 >> schrieb Johannes Pfau : >> >>> ... >> >> TLDR >> As a workaround replace >> >> globalSum += otherFunc(); >> >> which GDC currently treats as >> >> globalS

Re: GDC generates invalid assembly around fiber yield operations (Not re-reading data from clobberedd memory to registers)

2015-05-15 Thread Iain Buclaw via D.gnu
On 15 May 2015 at 09:08, Johannes Pfau via D.gnu wrote: > Am Thu, 14 May 2015 19:02:48 +0200 > schrieb Johannes Pfau : > >> ... > > TLDR > As a workaround replace > > globalSum += otherFunc(); > > which GDC currently treats as > > globalSum = globalSum + otherFunc(); > > with > > globalSum = other

Re: GDC generates invalid assembly around fiber yield operations (Not re-reading data from clobberedd memory to registers)

2015-05-15 Thread Johannes Pfau via D.gnu
Am Thu, 14 May 2015 19:02:48 +0200 schrieb Johannes Pfau : > ... TLDR As a workaround replace globalSum += otherFunc(); which GDC currently treats as globalSum = globalSum + otherFunc(); with globalSum = otherFunc() + globalSum;