Am 17.04.2012 10:21, schrieb Erik Petrich:
>
>
> On Mon, 16 Apr 2012, Philipp Klaus Krause wrote:
>
>> Thanks a lot!. There's one more issue I don't see clearly: When removing
>> the comments at
>>
>> /*if(ic->op == RECEIVE && (!ic->next || !(ic->next->op == RECEIVE) ||
>> !result_in_X || getSize(operandType(result)) >= 2))
>> return(true);*/
>>
>> in ralloc2.cc, I get some regression failures. I looked at the diff in
>> the asm generated, but couldn't see the problem. A typical one
>> (gcc-torture-execute_compare-3) is attached.
>
> The comparison is trying to use A, but sees that A is already in use and
> so pushes it onto the stack. However, if the result of the comparison is
> determined before the last byte is compared, the branch is taken without
> restoring A from the stack.
>
> The simplest fix would be to move the push/pull into the loop so that it
> is done for each byte of the comparison rather than once for the overall
> comparison.
>
> For the special case of an operand in XA and a comparison of equal or not
> equal it's possible to optimize further by using the cpx (compare X)
> instruction.
Thanks; I fixed it the way you suggested. The current revision is #7594,
and while there is still a lot to be done (e.g. two regression test
failures, the AX stuff, the GEN_POINTER_GET thing, some iCodes, most
notable SEND and pointer set) code size for the regression tests is for
the first time below what the old allocator achieves (2551874 vs.
2553970 Bytes).
Philipp
|