> I'm a tad confused in regards to the best course of action regarding MOVZX. Many of the peephole optimisations seek to change them to MOV followed by AND (e.g. "movzbl (mem), %eax" to "mov (mem), %al; and $0xff, %eax"). Does MOVZX have a well-documented performance penalty in modern processors that favours the MOV/AND combination? It seems odd because the combination implies a pipeline stall, which becomes more pronounced if the MOV instruction is reading from memory.
For intel pentium and earlier processors combination MOV, AND was better, but now days cpu handle MOVZX as good as MOV. It's just question for which cpu to optimize? _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel