10l: comparison of char* ptrs with string literals
[mplayer.git] / libdha / sysdep / AsmMacros_sparc.h
blobf6717b4bb7af9db96e6b29da4ac292d82e66386d
1 /*
2 This file is based on:
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
5 */
7 #ifndef __ASM_MACROS_SPARC_H
8 #define __ASM_MACROS_SPARC_H
10 #ifndef ASI_PL
11 #define ASI_PL 0x88
12 #endif
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)
31 unsigned char ret;
32 __asm__ __volatile__("lduba [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL));
33 return ret;
36 static __inline__ unsigned int inw(unsigned long port)
38 unsigned char ret;
39 __asm__ __volatile__("lduha [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL));
40 return ret;
43 static __inline__ unsigned int inl(unsigned long port)
45 unsigned char ret;
46 __asm__ __volatile__("lda [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL));
47 return ret;
50 #define intr_disable()
51 #define intr_enable()
53 #endif