|
@@ -887,7 +887,12 @@ unit cgcpu;
|
|
|
if ((qword(a) and mask) shr shift)=0 then
|
|
|
list.concat(taicpu.op_reg_reg(A_MOV,reg,NR_R1))
|
|
|
else if ((qword(a) and mask) shr shift)<>$ff then
|
|
|
- list.concat(taicpu.op_reg_const(A_ANDI,reg,(qword(a) and mask) shr shift));
|
|
|
+ begin
|
|
|
+ getcpuregister(list,NR_R26);
|
|
|
+ list.concat(taicpu.op_reg_const(A_LDI,NR_R26,(qword(a) and mask) shr shift));
|
|
|
+ list.concat(taicpu.op_reg_reg(A_AND,reg,NR_R26));
|
|
|
+ ungetcpuregister(list,NR_R26);
|
|
|
+ end;
|
|
|
{ check if we are not in the last iteration to avoid an internalerror in GetNextReg }
|
|
|
if i<tcgsize2size[size] then
|
|
|
NextRegPostInc;
|
|
@@ -900,7 +905,12 @@ unit cgcpu;
|
|
|
if ((a and mask)=1) and (tcgsize2size[size]=1) then
|
|
|
list.concat(taicpu.op_reg(A_DEC,reg))
|
|
|
else
|
|
|
- list.concat(taicpu.op_reg_const(A_SUBI,reg,a and mask));
|
|
|
+ begin
|
|
|
+ getcpuregister(list,NR_R26);
|
|
|
+ list.concat(taicpu.op_reg_const(A_LDI,NR_R26,a and mask));
|
|
|
+ list.concat(taicpu.op_reg_reg(A_SUB,reg,NR_R26));
|
|
|
+ ungetcpuregister(list,NR_R26);
|
|
|
+ end;
|
|
|
if size in [OS_S16,OS_16,OS_S32,OS_32,OS_S64,OS_64] then
|
|
|
begin
|
|
|
for i:=2 to tcgsize2size[size] do
|