From: Erik P. <epe...@iv...> - 2012-04-17 08:21:46
|
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. Erik |