mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 10:29:17 +02:00
* cardinal -> longword
This commit is contained in:
parent
4207d5634f
commit
752beef0dd
@ -28,7 +28,7 @@ Interface
|
||||
|
||||
Type
|
||||
{# Natural integer register type and size for the target machine }
|
||||
AWord = Cardinal;
|
||||
AWord = longword;
|
||||
PAWord = ^AWord;
|
||||
|
||||
{ this must be an ordinal type with the same size as a pointer }
|
||||
@ -36,8 +36,8 @@ Type
|
||||
{ pointer(-1) will result in a pointer with the value }
|
||||
{ $fffffffffffffff on a 32bit machine if the compiler uses }
|
||||
{ int64 constants internally (JM) }
|
||||
TConstPtrUInt = cardinal;
|
||||
|
||||
TConstPtrUInt = longword;
|
||||
|
||||
bestreal = extended;
|
||||
ts32real = single;
|
||||
ts64real = double;
|
||||
@ -77,7 +77,10 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.14 2002-09-07 15:25:10 peter
|
||||
Revision 1.15 2002-09-07 20:48:43 carl
|
||||
* cardinal -> longword
|
||||
|
||||
Revision 1.14 2002/09/07 15:25:10 peter
|
||||
* old logs removed and tabs fixed
|
||||
|
||||
Revision 1.13 2002/08/15 15:15:55 carl
|
||||
|
@ -415,7 +415,7 @@ Implementation
|
||||
rg.getexplicitregisterint(list,R_D1);
|
||||
list.concat(taicpu.op_const_reg(A_MOVE,S_L,a, R_D0));
|
||||
list.concat(taicpu.op_reg_reg(A_MOVE,S_L,reg, R_D1));
|
||||
cg.a_call_name(list,'FPC_MUL_CARDINAL');
|
||||
cg.a_call_name(list,'FPC_MUL_LONGWORD');
|
||||
list.concat(taicpu.op_reg_reg(A_MOVE,S_L,R_D0, reg));
|
||||
rg.ungetregisterint(list,R_D0);
|
||||
rg.ungetregisterint(list,R_D1);
|
||||
@ -619,7 +619,7 @@ Implementation
|
||||
rg.getexplicitregisterint(list,R_D1);
|
||||
list.concat(taicpu.op_reg_reg(A_MOVE,S_L,reg1, R_D0));
|
||||
list.concat(taicpu.op_reg_reg(A_MOVE,S_L,reg2, R_D1));
|
||||
cg.a_call_name(list,'FPC_MUL_CARDINAL');
|
||||
cg.a_call_name(list,'FPC_MUL_LONGWORD');
|
||||
list.concat(taicpu.op_reg_reg(A_MOVE,S_L,R_D0, reg2));
|
||||
rg.ungetregisterint(list,R_D0);
|
||||
rg.ungetregisterint(list,R_D1);
|
||||
@ -1234,7 +1234,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 2002-09-07 15:25:12 peter
|
||||
Revision 1.7 2002-09-07 20:53:28 carl
|
||||
* cardinal -> longword
|
||||
|
||||
Revision 1.6 2002/09/07 15:25:12 peter
|
||||
* old logs removed and tabs fixed
|
||||
|
||||
Revision 1.5 2002/08/19 18:17:48 carl
|
||||
|
@ -19,7 +19,7 @@ Interface
|
||||
|
||||
Type
|
||||
{ Architecture word - Native unsigned type }
|
||||
AWord = Cardinal;
|
||||
AWord = longword;
|
||||
PAWord = ^AWord;
|
||||
|
||||
{ this must be an ordinal type with the same size as a pointer }
|
||||
@ -29,7 +29,7 @@ Type
|
||||
{ pointer(-1) will result in a pointer with the value }
|
||||
{ $fffffffffffffff on a 32bit machine if the compiler uses }
|
||||
{ int64 constants internally (JM) }
|
||||
TConstPtrUInt = Cardinal;
|
||||
TConstPtrUInt = longword;
|
||||
|
||||
bestreal = real;
|
||||
ts32real = single;
|
||||
@ -67,7 +67,10 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.4 2002-09-07 15:25:13 peter
|
||||
Revision 1.5 2002-09-07 20:53:28 carl
|
||||
* cardinal -> longword
|
||||
|
||||
Revision 1.4 2002/09/07 15:25:13 peter
|
||||
* old logs removed and tabs fixed
|
||||
|
||||
Revision 1.3 2002/08/15 15:15:55 carl
|
||||
|
@ -92,7 +92,7 @@ implementation
|
||||
a cardinal value.
|
||||
}
|
||||
begin
|
||||
fname := 'fpc_cardinal_to_double';
|
||||
fname := 'fpc_longword_to_double';
|
||||
result := ccallnode.createintern(fname,ccallparanode.create(
|
||||
left,nil));
|
||||
left:=nil;
|
||||
@ -292,7 +292,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 2002-09-07 15:25:13 peter
|
||||
Revision 1.4 2002-09-07 20:53:28 carl
|
||||
* cardinal -> longword
|
||||
|
||||
Revision 1.3 2002/09/07 15:25:13 peter
|
||||
* old logs removed and tabs fixed
|
||||
|
||||
Revision 1.2 2002/08/14 19:31:26 carl
|
||||
|
@ -1086,18 +1086,18 @@ type_e_array_required=04033_E_Array type required
|
||||
% If you are accessing a variable using an index '[<x>]' then
|
||||
% the type must be an array. In FPC mode also a pointer is allowed.
|
||||
type_e_interface_type_expected=04034_E_interface type expected, but got "$1"
|
||||
type_w_mixed_signed_unsigned=04035_W_Mixing signed expressions and cardinals gives a 64bit result
|
||||
% If you divide (or calculate the modulus of) a signed expression by a cardinal (or vice versa),
|
||||
type_w_mixed_signed_unsigned=04035_W_Mixing signed expressions and longwords gives a 64bit result
|
||||
% If you divide (or calculate the modulus of) a signed expression by a longword (or vice versa),
|
||||
% or if you have overflow and/or range checking turned on and use an arithmetical
|
||||
% expression (+, -, *, div, mod) in which both signed numbers and cardinals appear,
|
||||
% expression (+, -, *, div, mod) in which both signed numbers and longwords appear,
|
||||
% then everything has to be evaluated in 64bit which is slower than normal
|
||||
% 32bit arithmetics. You can avoid this by typecasting one operand so it
|
||||
% matches the resulttype of the other one.
|
||||
type_w_mixed_signed_unsigned2=04036_W_Mixing signed expressions and cardinals here may cause a range check error
|
||||
% If you use a binary operator (and, or, xor) and one of
|
||||
% the operands is a cardinal while the other one is a signed expression, then,
|
||||
% the operands is a longword while the other one is a signed expression, then,
|
||||
% if range checking is turned on, you may get a range check error because in
|
||||
% such a case both operands are converted to cardinal before the operation is
|
||||
% such a case both operands are converted to longword before the operation is
|
||||
% carried out. You can avoid this by typecasting one operand so it
|
||||
% matches the resulttype of the other one.
|
||||
type_e_typecast_wrong_size_for_assignment=04037_E_Typecast has different size ($1 -> $2) in assignment
|
||||
|
@ -1435,7 +1435,7 @@ implementation
|
||||
if is_signed(left.resulttype.def) then
|
||||
fname := 'fpc_longint_to_'+typname
|
||||
else
|
||||
fname := 'fpc_cardinal_to_'+typname;
|
||||
fname := 'fpc_longword_to_'+typname;
|
||||
result := ccallnode.createintern(fname,ccallparanode.create(
|
||||
left,nil));
|
||||
left:=nil;
|
||||
@ -2037,7 +2037,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.79 2002-09-07 15:25:03 peter
|
||||
Revision 1.80 2002-09-07 20:40:23 carl
|
||||
* cardinal -> longword
|
||||
|
||||
Revision 1.79 2002/09/07 15:25:03 peter
|
||||
* old logs removed and tabs fixed
|
||||
|
||||
Revision 1.78 2002/09/07 12:16:04 carl
|
||||
|
@ -243,7 +243,7 @@ implementation
|
||||
else
|
||||
case torddef(source.resulttype.def).typ of
|
||||
u32bit:
|
||||
procname := procname + 'cardinal';
|
||||
procname := procname + 'longword';
|
||||
u64bit:
|
||||
procname := procname + 'qword';
|
||||
s64bit:
|
||||
@ -2376,7 +2376,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.86 2002-09-07 12:16:04 carl
|
||||
Revision 1.87 2002-09-07 20:42:16 carl
|
||||
* cardinal -> longword
|
||||
|
||||
Revision 1.86 2002/09/07 12:16:04 carl
|
||||
* second part bug report 1996 fix, testrange in cordconstnode
|
||||
only called if option is set (also make parsing a tiny faster)
|
||||
|
||||
|
@ -19,7 +19,7 @@ Interface
|
||||
|
||||
Type
|
||||
{ Architecture word - Native unsigned type }
|
||||
AWord = Cardinal;
|
||||
AWord = Longword;
|
||||
PAWord = ^AWord;
|
||||
|
||||
{ this must be an ordinal type with the same size as a pointer }
|
||||
@ -29,7 +29,7 @@ Type
|
||||
{ pointer(-1) will result in a pointer with the value }
|
||||
{ $fffffffffffffff on a 32bit machine if the compiler uses }
|
||||
{ int64 constants internally (JM) }
|
||||
TConstPtrUInt = Cardinal;
|
||||
TConstPtrUInt = Longword;
|
||||
|
||||
bestreal = double;
|
||||
ts32real = single;
|
||||
@ -67,7 +67,10 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.11 2002-09-07 15:25:14 peter
|
||||
Revision 1.12 2002-09-07 20:57:08 carl
|
||||
* cardinal -> longword
|
||||
|
||||
Revision 1.11 2002/09/07 15:25:14 peter
|
||||
* old logs removed and tabs fixed
|
||||
|
||||
Revision 1.10 2002/08/15 15:15:55 carl
|
||||
|
@ -152,7 +152,7 @@ implementation
|
||||
addtype('Char',cchartype);
|
||||
addtype('WideChar',cwidechartype);
|
||||
adddef('Text',tfiledef.createtext);
|
||||
addtype('Cardinal',u32bittype);
|
||||
addtype('Longword',u32bittype);
|
||||
addtype('QWord',cu64bittype);
|
||||
addtype('Int64',cs64bittype);
|
||||
adddef('TypedFile',tfiledef.createtyped(voidtype));
|
||||
@ -268,7 +268,7 @@ implementation
|
||||
voidtype.setdef(torddef.create(uvoid,0,0));
|
||||
u8bittype.setdef(torddef.create(u8bit,0,255));
|
||||
u16bittype.setdef(torddef.create(u16bit,0,65535));
|
||||
u32bittype.setdef(torddef.create(u32bit,0,high(cardinal)));
|
||||
u32bittype.setdef(torddef.create(u32bit,0,high(longword)));
|
||||
s32bittype.setdef(torddef.create(s32bit,low(longint),high(longint)));
|
||||
cu64bittype.setdef(torddef.create(u64bit,low(qword),TConstExprInt(high(qword))));
|
||||
cs64bittype.setdef(torddef.create(s64bit,low(int64),high(int64)));
|
||||
@ -469,7 +469,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.38 2002-08-23 13:11:11 mazen
|
||||
Revision 1.39 2002-09-07 20:46:10 carl
|
||||
* cardinal -> longword
|
||||
|
||||
Revision 1.38 2002/08/23 13:11:11 mazen
|
||||
fixed compilation problem related to tai_labeled_instruction
|
||||
|
||||
Revision 1.37 2002/08/18 20:06:25 peter
|
||||
|
@ -33,7 +33,7 @@ UNIT cpuinfo;
|
||||
INTERFACE
|
||||
TYPE
|
||||
{# Natural integer register type and size for the target machine }
|
||||
AWord=Cardinal;
|
||||
AWord=Longword;
|
||||
PAWord=^AWord;
|
||||
{ the ordinal type used when evaluating constant integer expressions }
|
||||
TConstExprInt=int64;
|
||||
|
Loading…
Reference in New Issue
Block a user