Daniel Glöckner wrote:
On Mon, Oct 03, 2016 at 12:48:00PM +0200, grischka wrote:
Ok, have seen it: crash in "make test".

So it's
        long long *p, v;
        p = &v;
        p[0]++;
that is miscompiled without the save_regs.

To load the upper half of p[0] 4 is added to the register that holds p.
But the register may not be modified because it is still used further
down on vtop to store the incremented value.

So actually we just have to save all entries on vtop that use the same
register as the topmost one. ...

I think that could work:
     
http://repo.or.cz/tinycc.git/commitdiff/b691585785086024549cfb9ac65f3397263965aa

(@Michael: with test in tcctest.c ;)

--- grischka


Best regards,

  Daniel

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to