kern
view src/asmops.h @ 3:a9176938bce1
fidled with the makefile
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 04 Dec 2010 10:12:39 +0200 |
parents | ebe5e0e44a9d |
children | b11a86695493 |
line source
1 #ifndef ASMOPS_H_
2 #define ASMOPS_H_
4 #define inb(dest, port) asm volatile( \
5 "inb %1, %0\n\t" \
6 : "=a" ((unsigned char)(dest)) \
7 : "dN" ((unsigned short)(port)))
9 #define ins(dest, port) asm volatile( \
10 "ins %1, %0\n\t" \
11 : "=a" ((unsigned short)(dest)) \
12 : "dN" ((unsigned short)(port)))
14 #define inl(dest, port) asm volatile( \
15 "inl %1, %0\n\t" \
16 : "=a" ((unsigned long)(dest)) \
17 : "dN" ((unsigned short)(port)))
19 #define outb(src, port) asm volatile( \
20 "outb %0, %1\n\t" \
21 :: "a" ((unsigned char)(src)), "dN" ((unsigned short)(port)))
23 #define outs(src, port) asm volatile( \
24 "outs %0, %1\n\t" \
25 :: "a" ((unsigned short)(src)), "dN" ((unsigned short)(port)))
27 #define outl(src, port) asm volatile( \
28 "outl %0, %1\n\t" \
29 :: "a" ((unsigned long)(src)), "dN" ((unsigned short)(port)))
31 #endif /* ASMOPS_H_ */