[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Largish mob update from me
From: |
Michael Matz |
Subject: |
Re: [Tinycc-devel] Largish mob update from me |
Date: |
Sun, 18 Dec 2016 02:07:00 +0100 (CET) |
User-agent: |
Alpine 2.20 (LSU 67 2015-01-07) |
Hi,
On Fri, 16 Dec 2016, grischka wrote:
Therfor before we change assumptions (which we clearly do as soon as we
start to use 'nocode_wanted' for optimization purposes) I'd really like
to see the below working under all tests and everything except fire in
the computer:
ST_FUNC void g(int c)
{
int ind1;
if (nocode_wanted)
tcc_error("internal: code generated but nocode_wanted");
ind1 = ind + 1;
True. The use of nocode_wanted (and even more so my extension to suppress
code generation for optimization) is somewhat fragile until the above
works. But OTOH this "misuse" mostly works right now :) Generating jumpy
code (i.e. in conditionals and for top-level statements) as well as
gv/gvtst is most susceptible currently to trigger an assert like the above
as reflected in one of my added comments:
/* XXX This doesn't handle nocode_wanted correctly at all.
It unconditionally calls gv/gvtst and friends. That's
the case for many of the expr_ routines. Currently
that should generate only useless code, but depending
on other operand handling this might also generate
pointer derefs for lvalue conversions whose result
is useless, but nevertheless can lead to segfault.
Somewhen we need to overhaul the whole nocode_wanted
handling. */
(Though I meanwhile I was a bit overstating the problem with gv. But
gvtst is a problem)
Ciao,
Michael.
Re: [Tinycc-devel] Largish mob update from me, Thomas Preud'homme, 2016/12/17
Re: [Tinycc-devel] Largish mob update from me, Steffen Nurpmeso, 2016/12/21