mirror of
https://github.com/vapaamies/KolibriOS.git
synced 2024-11-10 18:20:35 +01:00
FPU support added
This commit is contained in:
parent
fcc3c349b8
commit
733019e96b
@ -149,6 +149,13 @@ procedure _Halt0;
|
|||||||
procedure _HandleFinally;
|
procedure _HandleFinally;
|
||||||
procedure _StartExe(InitTable: PPackageInfo);
|
procedure _StartExe(InitTable: PPackageInfo);
|
||||||
|
|
||||||
|
var
|
||||||
|
Default8087CW: Word = $1332; // for Extended type
|
||||||
|
|
||||||
|
procedure InitFPU;
|
||||||
|
function Get8087CW: Word;
|
||||||
|
procedure Set8087CW(Value: Word);
|
||||||
|
|
||||||
function UpCase(Ch: KolibriChar): KolibriChar;
|
function UpCase(Ch: KolibriChar): KolibriChar;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -217,6 +224,29 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure InitFPU;
|
||||||
|
asm
|
||||||
|
FNINIT
|
||||||
|
FWAIT
|
||||||
|
FLDCW Default8087CW
|
||||||
|
end;
|
||||||
|
|
||||||
|
function Get8087CW: Word;
|
||||||
|
asm
|
||||||
|
PUSH 0
|
||||||
|
FNSTCW [ESP].Word
|
||||||
|
POP EAX
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Set8087CW(Value: Word);
|
||||||
|
begin
|
||||||
|
Default8087CW := Value;
|
||||||
|
asm
|
||||||
|
FNCLEX
|
||||||
|
FLDCW Default8087CW
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function UpCase(Ch: KolibriChar): KolibriChar;
|
function UpCase(Ch: KolibriChar): KolibriChar;
|
||||||
begin
|
begin
|
||||||
if Ch in ['a'..'z'] then
|
if Ch in ['a'..'z'] then
|
||||||
|
Loading…
Reference in New Issue
Block a user