OLD | NEW |
| (Empty) |
1 static __inline void outb(unsigned char __val, unsigned short __port) { | |
2 __asm__ volatile("outb %0,%1" : : "a"(__val), "dN"(__port)); | |
3 } | |
4 | |
5 static __inline void outw(unsigned short __val, unsigned short __port) { | |
6 __asm__ volatile("outw %0,%1" : : "a"(__val), "dN"(__port)); | |
7 } | |
8 | |
9 static __inline void outl(unsigned int __val, unsigned short __port) { | |
10 __asm__ volatile("outl %0,%1" : : "a"(__val), "dN"(__port)); | |
11 } | |
12 | |
13 static __inline unsigned char inb(unsigned short __port) { | |
14 unsigned char __val; | |
15 __asm__ volatile("inb %1,%0" : "=a"(__val) : "dN"(__port)); | |
16 return __val; | |
17 } | |
18 | |
19 static __inline unsigned short inw(unsigned short __port) { | |
20 unsigned short __val; | |
21 __asm__ volatile("inw %1,%0" : "=a"(__val) : "dN"(__port)); | |
22 return __val; | |
23 } | |
24 | |
25 static __inline unsigned int inl(unsigned short __port) { | |
26 unsigned int __val; | |
27 __asm__ volatile("inl %1,%0" : "=a"(__val) : "dN"(__port)); | |
28 return __val; | |
29 } | |
30 | |
31 static __inline void outsb(unsigned short __port, | |
32 const void* __buf, | |
33 unsigned long __n) { | |
34 __asm__ volatile("cld; rep; outsb" : "+S"(__buf), "+c"(__n) : "d"(__port)); | |
35 } | |
36 | |
37 static __inline void outsw(unsigned short __port, | |
38 const void* __buf, | |
39 unsigned long __n) { | |
40 __asm__ volatile("cld; rep; outsw" : "+S"(__buf), "+c"(__n) : "d"(__port)); | |
41 } | |
42 | |
43 static __inline void outsl(unsigned short __port, | |
44 const void* __buf, | |
45 unsigned long __n) { | |
46 __asm__ volatile("cld; rep; outsl" : "+S"(__buf), "+c"(__n) : "d"(__port)); | |
47 } | |
48 | |
49 static __inline void insb(unsigned short __port, | |
50 void* __buf, | |
51 unsigned long __n) { | |
52 __asm__ volatile("cld; rep; insb" : "+D"(__buf), "+c"(__n) : "d"(__port)); | |
53 } | |
54 | |
55 static __inline void insw(unsigned short __port, | |
56 void* __buf, | |
57 unsigned long __n) { | |
58 __asm__ volatile("cld; rep; insw" : "+D"(__buf), "+c"(__n) : "d"(__port)); | |
59 } | |
60 | |
61 static __inline void insl(unsigned short __port, | |
62 void* __buf, | |
63 unsigned long __n) { | |
64 __asm__ volatile("cld; rep; insl" : "+D"(__buf), "+c"(__n) : "d"(__port)); | |
65 } | |
OLD | NEW |