mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 18:47:54 +02:00
24 lines
466 B
ObjectPascal
24 lines
466 B
ObjectPascal
{ %FAIL }
|
|
|
|
{$mode objfpc}
|
|
unit tw40332;
|
|
|
|
interface
|
|
|
|
function Bsr(const value: byte): byte; internproc: fpc_in_bsr_x;
|
|
function Bsr(const value: word): cardinal; internproc: fpc_in_bsr_x;
|
|
function Bsr(const value: dword): cardinal; internproc: fpc_in_bsr_x;
|
|
{$ifdef cpu64}
|
|
function Bsr(const value: qword): cardinal; internproc: fpc_in_bsr_x;
|
|
{$endif}
|
|
|
|
type
|
|
SomeEnum = (A, B, C, D);
|
|
|
|
const
|
|
SomeEnumBits = 1 + Bsr(ord(High(SomeEnum)) or 1);
|
|
|
|
implementation
|
|
|
|
end.
|