summaryrefslogtreecommitdiff
path: root/Kernel/IO.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-02 09:49:10 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-02 10:14:26 +0100
commit05565bad5803fd09c3fb003f92f620b5e6ae11b1 (patch)
tree9c739d597c5c75ed00c3474b165ab09186ce3663 /Kernel/IO.cpp
parent812e7940e29e337b49a1faca3e972fbb72513d58 (diff)
downloadserenity-05565bad5803fd09c3fb003f92f620b5e6ae11b1.zip
Make IO helpers inline and use immediate-encoded ports when possible.
Diffstat (limited to 'Kernel/IO.cpp')
-rw-r--r--Kernel/IO.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/Kernel/IO.cpp b/Kernel/IO.cpp
deleted file mode 100644
index baeaa1bfec..0000000000
--- a/Kernel/IO.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "IO.h"
-
-namespace IO {
-
-BYTE in8(WORD port)
-{
- BYTE value;
- asm("inb %%dx, %%al":"=a"(value):"d"(port));
- return value;
-}
-
-WORD in16(WORD port)
-{
- WORD value;
- asm("inw %%dx, %%ax":"=a"(value):"d"(port));
- return value;
-}
-
-DWORD in32(DWORD port)
-{
- DWORD value;
- asm("inl %%dx, %%eax":"=a"(value):"d"(port));
- return value;
-}
-
-void out8(WORD port, BYTE value)
-{
- asm("outb %%al, %%dx"::"d"(port), "a"(value));
-}
-
-void out16(WORD port, WORD value)
-{
- asm("outw %%ax, %%dx"::"d"(port), "a"(value));
-}
-
-void out32(WORD port, WORD value)
-{
- asm("outl %%eax, %%dx"::"d"(port), "a"(value));
-}
-
-}