|
@@ -266,7 +266,7 @@ end;
|
|
|
begin
|
|
|
if (tordconstnode(right).value = 0) then begin
|
|
|
internalerror(2005061702);
|
|
|
- end else if (abs(tordconstnode(right).value) = 1) then begin
|
|
|
+ end else if (abs(tordconstnode(right).value.svalue) = 1) then begin
|
|
|
// x mod +/-1 is always zero
|
|
|
cg.a_load_const_reg(current_asmdata.CurrAsmList, OS_INT, 0, resultreg);
|
|
|
end else if (ispowerof2(tordconstnode(right).value, power)) then begin
|
|
@@ -276,7 +276,7 @@ end;
|
|
|
maskreg := cg.getintregister(current_asmdata.CurrAsmList, OS_INT);
|
|
|
modreg := cg.getintregister(current_asmdata.CurrAsmList, OS_INT);
|
|
|
|
|
|
- cg.a_load_const_reg(current_asmdata.CurrAsmList, OS_INT, abs(tordconstnode(right).value)-1, modreg);
|
|
|
+ cg.a_load_const_reg(current_asmdata.CurrAsmList, OS_INT, abs(tordconstnode(right).value.svalue)-1, modreg);
|
|
|
cg.a_op_const_reg_reg(current_asmdata.CurrAsmList, OP_SAR, OS_INT, 31, numerator, maskreg);
|
|
|
cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList, OP_AND, OS_INT, numerator, modreg, tempreg);
|
|
|
|