Hi everyone,
So I had some difficulty reproducing a regression with my latest
optimisation patch, but a couple of days ago I finally reproduced it and
isolated the cause. As explained in the topic, my optimisation was
faulty with the instruction pair "movb $-63,%al; movsbw %al,%ax" and
other similar constructs - negative constants weren't handled properly.
It seems that not all regressions are caught when you run the test suite
conventionally, and you have to specify additional options like "-O4",
which may cause other failures to occur if a test is not expecting any
kind of intense optimisation, for example. In response, over here at
https://bugs.freepascal.org/view.php?id=36687, I've introduced two new
tests that are copies of the ones that failed, but which explicitly add
-O4 to the default compiler options. Besides covering the fault in my
patch, I can see these tests proving useful later on because I can see
future peephole optimisations in the compiled assembly language (e.g.
the following triplet appears... "movw $65280,%ax; cmp $65280,%ax; je
@lbl"... logical analysis shows that the conditional branch is always
taken).
Long story short, the patch /finally/ works and a full run of the
regression suite on i386-win32 and x86_64-win64, including the two new
tests, show no new failures.
Gareth aka. Kit
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel