mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 09:49:35 +02:00
* a_load_loc_reg now has an extra size parameter for the destination
register (properly fixes what I worked around in revision 1.106 of ncgutil.pas)
This commit is contained in:
parent
1daf2ca476
commit
e7e2cfe9a4
@ -110,7 +110,7 @@ unit cg64f64;
|
|||||||
|
|
||||||
procedure tcg64f64.a_load64_loc_reg(list : taasmoutput;const l : tlocation;reg : tregister64);
|
procedure tcg64f64.a_load64_loc_reg(list : taasmoutput;const l : tlocation;reg : tregister64);
|
||||||
begin
|
begin
|
||||||
cg.a_load_loc_reg(list,l,reg);
|
cg.a_load_loc_reg(list,l.size,l,reg);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tcg64f64.a_load64_loc_ref(list : taasmoutput;const l : tlocation;const ref : treference);
|
procedure tcg64f64.a_load64_loc_ref(list : taasmoutput;const l : tlocation;const ref : treference);
|
||||||
@ -225,7 +225,12 @@ unit cg64f64;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 2003-01-05 13:36:53 florian
|
Revision 1.7 2003-05-30 23:49:18 jonas
|
||||||
|
* a_load_loc_reg now has an extra size parameter for the destination
|
||||||
|
register (properly fixes what I worked around in revision 1.106 of
|
||||||
|
ncgutil.pas)
|
||||||
|
|
||||||
|
Revision 1.6 2003/01/05 13:36:53 florian
|
||||||
* x86-64 compiles
|
* x86-64 compiles
|
||||||
+ very basic support for float128 type (x86-64 only)
|
+ very basic support for float128 type (x86-64 only)
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ unit cgobj;
|
|||||||
procedure a_load_reg_loc(list : taasmoutput;size : tcgsize;reg : tregister;const loc: tlocation);
|
procedure a_load_reg_loc(list : taasmoutput;size : tcgsize;reg : tregister;const loc: tlocation);
|
||||||
procedure a_load_ref_reg(list : taasmoutput;size : tcgsize;const ref : treference;register : tregister);virtual; abstract;
|
procedure a_load_ref_reg(list : taasmoutput;size : tcgsize;const ref : treference;register : tregister);virtual; abstract;
|
||||||
procedure a_load_ref_ref(list : taasmoutput;size : tcgsize;const sref : treference;const dref : treference);virtual;
|
procedure a_load_ref_ref(list : taasmoutput;size : tcgsize;const sref : treference;const dref : treference);virtual;
|
||||||
procedure a_load_loc_reg(list : taasmoutput;const loc: tlocation; reg : tregister);
|
procedure a_load_loc_reg(list : taasmoutput; dstsize: tcgsize; const loc: tlocation; reg : tregister);
|
||||||
procedure a_load_loc_ref(list : taasmoutput;const loc: tlocation; const ref : treference);
|
procedure a_load_loc_ref(list : taasmoutput;const loc: tlocation; const ref : treference);
|
||||||
procedure a_loadaddr_ref_reg(list : taasmoutput;const ref : treference;r : tregister);virtual; abstract;
|
procedure a_loadaddr_ref_reg(list : taasmoutput;const ref : treference;r : tregister);virtual; abstract;
|
||||||
|
|
||||||
@ -832,14 +832,14 @@ unit cgobj;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcg.a_load_loc_reg(list : taasmoutput;const loc: tlocation; reg : tregister);
|
procedure tcg.a_load_loc_reg(list : taasmoutput; dstsize: tcgsize; const loc: tlocation; reg : tregister);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
case loc.loc of
|
case loc.loc of
|
||||||
LOC_REFERENCE,LOC_CREFERENCE:
|
LOC_REFERENCE,LOC_CREFERENCE:
|
||||||
a_load_ref_reg(list,loc.size,loc.reference,reg);
|
a_load_ref_reg(list,loc.size,loc.reference,reg);
|
||||||
LOC_REGISTER,LOC_CREGISTER:
|
LOC_REGISTER,LOC_CREGISTER:
|
||||||
a_load_reg_reg(list,loc.size,loc.size,loc.register,reg);
|
a_load_reg_reg(list,loc.size,dstsize,loc.register,reg);
|
||||||
LOC_CONSTANT:
|
LOC_CONSTANT:
|
||||||
a_load_const_reg(list,loc.size,loc.value,reg);
|
a_load_const_reg(list,loc.size,loc.value,reg);
|
||||||
else
|
else
|
||||||
@ -1691,7 +1691,12 @@ finalization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.101 2003-05-30 21:40:00 jonas
|
Revision 1.102 2003-05-30 23:49:18 jonas
|
||||||
|
* a_load_loc_reg now has an extra size parameter for the destination
|
||||||
|
register (properly fixes what I worked around in revision 1.106 of
|
||||||
|
ncgutil.pas)
|
||||||
|
|
||||||
|
Revision 1.101 2003/05/30 21:40:00 jonas
|
||||||
* fixed bug in a_load_loc_ref (the source instead of dest size was passed
|
* fixed bug in a_load_loc_ref (the source instead of dest size was passed
|
||||||
to a_load_reg_ref in case of a register)
|
to a_load_reg_ref in case of a register)
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ interface
|
|||||||
r.number:=NR_EDI;
|
r.number:=NR_EDI;
|
||||||
rg.getexplicitregisterint(exprasmlist,NR_EDI);
|
rg.getexplicitregisterint(exprasmlist,NR_EDI);
|
||||||
{$endif}
|
{$endif}
|
||||||
cg.a_load_loc_reg(exprasmlist,right.location,r);
|
cg.a_load_loc_reg(exprasmlist,OS_INT,right.location,r);
|
||||||
emit_reg_reg(op,opsize,left.location.register,r);
|
emit_reg_reg(op,opsize,left.location.register,r);
|
||||||
emit_reg_reg(A_MOV,opsize,r,left.location.register);
|
emit_reg_reg(A_MOV,opsize,r,left.location.register);
|
||||||
rg.ungetregisterint(exprasmlist,r);
|
rg.ungetregisterint(exprasmlist,r);
|
||||||
@ -285,7 +285,7 @@ interface
|
|||||||
r.enum:=R_INTREGISTER;
|
r.enum:=R_INTREGISTER;
|
||||||
r.number:=NR_EDI;
|
r.number:=NR_EDI;
|
||||||
{$endif}
|
{$endif}
|
||||||
cg.a_load_loc_reg(exprasmlist,right.location,r);
|
cg.a_load_loc_reg(exprasmlist,OS_INT,right.location,r);
|
||||||
emit_reg(A_NOT,S_L,r);
|
emit_reg(A_NOT,S_L,r);
|
||||||
emit_reg_reg(A_AND,S_L,r,left.location.register);
|
emit_reg_reg(A_AND,S_L,r,left.location.register);
|
||||||
rg.ungetregisterint(exprasmlist,r);
|
rg.ungetregisterint(exprasmlist,r);
|
||||||
@ -1298,14 +1298,14 @@ interface
|
|||||||
{Get a temp register and load the left value into it
|
{Get a temp register and load the left value into it
|
||||||
and free the location.}
|
and free the location.}
|
||||||
r:=rg.getregisterint(exprasmlist,OS_INT);
|
r:=rg.getregisterint(exprasmlist,OS_INT);
|
||||||
cg.a_load_loc_reg(exprasmlist,left.location,r);
|
cg.a_load_loc_reg(exprasmlist,OS_INT,left.location,r);
|
||||||
location_release(exprasmlist,left.location);
|
location_release(exprasmlist,left.location);
|
||||||
{Allocate EAX.}
|
{Allocate EAX.}
|
||||||
rg.getexplicitregisterint(exprasmlist,NR_EAX);
|
rg.getexplicitregisterint(exprasmlist,NR_EAX);
|
||||||
r_eax.enum:=R_INTREGISTER;
|
r_eax.enum:=R_INTREGISTER;
|
||||||
r_eax.number:=NR_EAX;
|
r_eax.number:=NR_EAX;
|
||||||
{Load the right value.}
|
{Load the right value.}
|
||||||
cg.a_load_loc_reg(exprasmlist,right.location,r_eax);
|
cg.a_load_loc_reg(exprasmlist,OS_INT,right.location,r_eax);
|
||||||
location_release(exprasmlist,right.location);
|
location_release(exprasmlist,right.location);
|
||||||
{The mul instruction frees register r.}
|
{The mul instruction frees register r.}
|
||||||
rg.ungetregisterint(exprasmlist,r);
|
rg.ungetregisterint(exprasmlist,r);
|
||||||
@ -1369,14 +1369,14 @@ interface
|
|||||||
rg.getexplicitregisterint(exprasmlist,NR_EDI);
|
rg.getexplicitregisterint(exprasmlist,NR_EDI);
|
||||||
{ load the left value }
|
{ load the left value }
|
||||||
r.number:=NR_EDI;
|
r.number:=NR_EDI;
|
||||||
cg.a_load_loc_reg(exprasmlist,left.location,r);
|
cg.a_load_loc_reg(exprasmlist,OS_INT,left.location,r);
|
||||||
location_release(exprasmlist,left.location);
|
location_release(exprasmlist,left.location);
|
||||||
{ allocate EAX }
|
{ allocate EAX }
|
||||||
r.number:=NR_EAX;
|
r.number:=NR_EAX;
|
||||||
if RS_EAX in rg.unusedregsint then
|
if RS_EAX in rg.unusedregsint then
|
||||||
exprasmList.concat(tai_regalloc.Alloc(r));
|
exprasmList.concat(tai_regalloc.Alloc(r));
|
||||||
{ load he right value }
|
{ load he right value }
|
||||||
cg.a_load_loc_reg(exprasmlist,right.location,r);
|
cg.a_load_loc_reg(exprasmlist,OS_INT,right.location,r);
|
||||||
location_release(exprasmlist,right.location);
|
location_release(exprasmlist,right.location);
|
||||||
{ allocate EAX if it isn't yet allocated (JM) }
|
{ allocate EAX if it isn't yet allocated (JM) }
|
||||||
if (RS_EAX in rg.unusedregsint) then
|
if (RS_EAX in rg.unusedregsint) then
|
||||||
@ -1607,7 +1607,12 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.68 2003-05-26 19:38:28 peter
|
Revision 1.69 2003-05-30 23:49:18 jonas
|
||||||
|
* a_load_loc_reg now has an extra size parameter for the destination
|
||||||
|
register (properly fixes what I worked around in revision 1.106 of
|
||||||
|
ncgutil.pas)
|
||||||
|
|
||||||
|
Revision 1.68 2003/05/26 19:38:28 peter
|
||||||
* generic fpc_shorstr_concat
|
* generic fpc_shorstr_concat
|
||||||
+ fpc_shortstr_append_shortstr optimization
|
+ fpc_shortstr_append_shortstr optimization
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ implementation
|
|||||||
hregister:=cg.get_scratch_reg_int(exprasmlist,OS_INT);
|
hregister:=cg.get_scratch_reg_int(exprasmlist,OS_INT);
|
||||||
{$endif newra}
|
{$endif newra}
|
||||||
end;
|
end;
|
||||||
cg.a_load_loc_reg(exprasmlist,tcallparanode(tcallparanode(left).right).left.location,hregister);
|
cg.a_load_loc_reg(exprasmlist,OS_INT,tcallparanode(tcallparanode(left).right).left.location,hregister);
|
||||||
if (tcallparanode(left).left.location.loc=LOC_REFERENCE) then
|
if (tcallparanode(left).left.location.loc=LOC_REFERENCE) then
|
||||||
emit_reg_ref(asmop,S_L,hregister,tcallparanode(left).left.location.reference)
|
emit_reg_ref(asmop,S_L,hregister,tcallparanode(left).left.location.reference)
|
||||||
else
|
else
|
||||||
@ -345,7 +345,12 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.60 2003-04-23 09:50:31 peter
|
Revision 1.61 2003-05-30 23:49:18 jonas
|
||||||
|
* a_load_loc_reg now has an extra size parameter for the destination
|
||||||
|
register (properly fixes what I worked around in revision 1.106 of
|
||||||
|
ncgutil.pas)
|
||||||
|
|
||||||
|
Revision 1.60 2003/04/23 09:50:31 peter
|
||||||
* wrong location_copy for include/exclude
|
* wrong location_copy for include/exclude
|
||||||
|
|
||||||
Revision 1.59 2003/04/22 23:50:23 peter
|
Revision 1.59 2003/04/22 23:50:23 peter
|
||||||
|
@ -319,7 +319,7 @@ implementation
|
|||||||
hdenom := rg.getregisterint(exprasmlist,OS_INT);
|
hdenom := rg.getregisterint(exprasmlist,OS_INT);
|
||||||
if right.location.loc<>LOC_CREGISTER then
|
if right.location.loc<>LOC_CREGISTER then
|
||||||
location_release(exprasmlist,right.location);
|
location_release(exprasmlist,right.location);
|
||||||
cg.a_load_loc_reg(exprasmlist,right.location,hdenom);
|
cg.a_load_loc_reg(exprasmlist,right.location.size,right.location,hdenom);
|
||||||
{ verify if the divisor is zero, if so return an error
|
{ verify if the divisor is zero, if so return an error
|
||||||
immediately
|
immediately
|
||||||
}
|
}
|
||||||
@ -395,7 +395,7 @@ implementation
|
|||||||
if right.location.loc<>LOC_CREGISTER then
|
if right.location.loc<>LOC_CREGISTER then
|
||||||
location_release(exprasmlist,right.location);
|
location_release(exprasmlist,right.location);
|
||||||
hcountreg:=cg.get_scratch_reg_int(exprasmlist);
|
hcountreg:=cg.get_scratch_reg_int(exprasmlist);
|
||||||
cg.a_load_loc_reg(exprasmlist,right.location,hcountreg);
|
cg.a_load_loc_reg(exprasmlist,right.location.size,right.location,hcountreg);
|
||||||
freescratch := true;
|
freescratch := true;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -442,7 +442,7 @@ implementation
|
|||||||
hcountreg:=cg.get_scratch_reg_int(exprasmlist,OS_INT);
|
hcountreg:=cg.get_scratch_reg_int(exprasmlist,OS_INT);
|
||||||
{$endif}
|
{$endif}
|
||||||
freescratch := true;
|
freescratch := true;
|
||||||
cg.a_load_loc_reg(exprasmlist,right.location,hcountreg);
|
cg.a_load_loc_reg(exprasmlist,right.location.size,right.location,hcountreg);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
hcountreg:=right.location.register;
|
hcountreg:=right.location.register;
|
||||||
@ -467,7 +467,12 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.10 2003-05-23 14:27:35 peter
|
Revision 1.11 2003-05-30 23:49:18 jonas
|
||||||
|
* a_load_loc_reg now has an extra size parameter for the destination
|
||||||
|
register (properly fixes what I worked around in revision 1.106 of
|
||||||
|
ncgutil.pas)
|
||||||
|
|
||||||
|
Revision 1.10 2003/05/23 14:27:35 peter
|
||||||
* remove some unit dependencies
|
* remove some unit dependencies
|
||||||
* current_procinfo changes to store more info
|
* current_procinfo changes to store more info
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
location_release(exprasmlist,left.location);
|
location_release(exprasmlist,left.location);
|
||||||
reference_reset_base(href,rg.getaddressregister(exprasmlist),tobjectdef(left.resulttype.def).vmt_offset);
|
reference_reset_base(href,rg.getaddressregister(exprasmlist),tobjectdef(left.resulttype.def).vmt_offset);
|
||||||
cg.a_load_loc_reg(exprasmlist,left.location,href.base);
|
cg.a_load_loc_reg(exprasmlist,OS_ADDR,left.location,href.base);
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
internalerror(200305057);
|
internalerror(200305057);
|
||||||
@ -250,7 +250,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
location_release(exprasmlist,left.location);
|
location_release(exprasmlist,left.location);
|
||||||
location.reference.base:=rg.getaddressregister(exprasmlist);
|
location.reference.base:=rg.getaddressregister(exprasmlist);
|
||||||
cg.a_load_loc_reg(exprasmlist,left.location,location.reference.base);
|
cg.a_load_loc_reg(exprasmlist,OS_ADDR,left.location,location.reference.base);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if (cs_gdb_heaptrc in aktglobalswitches) and
|
if (cs_gdb_heaptrc in aktglobalswitches) and
|
||||||
@ -297,7 +297,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
location_release(exprasmlist,left.location);
|
location_release(exprasmlist,left.location);
|
||||||
location.reference.base:=rg.getaddressregister(exprasmlist);
|
location.reference.base:=rg.getaddressregister(exprasmlist);
|
||||||
cg.a_load_loc_reg(exprasmlist,left.location,location.reference.base);
|
cg.a_load_loc_reg(exprasmlist,OS_ADDR,left.location,location.reference.base);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{ implicit deferencing }
|
{ implicit deferencing }
|
||||||
@ -482,7 +482,7 @@ implementation
|
|||||||
hreg := cg.get_scratch_reg_int(exprasmlist,OS_INT);
|
hreg := cg.get_scratch_reg_int(exprasmlist,OS_INT);
|
||||||
{$endif}
|
{$endif}
|
||||||
freereg:=true;
|
freereg:=true;
|
||||||
cg.a_load_loc_reg(exprasmlist,right.location,hreg);
|
cg.a_load_loc_reg(exprasmlist,OS_INT,right.location,hreg);
|
||||||
end;
|
end;
|
||||||
objectlibrary.getlabel(neglabel);
|
objectlibrary.getlabel(neglabel);
|
||||||
objectlibrary.getlabel(poslabel);
|
objectlibrary.getlabel(poslabel);
|
||||||
@ -824,7 +824,12 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.54 2003-05-15 16:10:37 florian
|
Revision 1.55 2003-05-30 23:49:18 jonas
|
||||||
|
* a_load_loc_reg now has an extra size parameter for the destination
|
||||||
|
register (properly fixes what I worked around in revision 1.106 of
|
||||||
|
ncgutil.pas)
|
||||||
|
|
||||||
|
Revision 1.54 2003/05/15 16:10:37 florian
|
||||||
* fixed getintparaloc call for ansi- and widestring range checking
|
* fixed getintparaloc call for ansi- and widestring range checking
|
||||||
|
|
||||||
Revision 1.53 2003/05/11 21:37:03 peter
|
Revision 1.53 2003/05/11 21:37:03 peter
|
||||||
@ -1045,4 +1050,4 @@ end.
|
|||||||
* removed unused units
|
* removed unused units
|
||||||
* use tlocation.size in cg.a_*loc*() routines
|
* use tlocation.size in cg.a_*loc*() routines
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -610,7 +610,7 @@ implementation
|
|||||||
pleftreg:=rg.makeregsize(left.location.register,OS_INT)
|
pleftreg:=rg.makeregsize(left.location.register,OS_INT)
|
||||||
else
|
else
|
||||||
pleftreg:=rg.getregisterint(exprasmlist,OS_INT);
|
pleftreg:=rg.getregisterint(exprasmlist,OS_INT);
|
||||||
cg.a_load_loc_reg(exprasmlist,left.location,pleftreg);
|
cg.a_load_loc_reg(exprasmlist,OS_INT,left.location,pleftreg);
|
||||||
location_freetemp(exprasmlist,left.location);
|
location_freetemp(exprasmlist,left.location);
|
||||||
location_release(exprasmlist,left.location);
|
location_release(exprasmlist,left.location);
|
||||||
cg.a_param_reg(exprasmlist,OS_8,pleftreg,paramanager.getintparaloc(2));
|
cg.a_param_reg(exprasmlist,OS_8,pleftreg,paramanager.getintparaloc(2));
|
||||||
@ -1121,7 +1121,12 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.36 2003-05-24 19:48:49 jonas
|
Revision 1.37 2003-05-30 23:49:18 jonas
|
||||||
|
* a_load_loc_reg now has an extra size parameter for the destination
|
||||||
|
register (properly fixes what I worked around in revision 1.106 of
|
||||||
|
ncgutil.pas)
|
||||||
|
|
||||||
|
Revision 1.36 2003/05/24 19:48:49 jonas
|
||||||
* fixed tcginnode endian bug again, but correcty this time :)
|
* fixed tcginnode endian bug again, but correcty this time :)
|
||||||
|
|
||||||
Revision 1.35 2003/05/23 21:10:50 florian
|
Revision 1.35 2003/05/23 21:10:50 florian
|
||||||
|
@ -338,7 +338,7 @@ implementation
|
|||||||
cg.a_label(list,hl);
|
cg.a_label(list,hl);
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
cg.a_load_loc_reg(list,l,hregister);
|
cg.a_load_loc_reg(list,OS_INT,l,hregister);
|
||||||
end;
|
end;
|
||||||
{ reset hi part, take care of the signed bit of the current value }
|
{ reset hi part, take care of the signed bit of the current value }
|
||||||
hregisterhi:=rg.getregisterint(list,OS_INT);
|
hregisterhi:=rg.getregisterint(list,OS_INT);
|
||||||
@ -451,16 +451,7 @@ implementation
|
|||||||
if (TCGSize2Size[dst_size]<TCGSize2Size[l.size]) then
|
if (TCGSize2Size[dst_size]<TCGSize2Size[l.size]) then
|
||||||
begin
|
begin
|
||||||
if (l.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
if (l.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
||||||
begin
|
l.register.number:=(l.register.number and not $ff) or cgsize2subreg(dst_size);
|
||||||
{$ifndef i386}
|
|
||||||
hregisterhi := l.register;
|
|
||||||
{$endif not i386}
|
|
||||||
l.register.number:=(l.register.number and not $ff) or cgsize2subreg(dst_size);
|
|
||||||
{$ifndef i386}
|
|
||||||
{ necessary for all processors that do not have subregisters (JM) }
|
|
||||||
cg.a_load_reg_reg(list,l.size,dst_size,hregisterhi,l.register);
|
|
||||||
{$endif not i386}
|
|
||||||
end;
|
|
||||||
{ for big endian systems, the reference's offset must }
|
{ for big endian systems, the reference's offset must }
|
||||||
{ be increased in this case, since they have the }
|
{ be increased in this case, since they have the }
|
||||||
{ MSB first in memory and e.g. byte(word_var) should }
|
{ MSB first in memory and e.g. byte(word_var) should }
|
||||||
@ -470,7 +461,7 @@ implementation
|
|||||||
inc(l.reference.offset,TCGSize2Size[l.size]-TCGSize2Size[dst_size]);
|
inc(l.reference.offset,TCGSize2Size[l.size]-TCGSize2Size[dst_size]);
|
||||||
l.size:=dst_size;
|
l.size:=dst_size;
|
||||||
end;
|
end;
|
||||||
cg.a_load_loc_reg(list,l,hregister);
|
cg.a_load_loc_reg(list,dst_size,l,hregister);
|
||||||
{ Release old register when the superregister is changed }
|
{ Release old register when the superregister is changed }
|
||||||
if (l.loc=LOC_REGISTER) and
|
if (l.loc=LOC_REGISTER) and
|
||||||
(l.register.number shr 8<>hregister.number shr 8) then
|
(l.register.number shr 8<>hregister.number shr 8) then
|
||||||
@ -482,7 +473,11 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
location_reset(l,LOC_REGISTER,dst_size);
|
if (l.loc <> LOC_CREGISTER) or
|
||||||
|
not maybeconst then
|
||||||
|
location_reset(l,LOC_REGISTER,dst_size)
|
||||||
|
else
|
||||||
|
location_reset(l,LOC_CREGISTER,dst_size);
|
||||||
l.register:=hregister;
|
l.register:=hregister;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -521,7 +516,7 @@ implementation
|
|||||||
cg.a_label(list,hl);
|
cg.a_label(list,hl);
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
cg.a_load_loc_reg(list,l,hregister);
|
cg.a_load_loc_reg(list,OS_INT,l,hregister);
|
||||||
end;
|
end;
|
||||||
location_reset(l,LOC_REGISTER,dst_size);
|
location_reset(l,LOC_REGISTER,dst_size);
|
||||||
l.register:=hregister;
|
l.register:=hregister;
|
||||||
@ -579,7 +574,7 @@ implementation
|
|||||||
l.size:=dst_size;
|
l.size:=dst_size;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
cg.a_load_loc_reg(list,l,hregister);
|
cg.a_load_loc_reg(list,dst_size,l,hregister);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
location_reset(l,LOC_REGISTER,dst_size);
|
location_reset(l,LOC_REGISTER,dst_size);
|
||||||
@ -1348,13 +1343,22 @@ implementation
|
|||||||
case hp.paraloc.loc of
|
case hp.paraloc.loc of
|
||||||
LOC_CREGISTER,
|
LOC_CREGISTER,
|
||||||
LOC_REGISTER:
|
LOC_REGISTER:
|
||||||
// if not(hp.paraloc.size in [OS_S64,OS_64]) then
|
if not(hp.paraloc.size in [OS_S64,OS_64]) then
|
||||||
cg.a_load_reg_reg(list,hp.paraloc.size,OS_32,hp.paraloc.register,tvarsym(hp.parasym).reg);
|
cg.a_load_reg_reg(list,hp.paraloc.size,hp.paraloc.size,hp.paraloc.register,tvarsym(hp.parasym).reg)
|
||||||
// else
|
else
|
||||||
|
internalerror(2003053011);
|
||||||
// cg64.a_load64_reg_reg(list,hp.paraloc.register64,tvarsym(hp.parasym).reg);
|
// cg64.a_load64_reg_reg(list,hp.paraloc.register64,tvarsym(hp.parasym).reg);
|
||||||
LOC_CFPUREGISTER,
|
LOC_CFPUREGISTER,
|
||||||
LOC_FPUREGISTER:
|
LOC_FPUREGISTER:
|
||||||
cg.a_loadfpu_reg_reg(list,hp.paraloc.register,tvarsym(hp.parasym).reg);
|
cg.a_loadfpu_reg_reg(list,hp.paraloc.register,tvarsym(hp.parasym).reg);
|
||||||
|
LOC_REFERENCE,
|
||||||
|
LOC_CREFERENCE:
|
||||||
|
begin
|
||||||
|
reference_reset_base(href,current_procinfo.framepointer,tvarsym(hp.parasym).adjusted_address);
|
||||||
|
cg.a_load_ref_reg(list,hp.paraloc.size,href,tvarsym(hp.parasym).reg);
|
||||||
|
end;
|
||||||
|
else
|
||||||
|
internalerror(2003053010);
|
||||||
end
|
end
|
||||||
else if (hp.paraloc.loc in [LOC_REGISTER,LOC_FPUREGISTER,LOC_MMREGISTER,
|
else if (hp.paraloc.loc in [LOC_REGISTER,LOC_FPUREGISTER,LOC_MMREGISTER,
|
||||||
LOC_CREGISTER,LOC_CFPUREGISTER,LOC_CMMREGISTER]) and
|
LOC_CREGISTER,LOC_CFPUREGISTER,LOC_CMMREGISTER]) and
|
||||||
@ -1904,7 +1908,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.110 2003-05-30 18:52:10 jonas
|
Revision 1.111 2003-05-30 23:49:18 jonas
|
||||||
|
* a_load_loc_reg now has an extra size parameter for the destination
|
||||||
|
register (properly fixes what I worked around in revision 1.106 of
|
||||||
|
ncgutil.pas)
|
||||||
|
|
||||||
|
Revision 1.110 2003/05/30 18:52:10 jonas
|
||||||
* fixed bug with intregvars
|
* fixed bug with intregvars
|
||||||
* locapara.loc can also be LOC_CFPUREGISTER -> also fixed
|
* locapara.loc can also be LOC_CFPUREGISTER -> also fixed
|
||||||
rcgppc.a_param_ref, which previously got bogus size values
|
rcgppc.a_param_ref, which previously got bogus size values
|
||||||
|
Loading…
Reference in New Issue
Block a user