diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-02 09:49:10 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-02 10:14:26 +0100 |
commit | 05565bad5803fd09c3fb003f92f620b5e6ae11b1 (patch) | |
tree | 9c739d597c5c75ed00c3474b165ab09186ce3663 /Kernel/IO.cpp | |
parent | 812e7940e29e337b49a1faca3e972fbb72513d58 (diff) | |
download | serenity-05565bad5803fd09c3fb003f92f620b5e6ae11b1.zip |
Make IO helpers inline and use immediate-encoded ports when possible.
Diffstat (limited to 'Kernel/IO.cpp')
-rw-r--r-- | Kernel/IO.cpp | 41 |
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)); -} - -} |