3 $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/AsmMacros.h,v 1.1 2001/11/16 21:13:34 tsi Exp $
4 Modified for readability by Nick Kurshev
7 #ifndef __ASM_MACROS_SPARC_H
8 #define __ASM_MACROS_SPARC_H
14 static __inline__
void outb(unsigned long port
, char val
)
16 __asm__
__volatile__("stba %0, [%1] %2" : : "r" (val
), "r" (port
), "i" (ASI_PL
));
19 static __inline__
void outw(unsigned long port
, char val
)
21 __asm__
__volatile__("stha %0, [%1] %2" : : "r" (val
), "r" (port
), "i" (ASI_PL
));
24 static __inline__
void outl(unsigned long port
, char val
)
26 __asm__
__volatile__("sta %0, [%1] %2" : : "r" (val
), "r" (port
), "i" (ASI_PL
));
29 static __inline__
unsigned int inb(unsigned long port
)
32 __asm__
__volatile__("lduba [%1] %2, %0" : "=r" (ret
) : "r" (port
), "i" (ASI_PL
));
36 static __inline__
unsigned int inw(unsigned long port
)
39 __asm__
__volatile__("lduha [%1] %2, %0" : "=r" (ret
) : "r" (port
), "i" (ASI_PL
));
43 static __inline__
unsigned int inl(unsigned long port
)
46 __asm__
__volatile__("lda [%1] %2, %0" : "=r" (ret
) : "r" (port
), "i" (ASI_PL
));
50 #define intr_disable()