Mercurial > mplayer.hg
annotate vidix/AsmMacros.h @ 29310:c35891e664af
replace "g" asm constraint by "erm" since "g" allows 64bit immediates while
the operator (cmp) using the "g"-constrained operand doesn't support 64bit
immediates.
Original thread:
date: Tue, Jun 2, 2009 at 11:31 AM
subject: [PATCH] Fix MPlayer to compile on Darwin/x86_86
author | gpoirier |
---|---|
date | Sun, 07 Jun 2009 14:42:43 +0000 |
parents | 0f1b5b68af32 |
children | 2c0a16bf54bb |
rev | line source |
---|---|
3973 | 1 /* $XConsortium: AsmMacros.h /main/13 1996/10/25 11:33:12 kaleb $ */ |
2 /* | |
3 * (c) Copyright 1993,1994 by David Wexelblat <dwex@xfree86.org> | |
4 * | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
5 * Permission is hereby granted, free of charge, to any person obtaining a |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
6 * copy of this software and associated documentation files (the "Software"), |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
7 * to deal in the Software without restriction, including without limitation |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
9 * and/or sell copies of the Software, and to permit persons to whom the |
3973 | 10 * Software is furnished to do so, subject to the following conditions: |
11 * | |
12 * The above copyright notice and this permission notice shall be included in | |
13 * all copies or substantial portions of the Software. | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
14 * |
3973 | 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
18 * DAVID WEXELBLAT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
19 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
20 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
3973 | 21 * SOFTWARE. |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
22 * |
3973 | 23 * Except as contained in this notice, the name of David Wexelblat shall not be |
24 * used in advertising or otherwise to promote the sale, use or other dealings | |
25 * in this Software without prior written authorization from David Wexelblat. | |
26 * | |
27 */ | |
28 /* | |
29 * Copyright 1997 | |
30 * Digital Equipment Corporation. All rights reserved. | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
31 * This software is furnished under license and may be used and copied only in |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
32 * accordance with the following terms and conditions. Subject to these |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
33 * conditions, you may download, copy, install, use, modify and distribute |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
34 * this software in source and/or binary form. No title or ownership is |
3973 | 35 * transferred hereby. |
36 * | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
37 * 1) Any source code used, modified or distributed must reproduce and retain |
3973 | 38 * this copyright notice and list of conditions as they appear in the source |
39 * file. | |
40 * | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
41 * 2) No right is granted to use any trade name, trademark, or logo of Digital |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
42 * Equipment Corporation. Neither the "Digital Equipment Corporation" name |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
43 * nor any trademark or logo of Digital Equipment Corporation may be used |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
44 * to endorse or promote products derived from this software without the |
3973 | 45 * prior written permission of Digital Equipment Corporation. |
46 * | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
47 * 3) This software is provided "AS-IS" and any express or implied warranties, |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
48 * including but not limited to, any implied warranties of merchantability, |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
49 * fitness for a particular purpose, or non-infringement are disclaimed. In |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
50 * no event shall DIGITAL be liable for any damages whatsoever, and in |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
51 * particular, DIGITAL shall not be liable for special, indirect, |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
52 * consequential, or incidental damages or damages for |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
53 * lost profits, loss of revenue or loss of use, whether such damages arise |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
54 * in contract, |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
55 * negligence, tort, under statute, in equity, at law or otherwise, even if |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27754
diff
changeset
|
56 * advised of the possibility of such damage. |
3973 | 57 * |
58 */ | |
59 | |
4102 | 60 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/AsmMacros.h,v 1.1 2001/11/16 21:13:34 tsi Exp $ */ |
3973 | 61 |
4164 | 62 /* |
63 * Modified for readability by Nick Kurshev | |
64 */ | |
3973 | 65 |
26030 | 66 #ifndef MPLAYER_ASMMACROS_H |
67 #define MPLAYER_ASMMACROS_H | |
25553
6ac1ece1f9fe
Add multiple inclusion guards to all header files that lack them.
diego
parents:
22900
diff
changeset
|
68 |
4164 | 69 #if defined(__GNUC__) |
70 #if defined(__alpha__) | |
71 #include "sysdep/AsmMacros_alpha.h" | |
72 #elif defined(__ia64__) | |
73 #include "sysdep/AsmMacros_ia64.h" | |
74 #elif defined(__sparc__) | |
75 #include "sysdep/AsmMacros_sparc.h" | |
76 #elif defined( __arm32__ ) | |
77 #include "sysdep/AsmMacros_arm32.h" | |
78 #elif defined(__powerpc__) | |
79 #include "sysdep/AsmMacros_powerpc.h" | |
27419 | 80 #elif defined(__sh__) |
81 #include <sys/io.h> | |
4102 | 82 #else |
4164 | 83 #include "sysdep/AsmMacros_x86.h" |
84 #endif | |
3973 | 85 |
86 #else /* __GNUC__ */ | |
87 | |
88 #if defined(_MINIX) && defined(_ACK) | |
89 | |
90 /* inb, outb, inw and outw are defined in the library */ | |
91 /* ... but I've no idea if the same is true for inl & outl */ | |
92 | |
93 u8_t inb(U16_t); | |
94 void outb(U16_t, U8_t); | |
95 u16_t inw(U16_t); | |
96 void outw(U16_t, U16_t); | |
97 u32_t inl(U16_t); | |
98 void outl(U16_t, U32_t); | |
99 | |
100 #else /* not _MINIX and _ACK */ | |
101 | |
102 # ifdef SVR4 | |
103 # include <sys/types.h> | |
104 # ifndef __USLC__ | |
105 # define __USLC__ | |
106 # endif | |
107 # endif | |
108 #ifndef SCO325 | |
109 # include <sys/inline.h> | |
110 #else | |
111 # include "../common/scoasm.h" | |
112 #endif | |
27754
08d18fe9da52
Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents:
27419
diff
changeset
|
113 #define intr_disable() __asm__("cli") |
08d18fe9da52
Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
diego
parents:
27419
diff
changeset
|
114 #define intr_enable() __asm__("sti") |
3973 | 115 |
116 #endif /* _MINIX and _ACK */ | |
117 #endif /* __GNUC__ */ | |
25553
6ac1ece1f9fe
Add multiple inclusion guards to all header files that lack them.
diego
parents:
22900
diff
changeset
|
118 |
26030 | 119 #endif /* MPLAYER_ASMMACROS_H */ |