Mercurial > libavcodec.hg
annotate alpha/asm.h @ 3095:66987f98caae libavcodec
18% faster put_h264_qpel16_mc[13]2_mmx2
author | lorenm |
---|---|
date | Tue, 07 Feb 2006 10:52:25 +0000 |
parents | 0b546eab515d |
children | c8c591fe26f8 |
rev | line source |
---|---|
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
1 /* |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
2 * Alpha optimized DSP utils |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
3 * Copyright (c) 2002 Falk Hueffner <falk@debian.org> |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
4 * |
429 | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Lesser General Public | |
7 * License as published by the Free Software Foundation; either | |
8 * version 2 of the License, or (at your option) any later version. | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
9 * |
429 | 10 * This library is distributed in the hope that it will be useful, |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
429 | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Lesser General Public License for more details. | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
14 * |
429 | 15 * You should have received a copy of the GNU Lesser General Public |
16 * License along with this library; if not, write to the Free Software | |
3036
0b546eab515d
Update licensing information: The FSF changed postal address.
diego
parents:
2979
diff
changeset
|
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
18 */ |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
19 |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
20 #ifndef LIBAVCODEC_ALPHA_ASM_H |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
21 #define LIBAVCODEC_ALPHA_ASM_H |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
22 |
504 | 23 #include <inttypes.h> |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
24 |
728 | 25 #if defined __GNUC__ |
26 # define GNUC_PREREQ(maj, min) \ | |
27 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) | |
28 #else | |
29 # define GNUC_PREREQ(maj, min) 0 | |
30 #endif | |
31 | |
32 #if GNUC_PREREQ(2,96) | |
33 # define likely(x) __builtin_expect((x) != 0, 1) | |
34 # define unlikely(x) __builtin_expect((x) != 0, 0) | |
35 #else | |
36 # define likely(x) (x) | |
37 # define unlikely(x) (x) | |
38 #endif | |
39 | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
40 #define AMASK_BWX (1 << 0) |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
41 #define AMASK_FIX (1 << 1) |
504 | 42 #define AMASK_CIX (1 << 2) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
43 #define AMASK_MVI (1 << 8) |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
44 |
1378 | 45 static inline uint64_t BYTE_VEC(uint64_t x) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
46 { |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
47 x |= x << 8; |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
48 x |= x << 16; |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
49 x |= x << 32; |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
50 return x; |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
51 } |
1378 | 52 static inline uint64_t WORD_VEC(uint64_t x) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
53 { |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
54 x |= x << 16; |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
55 x |= x << 32; |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
56 return x; |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
57 } |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
58 |
728 | 59 #define sextw(x) ((int16_t) (x)) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
60 |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
61 #ifdef __GNUC__ |
2765
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
62 #define ldq(p) \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
63 (((union { \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
64 uint64_t __l; \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
65 __typeof__(*(p)) __s[sizeof (uint64_t) / sizeof *(p)]; \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
66 } *) (p))->__l) |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
67 #define ldl(p) \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
68 (((union { \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
69 int32_t __l; \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
70 __typeof__(*(p)) __s[sizeof (int32_t) / sizeof *(p)]; \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
71 } *) (p))->__l) |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
72 #define stq(l, p) \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
73 do { \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
74 (((union { \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
75 uint64_t __l; \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
76 __typeof__(*(p)) __s[sizeof (uint64_t) / sizeof *(p)]; \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
77 } *) (p))->__l) = l; \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
78 } while (0) |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
79 #define stl(l, p) \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
80 do { \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
81 (((union { \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
82 int32_t __l; \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
83 __typeof__(*(p)) __s[sizeof (int32_t) / sizeof *(p)]; \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
84 } *) (p))->__l) = l; \ |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
85 } while (0) |
504 | 86 struct unaligned_long { uint64_t l; } __attribute__((packed)); |
2979 | 87 #define ldq_u(p) (*(const uint64_t *) (((uint64_t) (p)) & ~7ul)) |
88 #define uldq(a) (((const struct unaligned_long *) (a))->l) | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
89 |
728 | 90 #if GNUC_PREREQ(3,3) |
1465
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
91 #define prefetch(p) __builtin_prefetch((p), 0, 1) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
92 #define prefetch_en(p) __builtin_prefetch((p), 0, 0) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
93 #define prefetch_m(p) __builtin_prefetch((p), 1, 1) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
94 #define prefetch_men(p) __builtin_prefetch((p), 1, 0) |
2979 | 95 #define cmpbge __builtin_alpha_cmpbge |
504 | 96 /* Avoid warnings. */ |
2979 | 97 #define extql(a, b) __builtin_alpha_extql(a, (uint64_t) (b)) |
98 #define extwl(a, b) __builtin_alpha_extwl(a, (uint64_t) (b)) | |
99 #define extqh(a, b) __builtin_alpha_extqh(a, (uint64_t) (b)) | |
100 #define zap __builtin_alpha_zap | |
101 #define zapnot __builtin_alpha_zapnot | |
102 #define amask __builtin_alpha_amask | |
103 #define implver __builtin_alpha_implver | |
104 #define rpcc __builtin_alpha_rpcc | |
1465
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
105 #else |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
106 #define prefetch(p) asm volatile("ldl $31,%0" : : "m"(*(const char *) (p)) : "memory") |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
107 #define prefetch_en(p) asm volatile("ldq $31,%0" : : "m"(*(const char *) (p)) : "memory") |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
108 #define prefetch_m(p) asm volatile("lds $f31,%0" : : "m"(*(const char *) (p)) : "memory") |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
109 #define prefetch_men(p) asm volatile("ldt $f31,%0" : : "m"(*(const char *) (p)) : "memory") |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
110 #define cmpbge(a, b) ({ uint64_t __r; asm ("cmpbge %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
111 #define extql(a, b) ({ uint64_t __r; asm ("extql %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
112 #define extwl(a, b) ({ uint64_t __r; asm ("extwl %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
113 #define extqh(a, b) ({ uint64_t __r; asm ("extqh %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
114 #define zap(a, b) ({ uint64_t __r; asm ("zap %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
115 #define zapnot(a, b) ({ uint64_t __r; asm ("zapnot %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) |
2979 | 116 #define amask(a) ({ uint64_t __r; asm ("amask %1,%0" : "=r" (__r) : "rI" (a)); __r; }) |
117 #define implver() ({ uint64_t __r; asm ("implver %0" : "=r" (__r)); __r; }) | |
118 #define rpcc() ({ uint64_t __r; asm volatile ("rpcc %0" : "=r" (__r)); __r; }) | |
1465
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
119 #endif |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
120 #define wh64(p) asm volatile("wh64 (%0)" : : "r"(p) : "memory") |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
121 |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
122 #if GNUC_PREREQ(3,3) && defined(__alpha_max__) |
2979 | 123 #define minub8 __builtin_alpha_minub8 |
124 #define minsb8 __builtin_alpha_minsb8 | |
125 #define minuw4 __builtin_alpha_minuw4 | |
126 #define minsw4 __builtin_alpha_minsw4 | |
127 #define maxub8 __builtin_alpha_maxub8 | |
128 #define maxsb8 __builtin_alpha_maxsb8 | |
129 #define maxuw4 __builtin_alpha_maxuw4 | |
130 #define maxsw4 __builtin_alpha_maxsw4 | |
131 #define perr __builtin_alpha_perr | |
132 #define pklb __builtin_alpha_pklb | |
133 #define pkwb __builtin_alpha_pkwb | |
134 #define unpkbl __builtin_alpha_unpkbl | |
135 #define unpkbw __builtin_alpha_unpkbw | |
504 | 136 #else |
1465
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
137 #define minub8(a, b) ({ uint64_t __r; asm (".arch ev6; minub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
138 #define minsb8(a, b) ({ uint64_t __r; asm (".arch ev6; minsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
139 #define minuw4(a, b) ({ uint64_t __r; asm (".arch ev6; minuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
140 #define minsw4(a, b) ({ uint64_t __r; asm (".arch ev6; minsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
141 #define maxub8(a, b) ({ uint64_t __r; asm (".arch ev6; maxub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
142 #define maxsb8(a, b) ({ uint64_t __r; asm (".arch ev6; maxsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
143 #define maxuw4(a, b) ({ uint64_t __r; asm (".arch ev6; maxuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
144 #define maxsw4(a, b) ({ uint64_t __r; asm (".arch ev6; maxsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) |
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
145 #define perr(a, b) ({ uint64_t __r; asm (".arch ev6; perr %r1,%r2,%0" : "=r" (__r) : "%rJ" (a), "rJ" (b)); __r; }) |
2979 | 146 #define pklb(a) ({ uint64_t __r; asm (".arch ev6; pklb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; }) |
147 #define pkwb(a) ({ uint64_t __r; asm (".arch ev6; pkwb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; }) | |
148 #define unpkbl(a) ({ uint64_t __r; asm (".arch ev6; unpkbl %r1,%0" : "=r" (__r) : "rJ" (a)); __r; }) | |
149 #define unpkbw(a) ({ uint64_t __r; asm (".arch ev6; unpkbw %r1,%0" : "=r" (__r) : "rJ" (a)); __r; }) | |
504 | 150 #endif |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
151 |
2979 | 152 #elif defined(__DECC) /* Digital/Compaq/hp "ccc" compiler */ |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
153 |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
154 #include <c_asm.h> |
2765
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
155 #define ldq(p) (*(const uint64_t *) (p)) |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
156 #define ldl(p) (*(const int32_t *) (p)) |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
157 #define stq(l, p) do { *(uint64_t *) (p) = (l); } while (0) |
e44ff53b1c85
Communicate proper aliasing to gcc (needed for 4.1).
mellum
parents:
1465
diff
changeset
|
158 #define stl(l, p) do { *(int32_t *) (p) = (l); } while (0) |
504 | 159 #define ldq_u(a) asm ("ldq_u %v0,0(%a0)", a) |
2979 | 160 #define uldq(a) (*(const __unaligned uint64_t *) (a)) |
504 | 161 #define cmpbge(a, b) asm ("cmpbge %a0,%a1,%v0", a, b) |
162 #define extql(a, b) asm ("extql %a0,%a1,%v0", a, b) | |
728 | 163 #define extwl(a, b) asm ("extwl %a0,%a1,%v0", a, b) |
504 | 164 #define extqh(a, b) asm ("extqh %a0,%a1,%v0", a, b) |
165 #define zap(a, b) asm ("zap %a0,%a1,%v0", a, b) | |
166 #define zapnot(a, b) asm ("zapnot %a0,%a1,%v0", a, b) | |
167 #define amask(a) asm ("amask %a0,%v0", a) | |
168 #define implver() asm ("implver %v0") | |
2979 | 169 #define rpcc() asm ("rpcc %v0") |
504 | 170 #define minub8(a, b) asm ("minub8 %a0,%a1,%v0", a, b) |
171 #define minsb8(a, b) asm ("minsb8 %a0,%a1,%v0", a, b) | |
172 #define minuw4(a, b) asm ("minuw4 %a0,%a1,%v0", a, b) | |
173 #define minsw4(a, b) asm ("minsw4 %a0,%a1,%v0", a, b) | |
174 #define maxub8(a, b) asm ("maxub8 %a0,%a1,%v0", a, b) | |
175 #define maxsb8(a, b) asm ("maxsb8 %a0,%a1,%v0", a, b) | |
176 #define maxuw4(a, b) asm ("maxuw4 %a0,%a1,%v0", a, b) | |
177 #define maxsw4(a, b) asm ("maxsw4 %a0,%a1,%v0", a, b) | |
178 #define perr(a, b) asm ("perr %a0,%a1,%v0", a, b) | |
179 #define pklb(a) asm ("pklb %a0,%v0", a) | |
180 #define pkwb(a) asm ("pkwb %a0,%v0", a) | |
181 #define unpkbl(a) asm ("unpkbl %a0,%v0", a) | |
182 #define unpkbw(a) asm ("unpkbw %a0,%v0", a) | |
1465
52254c2f9cae
Use asms instead of builtins when compiling for generic Alpha. Less
mellum
parents:
1378
diff
changeset
|
183 #define wh64(a) asm ("wh64 %a0", a) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
184 |
504 | 185 #else |
186 #error "Unknown compiler!" | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
187 #endif |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
188 |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
189 #endif /* LIBAVCODEC_ALPHA_ASM_H */ |