mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 05:29:30 +02:00
+ qword/int64: lo/hi/swap
This commit is contained in:
parent
47fcad144c
commit
01aceb4f07
@ -71,9 +71,14 @@ const
|
||||
in_const_exp = 114;
|
||||
in_const_ln = 115;
|
||||
in_const_sin = 116;
|
||||
in_lo_qword = 117;
|
||||
in_hi_qword = 118;
|
||||
{
|
||||
$Log$
|
||||
Revision 1.7 1999-04-17 13:10:23 peter
|
||||
Revision 1.8 1999-07-02 18:06:40 florian
|
||||
+ qword/int64: lo/hi/swap
|
||||
|
||||
Revision 1.7 1999/04/17 13:10:23 peter
|
||||
* addr() internal
|
||||
|
||||
Revision 1.10 1998/10/05 12:32:45 peter
|
||||
@ -88,6 +93,5 @@ const
|
||||
|
||||
Revision 1.3 1998/09/01 17:36:19 peter
|
||||
+ internconst
|
||||
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
# implementation files.
|
||||
|
||||
SYSNAMES=systemh heaph mathh filerec textrec system real2str sstrings innr \
|
||||
file typefile text rtti heap astrings objpas objpash except
|
||||
file typefile text rtti heap astrings objpas objpash except int64
|
||||
SYSINCNAMES=$(addsuffix .inc,$(SYSNAMES))
|
||||
|
||||
# Other unit names which can be used for all systems
|
||||
|
@ -57,10 +57,14 @@ Function lo(i : Integer) : byte; [INTERNPROC: In_lo_Word];
|
||||
Function lo(w : Word) : byte; [INTERNPROC: In_lo_Word];
|
||||
Function lo(l : Longint) : Word; [INTERNPROC: In_lo_long];
|
||||
Function lo(l : DWord) : Word; [INTERNPROC: In_lo_long];
|
||||
Function lo(q : QWord) : DWord; [INTERNPROC: In_lo_qword];
|
||||
Function lo(i : Int64) : DWord; [INTERNPROC: In_lo_qword];
|
||||
Function hi(i : Integer) : byte; [INTERNPROC: In_hi_Word];
|
||||
Function hi(w : Word) : byte; [INTERNPROC: In_hi_Word];
|
||||
Function hi(l : Longint) : Word; [INTERNPROC: In_hi_long];
|
||||
Function hi(l : DWord) : Word; [INTERNPROC: In_hi_long];
|
||||
Function hi(q : QWord) : DWord; [INTERNPROC: In_hi_qword];
|
||||
Function hi(i : Int64) : DWord; [INTERNPROC: In_hi_qword];
|
||||
|
||||
Function chr(b : byte) : Char; [INTERNPROC: In_chr_byte];
|
||||
Function Length(s : string) : byte; [INTERNPROC: In_Length_string];
|
||||
@ -138,7 +142,7 @@ End;
|
||||
|
||||
Function Swap (X : Integer) : Integer;[internconst:in_const_swap_word];
|
||||
Begin
|
||||
Swap:=Integer(Swap(Word(X)));
|
||||
swap:=(X and $ff) shl 8 + (X shr 8)
|
||||
End;
|
||||
|
||||
Function swap (X : Longint) : Longint;[internconst:in_const_swap_long];
|
||||
@ -148,9 +152,20 @@ End;
|
||||
|
||||
Function Swap (X : Cardinal) : Cardinal;[internconst:in_const_swap_long];
|
||||
Begin
|
||||
Swap:=Swap(Longint(X));
|
||||
Swap:=(X and $ffff) shl 16 + (X shr 16)
|
||||
End;
|
||||
|
||||
Function Swap (X : QWord) : QWord;
|
||||
Begin
|
||||
Swap:=(X and $ffffffff) shl 32 + (X shr 32);
|
||||
End;
|
||||
|
||||
Function swap (X : Int64) : Int64;
|
||||
Begin
|
||||
Swap:=(X and $ffffffff) shl 32 + (X shr 32);
|
||||
End;
|
||||
|
||||
|
||||
{$endif RTLLITE}
|
||||
|
||||
{****************************************************************************
|
||||
@ -554,7 +569,10 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.61 1999-07-01 15:39:51 florian
|
||||
Revision 1.62 1999-07-02 18:06:42 florian
|
||||
+ qword/int64: lo/hi/swap
|
||||
|
||||
Revision 1.61 1999/07/01 15:39:51 florian
|
||||
+ qword/int64 type released
|
||||
|
||||
Revision 1.60 1999/06/11 11:47:00 peter
|
||||
|
@ -170,15 +170,21 @@ Function lo(l:Longint):Word;
|
||||
Function lo(l:DWord):Word;
|
||||
Function lo(i:Integer):byte;
|
||||
Function lo(B: Byte):Byte;
|
||||
Function lo(q : QWord) : DWord;
|
||||
Function lo(i : Int64) : DWord;
|
||||
Function hi(w:Word):byte;
|
||||
Function hi(i:Integer):byte;
|
||||
Function hi(l:Longint):Word;
|
||||
Function hi(b : Byte) : Byte;
|
||||
Function hi(l: DWord): Word;
|
||||
Function hi(q : QWord) : DWord;
|
||||
Function hi(i : Int64) : DWord;
|
||||
Function Swap (X:Word):Word;
|
||||
Function Swap (X:Integer):Integer;
|
||||
Function Swap (X:Cardinal):Cardinal;
|
||||
Function Swap (X:Longint):Longint;
|
||||
Function Swap (X:LongInt):LongInt;
|
||||
Function Swap (X:QWord):QWord;
|
||||
Function Swap (X:Int64):Int64;
|
||||
{$endif RTLLITE}
|
||||
|
||||
Function Random(l:Longint):Longint;
|
||||
@ -470,7 +476,10 @@ const
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.58 1999-06-30 22:17:22 florian
|
||||
Revision 1.59 1999-07-02 18:06:43 florian
|
||||
+ qword/int64: lo/hi/swap
|
||||
|
||||
Revision 1.58 1999/06/30 22:17:22 florian
|
||||
+ fpuint64 to system unit interface added: if it is true, the rtl
|
||||
uses the fpu to do int64 operations, if possible
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user