mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:09:16 +02:00
* SPARC: OP_NOT can always be done in 32 bits, because for 8 and 16-bit operations the high bits of result are adjusted immediately afterwards.
* "carry clear" flag can be converted into register using a single instruction. git-svn-id: trunk@27984 -
This commit is contained in:
parent
d6c6c84f76
commit
51f6092672
@ -721,24 +721,12 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
procedure TCgSparc.a_op_reg_reg(list:TAsmList;Op:TOpCG;size:TCGSize;src, dst:TRegister);
|
procedure TCgSparc.a_op_reg_reg(list:TAsmList;Op:TOpCG;size:TCGSize;src, dst:TRegister);
|
||||||
var
|
|
||||||
a : aint;
|
|
||||||
begin
|
begin
|
||||||
Case Op of
|
Case Op of
|
||||||
OP_NEG :
|
OP_NEG :
|
||||||
list.concat(taicpu.op_reg_reg(TOpCG2AsmOp[op],src,dst));
|
list.concat(taicpu.op_reg_reg(TOpCG2AsmOp[op],src,dst));
|
||||||
OP_NOT :
|
OP_NOT :
|
||||||
begin
|
list.concat(taicpu.op_reg_reg_reg(A_XNOR,src,NR_G0,dst));
|
||||||
case size of
|
|
||||||
OS_8 :
|
|
||||||
a:=aint($ffffff00);
|
|
||||||
OS_16 :
|
|
||||||
a:=aint($ffff0000);
|
|
||||||
else
|
|
||||||
a:=0;
|
|
||||||
end;
|
|
||||||
handle_reg_const_reg(list,A_XNOR,src,a,dst);
|
|
||||||
end;
|
|
||||||
else
|
else
|
||||||
list.concat(taicpu.op_reg_reg_reg(TOpCG2AsmOp[op],dst,src,dst));
|
list.concat(taicpu.op_reg_reg_reg(TOpCG2AsmOp[op],dst,src,dst));
|
||||||
end;
|
end;
|
||||||
@ -938,10 +926,7 @@ implementation
|
|||||||
if (f in [F_B]) then
|
if (f in [F_B]) then
|
||||||
list.concat(taicpu.op_reg_reg_reg(A_ADDX,NR_G0,NR_G0,reg))
|
list.concat(taicpu.op_reg_reg_reg(A_ADDX,NR_G0,NR_G0,reg))
|
||||||
else if (f in [F_AE]) then
|
else if (f in [F_AE]) then
|
||||||
begin
|
list.concat(taicpu.op_reg_const_reg(A_SUBX,NR_G0,-1,reg))
|
||||||
a_load_const_reg(list,size,1,reg);
|
|
||||||
list.concat(taicpu.op_reg_reg_reg(A_SUBX,reg,NR_G0,reg));
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
current_asmdata.getjumplabel(hl);
|
current_asmdata.getjumplabel(hl);
|
||||||
|
Loading…
Reference in New Issue
Block a user