| 16 | #if defined __NetBSD__ || defined __OpenBSD__ |
| 17 | #include <machine/sysarch.h> |
| 18 | static uint8_t inb(unsigned port) |
| 19 | { |
| 20 | uint8_t data; |
| 21 | __asm volatile("inb %w1,%0" : "=a" (data) : "d" (port)); |
| 22 | return data; |
| 23 | } |
| 24 | static __inline void outb(uint8_t data, unsigned port) |
| 25 | { |
| 26 | __asm volatile("outb %0,%w1" : : "a" (data), "d" (port)); |
no outgoing calls
no test coverage detected