* hopefully i8086 compilation fixed

This commit is contained in:
florian 2021-10-24 13:48:09 +02:00
parent feb9274963
commit 62875030b5

View File

@ -1243,42 +1243,37 @@ unit cgcpu;
procedure tcg8086.a_op_ref(list: TAsmList; Op: TOpCG; size: TCGSize; const ref: TReference); procedure tcg8086.a_op_ref(list: TAsmList; Op: TOpCG; size: TCGSize; const ref: TReference);
begin
var var
tmpref: treference; tmpref : treference;
op1, op2: TAsmOp;
begin begin
tmpref:=ref; tmpref:=ref;
make_simple_ref(list,tmpref); make_simple_ref(list,tmpref);
check_register_size(size,reg);
if size in [OS_64, OS_S64] then if size in [OS_64, OS_S64] then
internalerror(2013050803); internalerror(2013030906);
if size in [OS_32, OS_S32] then if size in [OS_32, OS_S32] then
begin begin
case op of case op of
OP_NEG: OP_ADD,OP_SUB,OP_XOR,OP_OR,OP_AND:
begin begin
inc(tmpref.offset, 2); get_32bit_ops(op, op1, op2);
list.concat(taicpu.op_ref(A_NOT, S_W, tmpref)); if op in [OP_ADD,OP_SUB] then
dec(tmpref.offset, 2);
cg.a_reg_alloc(list,NR_DEFAULTFLAGS); cg.a_reg_alloc(list,NR_DEFAULTFLAGS);
list.concat(taicpu.op_ref(A_NEG, S_W, tmpref)); list.concat(taicpu.op_ref_reg(op1, S_W, tmpref, reg));
inc(tmpref.offset, 2); inc(tmpref.offset, 2);
list.concat(taicpu.op_const_ref(A_SBB, S_W,-1, tmpref)); list.concat(taicpu.op_ref_reg(op2, S_W, tmpref, GetNextReg(reg)));
if op in [OP_ADD,OP_SUB] then
cg.a_reg_dealloc(list,NR_DEFAULTFLAGS); cg.a_reg_dealloc(list,NR_DEFAULTFLAGS);
end; end;
OP_NOT:
begin
list.concat(taicpu.op_ref(A_NOT, S_W, tmpref));
inc(tmpref.offset, 2);
list.concat(taicpu.op_ref(A_NOT, S_W, tmpref));
end;
else else
internalerror(2020050709); internalerror(2013050701);
end; end;
end end
else else
inherited a_op_reg_ref(list,Op,size,reg,tmpref); inherited a_op_ref_reg(list,Op,size,tmpref,reg);
end; end;