+ implemented OP_XOR in tcgz80.a_op_const_reg_internal

git-svn-id: branches/z80@44661 -
This commit is contained in:
nickysn 2020-04-09 14:29:56 +00:00
parent 7a86d193cc
commit eb26cd55d4

View File

@ -872,6 +872,40 @@ unit cgcpu;
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:
begin
list.Concat(tai_comment.Create(strpnew('WARNING! not implemented: a_op_const_reg_internal, OP_shift/ror')));