Blame arch/nt32/bits/io.h

20a5ca
static __inline void outb(unsigned char __val, unsigned short __port)
20a5ca
{
20a5ca
	__asm__ volatile ("outb %0,%1" : : "a" (__val), "dN" (__port));
20a5ca
}
20a5ca
20a5ca
static __inline void outw(unsigned short __val, unsigned short __port)
20a5ca
{
20a5ca
	__asm__ volatile ("outw %0,%1" : : "a" (__val), "dN" (__port));
20a5ca
}
20a5ca
20a5ca
static __inline void outl(unsigned int __val, unsigned short __port)
20a5ca
{
20a5ca
	__asm__ volatile ("outl %0,%1" : : "a" (__val), "dN" (__port));
20a5ca
}
20a5ca
20a5ca
static __inline unsigned char inb(unsigned short __port)
20a5ca
{
20a5ca
	unsigned char __val;
20a5ca
	__asm__ volatile ("inb %1,%0" : "=a" (__val) : "dN" (__port));
20a5ca
	return __val;
20a5ca
}
20a5ca
20a5ca
static __inline unsigned short inw(unsigned short __port)
20a5ca
{
20a5ca
	unsigned short __val;
20a5ca
	__asm__ volatile ("inw %1,%0" : "=a" (__val) : "dN" (__port));
20a5ca
	return __val;
20a5ca
}
20a5ca
20a5ca
static __inline unsigned int inl(unsigned short __port)
20a5ca
{
20a5ca
	unsigned int __val;
20a5ca
	__asm__ volatile ("inl %1,%0" : "=a" (__val) : "dN" (__port));
20a5ca
	return __val;
20a5ca
}
20a5ca
20a5ca
static __inline void outsb(unsigned short __port, const void *__buf, unsigned long __n)
20a5ca
{
20a5ca
	__asm__ volatile ("cld; rep; outsb"
20a5ca
		      : "+S" (__buf), "+c" (__n)
20a5ca
		      : "d" (__port));
20a5ca
}
20a5ca
20a5ca
static __inline void outsw(unsigned short __port, const void *__buf, unsigned long __n)
20a5ca
{
20a5ca
	__asm__ volatile ("cld; rep; outsw"
20a5ca
		      : "+S" (__buf), "+c" (__n)
20a5ca
		      : "d" (__port));
20a5ca
}
20a5ca
20a5ca
static __inline void outsl(unsigned short __port, const void *__buf, unsigned long __n)
20a5ca
{
20a5ca
	__asm__ volatile ("cld; rep; outsl"
20a5ca
		      : "+S" (__buf), "+c"(__n)
20a5ca
		      : "d" (__port));
20a5ca
}
20a5ca
20a5ca
static __inline void insb(unsigned short __port, void *__buf, unsigned long __n)
20a5ca
{
20a5ca
	__asm__ volatile ("cld; rep; insb"
20a5ca
		      : "+D" (__buf), "+c" (__n)
20a5ca
		      : "d" (__port));
20a5ca
}
20a5ca
20a5ca
static __inline void insw(unsigned short __port, void *__buf, unsigned long __n)
20a5ca
{
20a5ca
	__asm__ volatile ("cld; rep; insw"
20a5ca
		      : "+D" (__buf), "+c" (__n)
20a5ca
		      : "d" (__port));
20a5ca
}
20a5ca
20a5ca
static __inline void insl(unsigned short __port, void *__buf, unsigned long __n)
20a5ca
{
20a5ca
	__asm__ volatile ("cld; rep; insl"
20a5ca
		      : "+D" (__buf), "+c" (__n)
20a5ca
		      : "d" (__port));
20a5ca
}