|
@@ -237,9 +237,15 @@ interface
|
|
|
end;
|
|
|
if right.location.loc=LOC_CONSTANT then
|
|
|
begin
|
|
|
- tmpreg2:=cg.getintregister(current_asmdata.CurrAsmList,OS_8);
|
|
|
- cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_8,(right.location.value64 shr ((i-1)*8)) and $ff,tmpreg2);
|
|
|
- current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CPC,tmpreg1,tmpreg2));
|
|
|
+ { just use R1? }
|
|
|
+ if ((right.location.value64 shr ((i-1)*8)) and $ff)=0 then
|
|
|
+ current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CPC,tmpreg1,NR_R1))
|
|
|
+ else
|
|
|
+ begin
|
|
|
+ tmpreg2:=cg.getintregister(current_asmdata.CurrAsmList,OS_8);
|
|
|
+ cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_8,(right.location.value64 shr ((i-1)*8)) and $ff,tmpreg2);
|
|
|
+ current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CPC,tmpreg1,tmpreg2));
|
|
|
+ end;
|
|
|
end
|
|
|
{ above it is checked, if left=0, then a constant is allowed }
|
|
|
else if (left.location.loc=LOC_CONSTANT) and (left.location.value=0) then
|