Revision be449fca libavcodec/alpha/asm.h

View differences:

libavcodec/alpha/asm.h
105 105
#define implver         __builtin_alpha_implver
106 106
#define rpcc            __builtin_alpha_rpcc
107 107
#else
108
#define prefetch(p)     asm volatile("ldl $31,%0"  : : "m"(*(const char *) (p)) : "memory")
109
#define prefetch_en(p)  asm volatile("ldq $31,%0"  : : "m"(*(const char *) (p)) : "memory")
110
#define prefetch_m(p)   asm volatile("lds $f31,%0" : : "m"(*(const char *) (p)) : "memory")
111
#define prefetch_men(p) asm volatile("ldt $f31,%0" : : "m"(*(const char *) (p)) : "memory")
112
#define cmpbge(a, b) ({ uint64_t __r; asm ("cmpbge  %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
113
#define extql(a, b)  ({ uint64_t __r; asm ("extql   %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
114
#define extwl(a, b)  ({ uint64_t __r; asm ("extwl   %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
115
#define extqh(a, b)  ({ uint64_t __r; asm ("extqh   %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
116
#define zap(a, b)    ({ uint64_t __r; asm ("zap     %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
117
#define zapnot(a, b) ({ uint64_t __r; asm ("zapnot  %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
118
#define amask(a)     ({ uint64_t __r; asm ("amask   %1,%0"      : "=r" (__r) : "rI"  (a));           __r; })
119
#define implver()    ({ uint64_t __r; asm ("implver %0"         : "=r" (__r));                       __r; })
120
#define rpcc()       ({ uint64_t __r; asm volatile ("rpcc %0"   : "=r" (__r));                       __r; })
108
#define prefetch(p)     __asm__ volatile("ldl $31,%0"  : : "m"(*(const char *) (p)) : "memory")
109
#define prefetch_en(p)  __asm__ volatile("ldq $31,%0"  : : "m"(*(const char *) (p)) : "memory")
110
#define prefetch_m(p)   __asm__ volatile("lds $f31,%0" : : "m"(*(const char *) (p)) : "memory")
111
#define prefetch_men(p) __asm__ volatile("ldt $f31,%0" : : "m"(*(const char *) (p)) : "memory")
112
#define cmpbge(a, b) ({ uint64_t __r; __asm__ ("cmpbge  %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
113
#define extql(a, b)  ({ uint64_t __r; __asm__ ("extql   %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
114
#define extwl(a, b)  ({ uint64_t __r; __asm__ ("extwl   %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
115
#define extqh(a, b)  ({ uint64_t __r; __asm__ ("extqh   %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
116
#define zap(a, b)    ({ uint64_t __r; __asm__ ("zap     %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
117
#define zapnot(a, b) ({ uint64_t __r; __asm__ ("zapnot  %r1,%2,%0"  : "=r" (__r) : "rJ"  (a), "rI" (b)); __r; })
118
#define amask(a)     ({ uint64_t __r; __asm__ ("amask   %1,%0"      : "=r" (__r) : "rI"  (a));           __r; })
119
#define implver()    ({ uint64_t __r; __asm__ ("implver %0"         : "=r" (__r));                       __r; })
120
#define rpcc()       ({ uint64_t __r; __asm__ volatile ("rpcc %0"   : "=r" (__r));                       __r; })
121 121
#endif
122
#define wh64(p) asm volatile("wh64 (%0)" : : "r"(p) : "memory")
122
#define wh64(p) __asm__ volatile("wh64 (%0)" : : "r"(p) : "memory")
123 123

  
124 124
#if GNUC_PREREQ(3,3) && defined(__alpha_max__)
125 125
#define minub8  __builtin_alpha_minub8
......
136 136
#define unpkbl  __builtin_alpha_unpkbl
137 137
#define unpkbw  __builtin_alpha_unpkbw
138 138
#else
139
#define minub8(a, b) ({ uint64_t __r; asm (".arch ev6; minub8  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
140
#define minsb8(a, b) ({ uint64_t __r; asm (".arch ev6; minsb8  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
141
#define minuw4(a, b) ({ uint64_t __r; asm (".arch ev6; minuw4  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
142
#define minsw4(a, b) ({ uint64_t __r; asm (".arch ev6; minsw4  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
143
#define maxub8(a, b) ({ uint64_t __r; asm (".arch ev6; maxub8  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
144
#define maxsb8(a, b) ({ uint64_t __r; asm (".arch ev6; maxsb8  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
145
#define maxuw4(a, b) ({ uint64_t __r; asm (".arch ev6; maxuw4  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
146
#define maxsw4(a, b) ({ uint64_t __r; asm (".arch ev6; maxsw4  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
147
#define perr(a, b)   ({ uint64_t __r; asm (".arch ev6; perr    %r1,%r2,%0" : "=r" (__r) : "%rJ" (a), "rJ" (b)); __r; })
148
#define pklb(a)      ({ uint64_t __r; asm (".arch ev6; pklb    %r1,%0"     : "=r" (__r) : "rJ"  (a));           __r; })
149
#define pkwb(a)      ({ uint64_t __r; asm (".arch ev6; pkwb    %r1,%0"     : "=r" (__r) : "rJ"  (a));           __r; })
150
#define unpkbl(a)    ({ uint64_t __r; asm (".arch ev6; unpkbl  %r1,%0"     : "=r" (__r) : "rJ"  (a));           __r; })
151
#define unpkbw(a)    ({ uint64_t __r; asm (".arch ev6; unpkbw  %r1,%0"     : "=r" (__r) : "rJ"  (a));           __r; })
139
#define minub8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minub8  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
140
#define minsb8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minsb8  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
141
#define minuw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minuw4  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
142
#define minsw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minsw4  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
143
#define maxub8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxub8  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
144
#define maxsb8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxsb8  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
145
#define maxuw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxuw4  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
146
#define maxsw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxsw4  %r1,%2,%0"  : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
147
#define perr(a, b)   ({ uint64_t __r; __asm__ (".arch ev6; perr    %r1,%r2,%0" : "=r" (__r) : "%rJ" (a), "rJ" (b)); __r; })
148
#define pklb(a)      ({ uint64_t __r; __asm__ (".arch ev6; pklb    %r1,%0"     : "=r" (__r) : "rJ"  (a));           __r; })
149
#define pkwb(a)      ({ uint64_t __r; __asm__ (".arch ev6; pkwb    %r1,%0"     : "=r" (__r) : "rJ"  (a));           __r; })
150
#define unpkbl(a)    ({ uint64_t __r; __asm__ (".arch ev6; unpkbl  %r1,%0"     : "=r" (__r) : "rJ"  (a));           __r; })
151
#define unpkbw(a)    ({ uint64_t __r; __asm__ (".arch ev6; unpkbw  %r1,%0"     : "=r" (__r) : "rJ"  (a));           __r; })
152 152
#endif
153 153

  
154 154
#elif defined(__DECC)           /* Digital/Compaq/hp "ccc" compiler */
......
158 158
#define ldl(p) (*(const int32_t *)  (p))
159 159
#define stq(l, p) do { *(uint64_t *) (p) = (l); } while (0)
160 160
#define stl(l, p) do { *(int32_t *)  (p) = (l); } while (0)
161
#define ldq_u(a)     asm ("ldq_u   %v0,0(%a0)", a)
161
#define ldq_u(a)     __asm__ ("ldq_u   %v0,0(%a0)", a)
162 162
#define uldq(a)      (*(const __unaligned uint64_t *) (a))
163
#define cmpbge(a, b) asm ("cmpbge  %a0,%a1,%v0", a, b)
164
#define extql(a, b)  asm ("extql   %a0,%a1,%v0", a, b)
165
#define extwl(a, b)  asm ("extwl   %a0,%a1,%v0", a, b)
166
#define extqh(a, b)  asm ("extqh   %a0,%a1,%v0", a, b)
167
#define zap(a, b)    asm ("zap     %a0,%a1,%v0", a, b)
168
#define zapnot(a, b) asm ("zapnot  %a0,%a1,%v0", a, b)
169
#define amask(a)     asm ("amask   %a0,%v0", a)
170
#define implver()    asm ("implver %v0")
171
#define rpcc()       asm ("rpcc           %v0")
172
#define minub8(a, b) asm ("minub8  %a0,%a1,%v0", a, b)
173
#define minsb8(a, b) asm ("minsb8  %a0,%a1,%v0", a, b)
174
#define minuw4(a, b) asm ("minuw4  %a0,%a1,%v0", a, b)
175
#define minsw4(a, b) asm ("minsw4  %a0,%a1,%v0", a, b)
176
#define maxub8(a, b) asm ("maxub8  %a0,%a1,%v0", a, b)
177
#define maxsb8(a, b) asm ("maxsb8  %a0,%a1,%v0", a, b)
178
#define maxuw4(a, b) asm ("maxuw4  %a0,%a1,%v0", a, b)
179
#define maxsw4(a, b) asm ("maxsw4  %a0,%a1,%v0", a, b)
180
#define perr(a, b)   asm ("perr    %a0,%a1,%v0", a, b)
181
#define pklb(a)      asm ("pklb    %a0,%v0", a)
182
#define pkwb(a)      asm ("pkwb    %a0,%v0", a)
183
#define unpkbl(a)    asm ("unpkbl  %a0,%v0", a)
184
#define unpkbw(a)    asm ("unpkbw  %a0,%v0", a)
185
#define wh64(a)      asm ("wh64    %a0", a)
163
#define cmpbge(a, b) __asm__ ("cmpbge  %a0,%a1,%v0", a, b)
164
#define extql(a, b)  __asm__ ("extql   %a0,%a1,%v0", a, b)
165
#define extwl(a, b)  __asm__ ("extwl   %a0,%a1,%v0", a, b)
166
#define extqh(a, b)  __asm__ ("extqh   %a0,%a1,%v0", a, b)
167
#define zap(a, b)    __asm__ ("zap     %a0,%a1,%v0", a, b)
168
#define zapnot(a, b) __asm__ ("zapnot  %a0,%a1,%v0", a, b)
169
#define amask(a)     __asm__ ("amask   %a0,%v0", a)
170
#define implver()    __asm__ ("implver %v0")
171
#define rpcc()       __asm__ ("rpcc           %v0")
172
#define minub8(a, b) __asm__ ("minub8  %a0,%a1,%v0", a, b)
173
#define minsb8(a, b) __asm__ ("minsb8  %a0,%a1,%v0", a, b)
174
#define minuw4(a, b) __asm__ ("minuw4  %a0,%a1,%v0", a, b)
175
#define minsw4(a, b) __asm__ ("minsw4  %a0,%a1,%v0", a, b)
176
#define maxub8(a, b) __asm__ ("maxub8  %a0,%a1,%v0", a, b)
177
#define maxsb8(a, b) __asm__ ("maxsb8  %a0,%a1,%v0", a, b)
178
#define maxuw4(a, b) __asm__ ("maxuw4  %a0,%a1,%v0", a, b)
179
#define maxsw4(a, b) __asm__ ("maxsw4  %a0,%a1,%v0", a, b)
180
#define perr(a, b)   __asm__ ("perr    %a0,%a1,%v0", a, b)
181
#define pklb(a)      __asm__ ("pklb    %a0,%v0", a)
182
#define pkwb(a)      __asm__ ("pkwb    %a0,%v0", a)
183
#define unpkbl(a)    __asm__ ("unpkbl  %a0,%v0", a)
184
#define unpkbw(a)    __asm__ ("unpkbw  %a0,%v0", a)
185
#define wh64(a)      __asm__ ("wh64    %a0", a)
186 186

  
187 187
#else
188 188
#error "Unknown compiler!"

Also available in: Unified diff