mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-09 12:29:28 +02:00
+ implemented OP_XOR in tcgz80.a_op_const_reg_internal
git-svn-id: branches/z80@44661 -
This commit is contained in:
parent
7a86d193cc
commit
eb26cd55d4
@ -872,6 +872,40 @@ unit cgcpu;
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
OP_XOR:
|
||||||
|
begin
|
||||||
|
curvalue:=a and mask;
|
||||||
|
for i:=1 to tcgsize2size[size] do
|
||||||
|
begin
|
||||||
|
case curvalue of
|
||||||
|
0:
|
||||||
|
{nothing};
|
||||||
|
$ff:
|
||||||
|
begin
|
||||||
|
getcpuregister(list,NR_A);
|
||||||
|
emit_mov(list,NR_A,reg);
|
||||||
|
list.concat(taicpu.op_none(A_CPL));
|
||||||
|
emit_mov(list,reg,NR_A);
|
||||||
|
ungetcpuregister(list,NR_A);
|
||||||
|
end;
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
getcpuregister(list,NR_A);
|
||||||
|
emit_mov(list,NR_A,reg);
|
||||||
|
list.concat(taicpu.op_reg_const(A_XOR,NR_A,curvalue));
|
||||||
|
emit_mov(list,reg,NR_A);
|
||||||
|
ungetcpuregister(list,NR_A);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if i<>tcgsize2size[size] then
|
||||||
|
begin
|
||||||
|
NextReg;
|
||||||
|
mask:=mask shl 8;
|
||||||
|
inc(shift,8);
|
||||||
|
curvalue:=(qword(a) and mask) shr shift;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
OP_SHR,OP_SHL,OP_SAR,OP_ROL,OP_ROR:
|
OP_SHR,OP_SHL,OP_SAR,OP_ROL,OP_ROR:
|
||||||
begin
|
begin
|
||||||
list.Concat(tai_comment.Create(strpnew('WARNING! not implemented: a_op_const_reg_internal, OP_shift/ror')));
|
list.Concat(tai_comment.Create(strpnew('WARNING! not implemented: a_op_const_reg_internal, OP_shift/ror')));
|
||||||
|
Loading…
Reference in New Issue
Block a user