|
@@ -446,22 +446,22 @@ implementation
|
|
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_32,right.location.value,hreg2);
|
|
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_32,right.location.value,hreg2);
|
|
emit_reg_reg(A_BT,S_L,hreg,hreg2);
|
|
emit_reg_reg(A_BT,S_L,hreg,hreg2);
|
|
end;
|
|
end;
|
|
- else
|
|
|
|
- begin
|
|
|
|
- emit_const_ref(A_CMP,TCGSize2OpSize[orgopsize],31,left.location.reference);
|
|
|
|
- cg.a_jmp_flags(current_asmdata.CurrAsmList,F_BE,l);
|
|
|
|
- { reset carry flag }
|
|
|
|
- current_asmdata.CurrAsmList.concat(taicpu.op_none(A_CLC,S_NO));
|
|
|
|
- cg.a_jmp_always(current_asmdata.CurrAsmList,l2);
|
|
|
|
- cg.a_label(current_asmdata.CurrAsmList,l);
|
|
|
|
- hreg:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
|
|
|
|
- cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_32,OS_32,left.location.reference,hreg);
|
|
|
|
- { We have to load the value into a register because
|
|
|
|
- btl does not accept values only refs or regs (PFV) }
|
|
|
|
- hreg2:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
|
|
|
|
- cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_32,right.location.value,hreg2);
|
|
|
|
- emit_reg_reg(A_BT,S_L,hreg,hreg2);
|
|
|
|
- end;
|
|
|
|
|
|
+ else
|
|
|
|
+ begin
|
|
|
|
+ emit_const_ref(A_CMP,TCGSize2OpSize[orgopsize],31,left.location.reference);
|
|
|
|
+ cg.a_jmp_flags(current_asmdata.CurrAsmList,F_BE,l);
|
|
|
|
+ { reset carry flag }
|
|
|
|
+ current_asmdata.CurrAsmList.concat(taicpu.op_none(A_CLC,S_NO));
|
|
|
|
+ cg.a_jmp_always(current_asmdata.CurrAsmList,l2);
|
|
|
|
+ cg.a_label(current_asmdata.CurrAsmList,l);
|
|
|
|
+ hreg:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
|
|
|
|
+ cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_32,OS_32,left.location.reference,hreg);
|
|
|
|
+ { We have to load the value into a register because
|
|
|
|
+ btl does not accept values only refs or regs (PFV) }
|
|
|
|
+ hreg2:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
|
|
|
|
+ cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_32,right.location.value,hreg2);
|
|
|
|
+ emit_reg_reg(A_BT,S_L,hreg,hreg2);
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
cg.a_label(current_asmdata.CurrAsmList,l2);
|
|
cg.a_label(current_asmdata.CurrAsmList,l2);
|
|
end { of right.location.loc=LOC_CONSTANT }
|
|
end { of right.location.loc=LOC_CONSTANT }
|
|
@@ -491,7 +491,9 @@ implementation
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
location_force_reg(current_asmdata.CurrAsmList,left.location,opsize,false);
|
|
location_force_reg(current_asmdata.CurrAsmList,left.location,opsize,false);
|
|
- register_maybe_adjust_setbase(current_asmdata.CurrAsmList,left.location,setbase);
|
|
|
|
|
|
+ register_maybe_adjust_setbase(current_asmdata.CurrAsmList,left.location,setbase);
|
|
|
|
+ if (right.location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
|
|
|
+ location_force_reg(current_asmdata.CurrAsmList,right.location,opsize,true);
|
|
pleftreg:=left.location.register;
|
|
pleftreg:=left.location.register;
|
|
|
|
|
|
if (opsize >= OS_S8) or { = if signed }
|
|
if (opsize >= OS_S8) or { = if signed }
|