mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:09:42 +02:00
tiny optimization for clearing address regs
git-svn-id: trunk@26569 -
This commit is contained in:
parent
047395df5f
commit
667ec17cae
@ -715,7 +715,11 @@ unit cgcpu;
|
||||
begin
|
||||
if isaddressregister(register) then
|
||||
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
|
||||
else
|
||||
if a = 0 then
|
||||
|
Loading…
Reference in New Issue
Block a user