* fixed sign of location.size for divmodn, 64 shlshrn and for muln

git-svn-id: trunk@9646 -
This commit is contained in:
Jonas Maebe 2008-01-05 21:35:42 +00:00
parent b69b47f92e
commit 9ec3cc2022
2 changed files with 8 additions and 8 deletions

View File

@ -40,7 +40,7 @@ interface
uses
globtype,systems,
cutils,verbose,globals,
symconst,symdef,paramgr,
symconst,symdef,paramgr,defutil,
aasmbase,aasmtai,aasmdata,aasmcpu,
cgbase,procinfo,
ncon,nset,cgutils,tgobj,
@ -108,7 +108,7 @@ interface
hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
hregister2:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
cg64.a_load64_loc_reg(current_asmdata.CurrAsmList,left.location,joinreg64(hregister,hregister2));
location_reset(left.location,LOC_REGISTER,OS_64);
location_reset(left.location,LOC_REGISTER,left.location.size);
left.location.register64.reglo:=hregister;
left.location.register64.reghi:=hregister2;
end
@ -279,7 +279,7 @@ interface
hregister2:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
cg64.a_load64_loc_reg(current_asmdata.CurrAsmList,left.location,joinreg64(hregister,hregister2));
location_freetemp(current_asmdata.CurrAsmList,left.location);
location_reset(left.location,LOC_REGISTER,OS_64);
location_reset(left.location,LOC_REGISTER,left.location.size);
left.location.register64.reglo:=hregister;
left.location.register64.reghi:=hregister2;
end;
@ -354,7 +354,7 @@ interface
pass_left_right;
{The location.register will be filled in later (JM)}
location_reset(location,LOC_REGISTER,OS_INT);
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
{ Mul supports registers and references, so if not register/reference,
load the location into a register}
use_ref:=false;

View File

@ -93,8 +93,8 @@ implementation
{ should be handled in pass_1 (JM) }
internalerror(200109052);
{ put numerator in register }
location_reset(location,LOC_REGISTER,OS_INT);
location_force_reg(current_asmdata.CurrAsmList,left.location,OS_INT,false);
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
location_force_reg(current_asmdata.CurrAsmList,left.location,location.size,false);
hreg1:=left.location.register;
if (nodetype=divn) and (right.nodetype=ordconstn) then
@ -368,10 +368,10 @@ implementation
v : TConstExprInt;
l1,l2,l3:Tasmlabel;
begin
location_reset(location,LOC_REGISTER,OS_64);
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
{ load left operator in a register }
location_force_reg(current_asmdata.CurrAsmList,left.location,OS_64,false);
location_force_reg(current_asmdata.CurrAsmList,left.location,location.size,false);
hreg64hi:=left.location.register64.reghi;
hreg64lo:=left.location.register64.reglo;