mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 23:09:40 +02:00
* RTL: fixed some warnings when compiling for x86_64:
* x86_64/x86_64.inc: IsMultithread is a LongBool, not Boolean -> fixed assembler instruction suffixes * inc/generic.inc: cast Sizeof() to unsigned, so that combining it with unsigned operands does not cause promotion to larger signed type. + win64/seh64.inc: explicit typecast and missing function result assignment. + inc/genmath.inc: explicit typecasts. git-svn-id: trunk@25384 -
This commit is contained in:
parent
86cb4d0c12
commit
690995fa12
@ -358,7 +358,7 @@ begin
|
||||
if (len < 0) or
|
||||
(len > high(PtrInt) div 2) or
|
||||
(psrc+len < psrc) then
|
||||
pend:=pdword(high(PtrUInt)-sizeof(dword))
|
||||
pend:=pdword(high(PtrUInt)-PtrUInt(sizeof(dword)))
|
||||
else
|
||||
pend:=psrc+len;
|
||||
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
||||
@ -399,7 +399,7 @@ begin
|
||||
if (len < 0) or
|
||||
(len > high(PtrInt) div 4) or
|
||||
(psrc+len < psrc) then
|
||||
pend:=pqword(high(PtrUInt)-sizeof(qword))
|
||||
pend:=pqword(high(PtrUInt)-PtrUInt(sizeof(qword)))
|
||||
else
|
||||
pend:=psrc+len;
|
||||
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
||||
@ -548,8 +548,7 @@ begin
|
||||
inc(pptruint(psrc));
|
||||
end;
|
||||
end;
|
||||
if (len <= high(ptrint)) and
|
||||
(psrc+len >= psrc) then
|
||||
if (psrc+len >= psrc) then
|
||||
pend:=psrc+len
|
||||
else
|
||||
pend:=pword(high(ptruint)-2);
|
||||
@ -689,7 +688,7 @@ begin
|
||||
{ simulate assembler implementations behaviour, which is expected }
|
||||
{ fpc_pchar_to_ansistr in astrings.inc }
|
||||
if (len < 0) then
|
||||
pend:=pbyte(high(PtrUInt)-sizeof(byte))
|
||||
pend:=pbyte(high(PtrUInt)-PtrUInt(sizeof(byte)))
|
||||
else
|
||||
pend:=psrc+len;
|
||||
while (psrc<pend) and (psrc^<>0) do
|
||||
|
@ -224,7 +224,7 @@ type
|
||||
invalid:
|
||||
float_raise(float_flag_invalid);
|
||||
if (aSign <> 0) then
|
||||
float64_to_int32_round_to_zero:=$80000000
|
||||
float64_to_int32_round_to_zero:=longint($80000000)
|
||||
else
|
||||
float64_to_int32_round_to_zero:=$7FFFFFFF;
|
||||
exit;
|
||||
@ -333,7 +333,7 @@ invalid:
|
||||
exit;
|
||||
end;
|
||||
End;
|
||||
float32_to_int32_round_to_zero:=$80000000;
|
||||
float32_to_int32_round_to_zero:=longint($80000000);
|
||||
exit;
|
||||
End
|
||||
else
|
||||
|
@ -304,6 +304,7 @@ begin
|
||||
args[1]:=PtrUint(Obj);
|
||||
args[2]:=GetBacktrace(ctx,AFrame,PPointer(args[3]));
|
||||
RaiseException(FPC_EXCEPTION_CODE,EXCEPTION_NONCONTINUABLE,4,@args[0]);
|
||||
result:=nil;
|
||||
end;
|
||||
|
||||
procedure _fpc_local_unwind(frame,target: Pointer);[public,alias:'_FPC_local_unwind'];compilerproc;
|
||||
@ -429,7 +430,7 @@ var
|
||||
begin
|
||||
Adr:=rec.ExceptionInformation[0];
|
||||
Obj:=TObject(rec.ExceptionInformation[1]);
|
||||
Framecount:=Longint(rec.ExceptionInformation[2]);
|
||||
Framecount:=Longint(PtrUInt(rec.ExceptionInformation[2]));
|
||||
Frames:=rec.ExceptionInformation[3];
|
||||
|
||||
if rec.ExceptionCode<>FPC_EXCEPTION_CODE then
|
||||
|
@ -673,9 +673,9 @@ function declocked(var l : longint) : boolean;assembler; nostackframe;
|
||||
{ of time! }
|
||||
{$ifdef FPC_PIC}
|
||||
movq IsMultithread@GOTPCREL(%rip),%rax
|
||||
cmpb $0,(%rax)
|
||||
cmpl $0,(%rax)
|
||||
{$else FPC_PIC}
|
||||
cmpb $0,IsMultithread(%rip)
|
||||
cmpl $0,IsMultithread(%rip)
|
||||
{$endif FPC_PIC}
|
||||
{$ifndef win64}
|
||||
mov %rdi, %rcx
|
||||
@ -698,9 +698,9 @@ function declocked(var l : int64) : boolean;assembler; nostackframe;
|
||||
{ of time! }
|
||||
{$ifdef FPC_PIC}
|
||||
movq IsMultithread@GOTPCREL(%rip),%rax
|
||||
cmpb $0,(%rax)
|
||||
cmpl $0,(%rax)
|
||||
{$else FPC_PIC}
|
||||
cmpb $0,IsMultithread(%rip)
|
||||
cmpl $0,IsMultithread(%rip)
|
||||
{$endif FPC_PIC}
|
||||
{$ifndef win64}
|
||||
mov %rdi, %rcx
|
||||
@ -724,9 +724,9 @@ procedure inclocked(var l : longint);assembler; nostackframe;
|
||||
{ of time! }
|
||||
{$ifdef FPC_PIC}
|
||||
movq IsMultithread@GOTPCREL(%rip),%rax
|
||||
cmpb $0,(%rax)
|
||||
cmpl $0,(%rax)
|
||||
{$else FPC_PIC}
|
||||
cmpb $0,IsMultithread(%rip)
|
||||
cmpl $0,IsMultithread(%rip)
|
||||
{$endif FPC_PIC}
|
||||
{$ifndef win64}
|
||||
mov %rdi, %rcx
|
||||
@ -749,9 +749,9 @@ procedure inclocked(var l : int64);assembler; nostackframe;
|
||||
{ of time! }
|
||||
{$ifdef FPC_PIC}
|
||||
movq IsMultithread@GOTPCREL(%rip),%rax
|
||||
cmpb $0,(%rax)
|
||||
cmpl $0,(%rax)
|
||||
{$else FPC_PIC}
|
||||
cmpb $0,IsMultithread(%rip)
|
||||
cmpl $0,IsMultithread(%rip)
|
||||
{$endif FPC_PIC}
|
||||
{$ifndef win64}
|
||||
mov %rdi, %rcx
|
||||
|
Loading…
Reference in New Issue
Block a user