* updated the go32 unit port access functions to use the new x86 port access

compiler intrinsics

git-svn-id: trunk@39385 -
This commit is contained in:
nickysn 2018-07-04 15:47:15 +00:00
parent 967e1fd6b5
commit 25cd354f87

View File

@ -15,6 +15,7 @@
unit go32;
{$S-,R-,I-,Q-} {no stack check, used by DPMIEXCP !! }
{$inline ON}
interface
@ -159,6 +160,7 @@ interface
procedure disable;
procedure enable;
{$ifdef VER3_0}
function inportb(port : word) : byte;
function inportw(port : word) : word;
function inportl(port : word) : longint;
@ -166,6 +168,15 @@ interface
procedure outportb(port : word;data : byte);
procedure outportw(port : word;data : word);
procedure outportl(port : word;data : longint);
{$else VER3_0}
function inportb(port : word) : byte;inline;
function inportw(port : word) : word;inline;
function inportl(port : word) : longint;inline;
procedure outportb(port : word;data : byte);inline;
procedure outportw(port : word;data : word);inline;
procedure outportl(port : word;data : longint);inline;
{$endif VER3_0}
function get_run_mode : word;
function transfer_buffer : longint;
@ -447,6 +458,7 @@ interface
end ['ECX','EAX'];
end;
{$ifdef VER3_0}
procedure outportb(port : word;data : byte);
begin
@ -506,6 +518,37 @@ interface
movl %eax,__RESULT
end ['EAX','EDX'];
end;
{$else VER3_0}
procedure outportb(port : word;data : byte);inline;
begin
fpc_x86_outportb(port,data);
end;
procedure outportw(port : word;data : word);inline;
begin
fpc_x86_outportw(port,data);
end;
procedure outportl(port : word;data : longint);inline;
begin
fpc_x86_outportl(port,data);
end;
function inportb(port : word) : byte;inline;
begin
inportb:=fpc_x86_inportb(port);
end;
function inportw(port : word) : word;inline;
begin
inportw:=fpc_x86_inportw(port);
end;
function inportl(port : word) : longint;inline;
begin
inportl:=fpc_x86_inportl(port);
end;
{$endif VER3_0}