mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 04:07:32 +02:00
Change parameter type to tcgint for is_imm12 and is_lui_imm functions to avoid range check errors
git-svn-id: trunk@43609 -
This commit is contained in:
parent
4715c94789
commit
fb33da5f41
@ -313,8 +313,8 @@ uses
|
|||||||
Helpers
|
Helpers
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
function is_imm12(value: aint): boolean;
|
function is_imm12(value: tcgint): boolean;
|
||||||
function is_lui_imm(value: aint): boolean;
|
function is_lui_imm(value: tcgint): boolean;
|
||||||
|
|
||||||
function is_calljmp(o:tasmop):boolean;
|
function is_calljmp(o:tasmop):boolean;
|
||||||
|
|
||||||
@ -359,13 +359,13 @@ implementation
|
|||||||
Helpers
|
Helpers
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
function is_imm12(value: aint): boolean;
|
function is_imm12(value: tcgint): boolean;
|
||||||
begin
|
begin
|
||||||
result:=(value >= -2048) and (value <= 2047);
|
result:=(value >= -2048) and (value <= 2047);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function is_lui_imm(value: aint): boolean;
|
function is_lui_imm(value: tcgint): boolean;
|
||||||
begin
|
begin
|
||||||
result:=SarInt64((value and $FFFFF000) shl 32, 32) = value;
|
result:=SarInt64((value and $FFFFF000) shl 32, 32) = value;
|
||||||
end;
|
end;
|
||||||
|
@ -328,8 +328,8 @@ const
|
|||||||
Helpers
|
Helpers
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
function is_imm12(value: aint): boolean;
|
function is_imm12(value: tcgint): boolean;
|
||||||
function is_lui_imm(value: aint): boolean;
|
function is_lui_imm(value: tcgint): boolean;
|
||||||
|
|
||||||
function is_calljmp(o:tasmop):boolean;
|
function is_calljmp(o:tasmop):boolean;
|
||||||
|
|
||||||
@ -374,13 +374,13 @@ implementation
|
|||||||
Helpers
|
Helpers
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
function is_imm12(value: aint): boolean;
|
function is_imm12(value: tcgint): boolean;
|
||||||
begin
|
begin
|
||||||
result:=(value >= -2048) and (value <= 2047);
|
result:=(value >= -2048) and (value <= 2047);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function is_lui_imm(value: aint): boolean;
|
function is_lui_imm(value: tcgint): boolean;
|
||||||
begin
|
begin
|
||||||
result:=SarInt64((value and $FFFFF000) shl 32, 32) = value;
|
result:=SarInt64((value and $FFFFF000) shl 32, 32) = value;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user