tiny optimization for clearing address regs

git-svn-id: trunk@26569 -
This commit is contained in:
Károly Balogh 2014-01-23 02:29:45 +00:00
parent 047395df5f
commit 667ec17cae

View File

@ -715,7 +715,11 @@ unit cgcpu;
begin begin
if isaddressregister(register) then if isaddressregister(register) then
begin begin
list.concat(taicpu.op_const_reg(A_MOVE,S_L,longint(a),register)) { an m68k manual I have recommends SUB Ax,Ax to be used instead of CLR for address regs }
if a = 0 then
list.concat(taicpu.op_reg_reg(A_SUB,S_L,register,register))
else
list.concat(taicpu.op_const_reg(A_MOVE,S_L,longint(a),register));
end end
else else
if a = 0 then if a = 0 then