mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 14:19:28 +02:00
* remove obsolete cardinal() typecasts
This commit is contained in:
parent
2eecc76977
commit
0ac4983a9b
@ -660,11 +660,11 @@ unit cg64f32;
|
||||
|
||||
function tcg64f32.optimize64_op_const_reg(list: taasmoutput; var op: topcg; var a : int64; var reg: tregister64): boolean;
|
||||
var
|
||||
lowvalue, highvalue : cardinal;
|
||||
lowvalue, highvalue : longint;
|
||||
hreg: tregister;
|
||||
begin
|
||||
lowvalue := cardinal(a);
|
||||
highvalue:= a shr 32;
|
||||
lowvalue := longint(a);
|
||||
highvalue:= longint(a shr 32);
|
||||
{ assume it will be optimized out }
|
||||
optimize64_op_const_reg := true;
|
||||
case op of
|
||||
@ -675,9 +675,9 @@ unit cg64f32;
|
||||
end;
|
||||
OP_AND:
|
||||
begin
|
||||
if lowvalue <> high(cardinal) then
|
||||
if lowvalue <> -1 then
|
||||
cg.a_op_const_reg(list,op,OS_32,lowvalue,reg.reglo);
|
||||
if highvalue <> high(cardinal) then
|
||||
if highvalue <> -1 then
|
||||
cg.a_op_const_reg(list,op,OS_32,highvalue,reg.reghi);
|
||||
{ already emitted correctly }
|
||||
exit;
|
||||
@ -753,7 +753,10 @@ unit cg64f32;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.59 2004-06-17 16:55:46 peter
|
||||
Revision 1.60 2004-06-18 15:16:46 peter
|
||||
* remove obsolete cardinal() typecasts
|
||||
|
||||
Revision 1.59 2004/06/17 16:55:46 peter
|
||||
* powerpc compiles again
|
||||
|
||||
Revision 1.58 2004/06/16 20:07:07 florian
|
||||
|
@ -652,23 +652,7 @@ implementation
|
||||
else
|
||||
begin
|
||||
getrange(def,lv,hv);
|
||||
if (def.deftype=orddef) and
|
||||
(torddef(def).typ=u32bit) then
|
||||
begin
|
||||
if (l < cardinal(lv)) or
|
||||
(l > cardinal(hv)) then
|
||||
begin
|
||||
if not explicit then
|
||||
begin
|
||||
if (cs_check_range in aktlocalswitches) then
|
||||
Message(parser_e_range_check_error)
|
||||
else
|
||||
Message(parser_w_range_check_error);
|
||||
end;
|
||||
error := true;
|
||||
end;
|
||||
end
|
||||
else if (l<lv) or (l>hv) then
|
||||
if (l<lv) or (l>hv) then
|
||||
begin
|
||||
if not explicit then
|
||||
begin
|
||||
@ -904,7 +888,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.16 2004-06-16 20:07:07 florian
|
||||
Revision 1.17 2004-06-18 15:16:46 peter
|
||||
* remove obsolete cardinal() typecasts
|
||||
|
||||
Revision 1.16 2004/06/16 20:07:07 florian
|
||||
* dwarf branch merged
|
||||
|
||||
Revision 1.15 2004/05/28 21:13:23 peter
|
||||
|
@ -461,7 +461,7 @@ implementation
|
||||
Consts.concat(Tai_const_symbol.Create(l1));
|
||||
Consts.concat(Tai_const.Create_32bit(len));
|
||||
Consts.concat(Tai_const.Create_32bit(len));
|
||||
Consts.concat(Tai_const.Create_32bit(Cardinal(-1)));
|
||||
Consts.concat(Tai_const.Create_32bit(-1));
|
||||
Consts.concat(Tai_label.Create(l1));
|
||||
getmem(pc,len+2);
|
||||
move(value_str^,pc^,len);
|
||||
@ -513,7 +513,7 @@ implementation
|
||||
Consts.concat(Tai_const_symbol.Create(l1));
|
||||
Consts.concat(Tai_const.Create_32bit(len));
|
||||
Consts.concat(Tai_const.Create_32bit(len));
|
||||
Consts.concat(Tai_const.Create_32bit(Cardinal(-1)));
|
||||
Consts.concat(Tai_const.Create_32bit(-1));
|
||||
Consts.concat(Tai_label.Create(l1));
|
||||
getmem(pc,len+2);
|
||||
move(value_str^,pc^,len);
|
||||
@ -729,7 +729,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.41 2004-06-16 20:07:08 florian
|
||||
Revision 1.42 2004-06-18 15:16:46 peter
|
||||
* remove obsolete cardinal() typecasts
|
||||
|
||||
Revision 1.41 2004/06/16 20:07:08 florian
|
||||
* dwarf branch merged
|
||||
|
||||
Revision 1.40 2004/04/29 19:56:37 daniel
|
||||
|
@ -2400,7 +2400,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.136 2004-06-16 20:07:08 florian
|
||||
Revision 1.137 2004-06-18 15:16:46 peter
|
||||
* remove obsolete cardinal() typecasts
|
||||
|
||||
Revision 1.136 2004/06/16 20:07:08 florian
|
||||
* dwarf branch merged
|
||||
|
||||
Revision 1.135 2004/05/28 21:15:20 peter
|
||||
@ -2732,4 +2735,4 @@ end.
|
||||
Revision 1.68 2002/01/19 11:53:56 peter
|
||||
* constant evaluation for assinged added
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ implementation
|
||||
bool32bit :
|
||||
begin
|
||||
if is_constboolnode(p) then
|
||||
curconstSegment.concat(Tai_const.Create_32bit(cardinal(tordconstnode(p).value)))
|
||||
curconstSegment.concat(Tai_const.Create_32bit(longint(tordconstnode(p).value)))
|
||||
else
|
||||
Message(parser_e_illegal_expression);
|
||||
end;
|
||||
@ -176,7 +176,7 @@ implementation
|
||||
begin
|
||||
if is_constintnode(p) then
|
||||
begin
|
||||
curconstSegment.concat(Tai_const.Create_32bit(cardinal(tordconstnode(p).value)));
|
||||
curconstSegment.concat(Tai_const.Create_32bit(longint(tordconstnode(p).value)));
|
||||
if torddef(t.def).typ<>u32bit then
|
||||
check_range(torddef(t.def));
|
||||
end
|
||||
@ -603,7 +603,7 @@ implementation
|
||||
Consts.concat(Tai_const.Create_16bit(strlength));
|
||||
{ redondent with maxlength but who knows ... (PM) }
|
||||
{ third write use count (set to -1 for safety ) }
|
||||
Consts.concat(Tai_const.Create_16bit(Cardinal(-1)));
|
||||
Consts.concat(Tai_const.Create_16bit(-1));
|
||||
Consts.concat(Tai_label.Create(ll));
|
||||
getmem(ca,strlength+2);
|
||||
move(strval^,ca^,strlength);
|
||||
@ -663,7 +663,7 @@ implementation
|
||||
Consts.concat(Tai_const.Create_64bit(strlength));
|
||||
{ redondent with maxlength but who knows ... (PM) }
|
||||
{ third write use count (set to -1 for safety ) }
|
||||
Consts.concat(Tai_const.Create_64bit(Cardinal(-1)));
|
||||
Consts.concat(Tai_const.Create_64bit(-1));
|
||||
Consts.concat(Tai_label.Create(ll));
|
||||
getmem(ca,strlength+2);
|
||||
move(strval^,ca^,strlength);
|
||||
@ -1092,7 +1092,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.86 2004-06-16 20:07:09 florian
|
||||
Revision 1.87 2004-06-18 15:16:46 peter
|
||||
* remove obsolete cardinal() typecasts
|
||||
|
||||
Revision 1.86 2004/06/16 20:07:09 florian
|
||||
* dwarf branch merged
|
||||
|
||||
Revision 1.85 2004/05/23 15:23:30 peter
|
||||
@ -1308,4 +1311,4 @@ end.
|
||||
Revision 1.40 2002/01/06 21:47:32 peter
|
||||
* removed getprocvar, use only getprocvardef
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -5470,7 +5470,7 @@ implementation
|
||||
else
|
||||
writeproc(tpropertysym(sym).storedaccess,4);
|
||||
rttiList.concat(Tai_const.Create_32bit(tpropertysym(sym).index));
|
||||
rttiList.concat(Tai_const.Create_32bit(cardinal(tpropertysym(sym).default)));
|
||||
rttiList.concat(Tai_const.Create_32bit(tpropertysym(sym).default));
|
||||
rttiList.concat(Tai_const.Create_16bit(count));
|
||||
inc(count);
|
||||
rttiList.concat(Tai_const.Create_8bit(proctypesinfo));
|
||||
@ -6137,7 +6137,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.241 2004-06-16 20:07:09 florian
|
||||
Revision 1.242 2004-06-18 15:16:46 peter
|
||||
* remove obsolete cardinal() typecasts
|
||||
|
||||
Revision 1.241 2004/06/16 20:07:09 florian
|
||||
* dwarf branch merged
|
||||
|
||||
Revision 1.240 2004/05/25 18:51:14 peter
|
||||
@ -6876,4 +6879,4 @@ end.
|
||||
* fix stacksize for some targets
|
||||
* fix generic size problems which depend now on EXTEND_SIZE constant
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ const
|
||||
if hp2.name^<>'' then
|
||||
importsSection.concat(Tai_const.Create_rva_sym(hp2.lab))
|
||||
else
|
||||
importsSection.concat(Tai_const.Create_32bit(cardinal($80000000) or cardinal(hp2.ordnr)));
|
||||
importsSection.concat(Tai_const.Create_32bit(longint($80000000) or longint(hp2.ordnr)));
|
||||
{ finally the import information }
|
||||
new_section(importsSection,sec_idata6,'',0);
|
||||
importsSection.concat(Tai_label.Create(hp2.lab));
|
||||
@ -465,7 +465,7 @@ const
|
||||
if hp2.name^<>'' then
|
||||
importsSection.concat(Tai_const.Create_rva_sym(hp2.lab))
|
||||
else
|
||||
importsSection.concat(Tai_const.Create_32bit(cardinal($80000000) or cardinal(hp2.ordnr)));
|
||||
importsSection.concat(Tai_const.Create_32bit(longint($80000000) or hp2.ordnr));
|
||||
hp2:=twin32imported_item(hp2.next);
|
||||
end;
|
||||
{ finalize the names ... }
|
||||
@ -1659,7 +1659,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.33 2004-06-16 20:07:11 florian
|
||||
Revision 1.34 2004-06-18 15:16:46 peter
|
||||
* remove obsolete cardinal() typecasts
|
||||
|
||||
Revision 1.33 2004/06/16 20:07:11 florian
|
||||
* dwarf branch merged
|
||||
|
||||
Revision 1.32 2004/04/28 18:02:54 peter
|
||||
|
Loading…
Reference in New Issue
Block a user