Mercurial > mplayer.hg
annotate vidix/sysdep/AsmMacros_sparc.h @ 23976:001050604aef
Hint at mf://@... syntax
author | reimar |
---|---|
date | Thu, 02 Aug 2007 14:55:39 +0000 |
parents | 88bed2131f19 |
children | 9c4ad35fabc5 |
rev | line source |
---|---|
4164 | 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 */ | |
6 | |
23934
88bed2131f19
Identifiers starting with underscores are reserved.
diego
parents:
22900
diff
changeset
|
7 #ifndef ASMMACROS_SPARC_H |
88bed2131f19
Identifiers starting with underscores are reserved.
diego
parents:
22900
diff
changeset
|
8 #define ASMMACROS_SPARC_H |
4164 | 9 |
10 #ifndef ASI_PL | |
11 #define ASI_PL 0x88 | |
12 #endif | |
13 | |
14 static __inline__ void outb(unsigned long port, char val) | |
15 { | |
16 __asm__ __volatile__("stba %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); | |
17 } | |
18 | |
19 static __inline__ void outw(unsigned long port, char val) | |
20 { | |
21 __asm__ __volatile__("stha %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); | |
22 } | |
23 | |
24 static __inline__ void outl(unsigned long port, char val) | |
25 { | |
26 __asm__ __volatile__("sta %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); | |
27 } | |
28 | |
29 static __inline__ unsigned int inb(unsigned long port) | |
30 { | |
31 unsigned char ret; | |
32 __asm__ __volatile__("lduba [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); | |
33 return ret; | |
34 } | |
35 | |
36 static __inline__ unsigned int inw(unsigned long port) | |
37 { | |
38 unsigned char ret; | |
39 __asm__ __volatile__("lduha [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); | |
40 return ret; | |
41 } | |
42 | |
43 static __inline__ unsigned int inl(unsigned long port) | |
44 { | |
45 unsigned char ret; | |
46 __asm__ __volatile__("lda [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); | |
47 return ret; | |
48 } | |
49 | |
50 #define intr_disable() | |
51 #define intr_enable() | |
52 | |
23934
88bed2131f19
Identifiers starting with underscores are reserved.
diego
parents:
22900
diff
changeset
|
53 #endif /* ASMMACROS_SPARC_H */ |