mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 14:19:28 +02:00
* fixed range check errors
This commit is contained in:
parent
49ae9f925e
commit
bdf2593265
@ -212,7 +212,7 @@ unit cgcpu;
|
||||
|
||||
begin
|
||||
if ref.is_immediate then
|
||||
a_load_const_reg(list,size,ref.offset,reg)
|
||||
a_load_const_reg(list,size,aword(ref.offset),reg)
|
||||
else
|
||||
begin
|
||||
sizes2load(size,regsize(reg),op,s);
|
||||
@ -426,7 +426,7 @@ unit cgcpu;
|
||||
|
||||
begin
|
||||
if ref.is_immediate then
|
||||
a_op_const_reg(list,op,ref.offset,reg)
|
||||
a_op_const_reg(list,op,aword(ref.offset),reg)
|
||||
else
|
||||
begin
|
||||
case op of
|
||||
@ -708,7 +708,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 2001-09-30 16:17:18 jonas
|
||||
Revision 1.4 2001-10-04 14:33:28 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.3 2001/09/30 16:17:18 jonas
|
||||
* made most constant and mem handling processor independent
|
||||
|
||||
Revision 1.2 2001/09/29 21:32:19 jonas
|
||||
|
@ -657,15 +657,11 @@ implementation
|
||||
emitcall('FPC_DECREF');
|
||||
end;
|
||||
|
||||
{$ifdef regallocfix}
|
||||
concatcopy(right.location.reference,
|
||||
left.location.reference,left.resulttype.def.size,true,false);
|
||||
ungetiftemp(right.location.reference);
|
||||
{$Else regallocfix}
|
||||
concatcopy(right.location.reference,
|
||||
left.location.reference,left.resulttype.def.size,false,false);
|
||||
del_reference(left.location.reference);
|
||||
del_reference(right.location.reference);
|
||||
ungetiftemp(right.location.reference);
|
||||
{$endif regallocfix}
|
||||
end;
|
||||
end;
|
||||
{$ifdef SUPPORT_MMX}
|
||||
@ -1088,7 +1084,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.22 2001-09-09 08:51:09 jonas
|
||||
Revision 1.23 2001-10-04 14:33:28 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.22 2001/09/09 08:51:09 jonas
|
||||
* fixed bug with assigning ansistrings (left^.location was released too
|
||||
early, caused bug reported by Aleksey V. Vaneev in mailing list on
|
||||
2001/09/07 regarding 'problems with nested procedures and local vars'
|
||||
|
@ -52,7 +52,7 @@ interface
|
||||
cutils,verbose,
|
||||
aasm,symconst,symdef,
|
||||
ncon,ncal,
|
||||
cpubase,
|
||||
cpubase,cpuinfo,
|
||||
pass_2,
|
||||
cgbase,
|
||||
cga,cgobj,cgcpu,
|
||||
@ -399,10 +399,10 @@ interface
|
||||
end;
|
||||
getlabel(l1);
|
||||
cg.a_cmp_const_reg_label(exprasmlist,OS_32,OC_EQ,0,hreg,l1);
|
||||
cg.a_op_const_reg(exprasmlist,OP_ADD,
|
||||
cg.a_op_const_reg(exprasmlist,OP_ADD,aword(
|
||||
tobjectdef(left.resulttype.def).implementedinterfaces.ioffsets(
|
||||
tobjectdef(left.resulttype.def).implementedinterfaces.searchintf(
|
||||
resulttype.def))^,hreg);
|
||||
resulttype.def))^),hreg);
|
||||
cg.a_label(exprasmlist,l1);
|
||||
location.loc:=LOC_REGISTER;
|
||||
location.register:=hreg;
|
||||
@ -422,7 +422,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 2001-09-30 16:16:28 jonas
|
||||
Revision 1.3 2001-10-04 14:33:28 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.2 2001/09/30 16:16:28 jonas
|
||||
- removed unused units form uses-clause and unused local vars
|
||||
|
||||
Revision 1.1 2001/09/29 21:32:47 jonas
|
||||
|
@ -69,7 +69,7 @@ implementation
|
||||
verbose,globals,systems,
|
||||
symconst,symdef,symsym,aasm,types,
|
||||
cgbase,temp_gen,pass_2,
|
||||
cpubase,cpuasm,
|
||||
cpubase,cpuasm,cpuinfo,
|
||||
nld,ncon,
|
||||
cga,tgcpu,
|
||||
{$ifdef i386}
|
||||
@ -289,7 +289,8 @@ implementation
|
||||
if not(omitfirstcomp) then
|
||||
begin
|
||||
cg.a_cmp_const_loc_label(exprasmlist,opsize,hcond,
|
||||
tordconstnode(right).value,t2.location,aktbreaklabel);
|
||||
aword(tordconstnode(right).value),
|
||||
t2.location,aktbreaklabel);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -332,7 +333,7 @@ implementation
|
||||
else
|
||||
begin
|
||||
cg.a_cmp_const_loc_label(exprasmlist,opsize,hcond,
|
||||
tordconstnode(right).value,t2.location,aktbreaklabel);
|
||||
aword(tordconstnode(right).value),t2.location,aktbreaklabel);
|
||||
end;
|
||||
{ according to count direction DEC or INC... }
|
||||
{ must be after the test because of 0 to 255 for bytes !! }
|
||||
@ -581,7 +582,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 2001-09-30 16:19:58 jonas
|
||||
Revision 1.3 2001-10-04 14:33:28 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.2 2001/09/30 16:19:58 jonas
|
||||
- removed unused units
|
||||
|
||||
Revision 1.1 2001/09/28 20:39:33 jonas
|
||||
|
Loading…
Reference in New Issue
Block a user