annotate libmpeg2/sse.h @ 3721:66da035c4ee2

some quick updates for the prerelease
author gabucino
date Mon, 24 Dec 2001 23:00:07 +0000
parents 3b5f5d1c5041
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 * sse.h
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 * Copyright (C) 1999 R. Fisher
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 * mpeg2dec is free software; you can redistribute it and/or modify
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 * (at your option) any later version.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 * mpeg2dec is distributed in the hope that it will be useful,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 * GNU General Public License for more details.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 typedef union {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 float sf[4]; /* Single-precision (32-bit) value */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 } ATTR_ALIGN(16) sse_t; /* On a 16 byte (128-bit) boundary */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 #define sse_i2r(op, imm, reg) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 __asm__ __volatile__ (#op " %0, %%" #reg \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 : /* nothing */ \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 : "X" (imm) )
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 #define sse_m2r(op, mem, reg) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 __asm__ __volatile__ (#op " %0, %%" #reg \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 : /* nothing */ \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 : "X" (mem))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 #define sse_r2m(op, reg, mem) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 __asm__ __volatile__ (#op " %%" #reg ", %0" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 : "=X" (mem) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 : /* nothing */ )
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 #define sse_r2r(op, regs, regd) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 __asm__ __volatile__ (#op " %" #regs ", %" #regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 #define sse_r2ri(op, regs, regd, imm) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 __asm__ __volatile__ (#op " %0, %%" #regs ", %%" #regd \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 : /* nothing */ \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 : "X" (imm) )
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 #define sse_m2ri(op, mem, reg, subop) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 __asm__ __volatile__ (#op " %0, %%" #reg ", " #subop \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 : /* nothing */ \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 : "X" (mem))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 #define movaps_m2r(var, reg) sse_m2r(movaps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 #define movaps_r2m(reg, var) sse_r2m(movaps, reg, var)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 #define movaps_r2r(regs, regd) sse_r2r(movaps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 #define movntps_r2m(xmmreg, var) sse_r2m(movntps, xmmreg, var)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 #define movups_m2r(var, reg) sse_m2r(movups, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 #define movups_r2m(reg, var) sse_r2m(movups, reg, var)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 #define movups_r2r(regs, regd) sse_r2r(movups, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 #define movhlps_r2r(regs, regd) sse_r2r(movhlps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 #define movlhps_r2r(regs, regd) sse_r2r(movlhps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 #define movhps_m2r(var, reg) sse_m2r(movhps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 #define movhps_r2m(reg, var) sse_r2m(movhps, reg, var)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 #define movlps_m2r(var, reg) sse_m2r(movlps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 #define movlps_r2m(reg, var) sse_r2m(movlps, reg, var)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 #define movss_m2r(var, reg) sse_m2r(movss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 #define movss_r2m(reg, var) sse_r2m(movss, reg, var)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 #define movss_r2r(regs, regd) sse_r2r(movss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 #define shufps_m2r(var, reg, index) sse_m2ri(shufps, var, reg, index)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82 #define shufps_r2r(regs, regd, index) sse_r2ri(shufps, regs, regd, index)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84 #define cvtpi2ps_m2r(var, xmmreg) sse_m2r(cvtpi2ps, var, xmmreg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 #define cvtpi2ps_r2r(mmreg, xmmreg) sse_r2r(cvtpi2ps, mmreg, xmmreg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 #define cvtps2pi_m2r(var, mmreg) sse_m2r(cvtps2pi, var, mmreg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88 #define cvtps2pi_r2r(xmmreg, mmreg) sse_r2r(cvtps2pi, mmreg, xmmreg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 #define cvttps2pi_m2r(var, mmreg) sse_m2r(cvttps2pi, var, mmreg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 #define cvttps2pi_r2r(xmmreg, mmreg) sse_r2r(cvttps2pi, mmreg, xmmreg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
93 #define cvtsi2ss_m2r(var, xmmreg) sse_m2r(cvtsi2ss, var, xmmreg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 #define cvtsi2ss_r2r(reg, xmmreg) sse_r2r(cvtsi2ss, reg, xmmreg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96 #define cvtss2si_m2r(var, reg) sse_m2r(cvtss2si, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97 #define cvtss2si_r2r(xmmreg, reg) sse_r2r(cvtss2si, xmmreg, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
98
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
99 #define cvttss2si_m2r(var, reg) sse_m2r(cvtss2si, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
100 #define cvttss2si_r2r(xmmreg, reg) sse_r2r(cvtss2si, xmmreg, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102 #define movmskps(xmmreg, reg) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103 __asm__ __volatile__ ("movmskps %" #xmmreg ", %" #reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
104
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
105 #define addps_m2r(var, reg) sse_m2r(addps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106 #define addps_r2r(regs, regd) sse_r2r(addps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
107
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108 #define addss_m2r(var, reg) sse_m2r(addss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109 #define addss_r2r(regs, regd) sse_r2r(addss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
111 #define subps_m2r(var, reg) sse_m2r(subps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
112 #define subps_r2r(regs, regd) sse_r2r(subps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
113
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
114 #define subss_m2r(var, reg) sse_m2r(subss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
115 #define subss_r2r(regs, regd) sse_r2r(subss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
116
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
117 #define mulps_m2r(var, reg) sse_m2r(mulps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118 #define mulps_r2r(regs, regd) sse_r2r(mulps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
119
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
120 #define mulss_m2r(var, reg) sse_m2r(mulss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
121 #define mulss_r2r(regs, regd) sse_r2r(mulss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
122
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
123 #define divps_m2r(var, reg) sse_m2r(divps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
124 #define divps_r2r(regs, regd) sse_r2r(divps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
125
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
126 #define divss_m2r(var, reg) sse_m2r(divss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
127 #define divss_r2r(regs, regd) sse_r2r(divss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
128
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
129 #define rcpps_m2r(var, reg) sse_m2r(rcpps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
130 #define rcpps_r2r(regs, regd) sse_r2r(rcpps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
131
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
132 #define rcpss_m2r(var, reg) sse_m2r(rcpss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
133 #define rcpss_r2r(regs, regd) sse_r2r(rcpss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
134
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
135 #define rsqrtps_m2r(var, reg) sse_m2r(rsqrtps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
136 #define rsqrtps_r2r(regs, regd) sse_r2r(rsqrtps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
137
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
138 #define rsqrtss_m2r(var, reg) sse_m2r(rsqrtss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
139 #define rsqrtss_r2r(regs, regd) sse_r2r(rsqrtss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
140
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
141 #define sqrtps_m2r(var, reg) sse_m2r(sqrtps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
142 #define sqrtps_r2r(regs, regd) sse_r2r(sqrtps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
143
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
144 #define sqrtss_m2r(var, reg) sse_m2r(sqrtss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
145 #define sqrtss_r2r(regs, regd) sse_r2r(sqrtss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
146
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
147 #define andps_m2r(var, reg) sse_m2r(andps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
148 #define andps_r2r(regs, regd) sse_r2r(andps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
149
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
150 #define andnps_m2r(var, reg) sse_m2r(andnps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
151 #define andnps_r2r(regs, regd) sse_r2r(andnps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
152
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
153 #define orps_m2r(var, reg) sse_m2r(orps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
154 #define orps_r2r(regs, regd) sse_r2r(orps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
155
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
156 #define xorps_m2r(var, reg) sse_m2r(xorps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157 #define xorps_r2r(regs, regd) sse_r2r(xorps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
158
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159 #define maxps_m2r(var, reg) sse_m2r(maxps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
160 #define maxps_r2r(regs, regd) sse_r2r(maxps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
161
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
162 #define maxss_m2r(var, reg) sse_m2r(maxss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
163 #define maxss_r2r(regs, regd) sse_r2r(maxss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
164
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
165 #define minps_m2r(var, reg) sse_m2r(minps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
166 #define minps_r2r(regs, regd) sse_r2r(minps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
167
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
168 #define minss_m2r(var, reg) sse_m2r(minss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
169 #define minss_r2r(regs, regd) sse_r2r(minss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
170
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
171 #define cmpps_m2r(var, reg, op) sse_m2ri(cmpps, var, reg, op)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
172 #define cmpps_r2r(regs, regd, op) sse_r2ri(cmpps, regs, regd, op)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
173
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174 #define cmpeqps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 0)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
175 #define cmpeqps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 0)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
176
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
177 #define cmpltps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 1)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
178 #define cmpltps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 1)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
179
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
180 #define cmpleps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 2)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
181 #define cmpleps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 2)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
182
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
183 #define cmpunordps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 3)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
184 #define cmpunordps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 3)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
185
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
186 #define cmpneqps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 4)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
187 #define cmpneqps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 4)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
188
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
189 #define cmpnltps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 5)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
190 #define cmpnltps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 5)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
191
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
192 #define cmpnleps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 6)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
193 #define cmpnleps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 6)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
194
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
195 #define cmpordps_m2r(var, reg) sse_m2ri(cmpps, var, reg, 7)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
196 #define cmpordps_r2r(regs, regd) sse_r2ri(cmpps, regs, regd, 7)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
197
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
198 #define cmpss_m2r(var, reg, op) sse_m2ri(cmpss, var, reg, op)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
199 #define cmpss_r2r(regs, regd, op) sse_r2ri(cmpss, regs, regd, op)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
200
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
201 #define cmpeqss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 0)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
202 #define cmpeqss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 0)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
203
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
204 #define cmpltss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 1)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
205 #define cmpltss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 1)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
206
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
207 #define cmpless_m2r(var, reg) sse_m2ri(cmpss, var, reg, 2)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
208 #define cmpless_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 2)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
209
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
210 #define cmpunordss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 3)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
211 #define cmpunordss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 3)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
212
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
213 #define cmpneqss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 4)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
214 #define cmpneqss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 4)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
215
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
216 #define cmpnltss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 5)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
217 #define cmpnltss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 5)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
218
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
219 #define cmpnless_m2r(var, reg) sse_m2ri(cmpss, var, reg, 6)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
220 #define cmpnless_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 6)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
221
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
222 #define cmpordss_m2r(var, reg) sse_m2ri(cmpss, var, reg, 7)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
223 #define cmpordss_r2r(regs, regd) sse_r2ri(cmpss, regs, regd, 7)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
224
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
225 #define comiss_m2r(var, reg) sse_m2r(comiss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
226 #define comiss_r2r(regs, regd) sse_r2r(comiss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
227
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
228 #define ucomiss_m2r(var, reg) sse_m2r(ucomiss, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
229 #define ucomiss_r2r(regs, regd) sse_r2r(ucomiss, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
230
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
231 #define unpcklps_m2r(var, reg) sse_m2r(unpcklps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
232 #define unpcklps_r2r(regs, regd) sse_r2r(unpcklps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
233
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
234 #define unpckhps_m2r(var, reg) sse_m2r(unpckhps, var, reg)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
235 #define unpckhps_r2r(regs, regd) sse_r2r(unpckhps, regs, regd)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
236
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
237 #define fxrstor(mem) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
238 __asm__ __volatile__ ("fxrstor %0" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
239 : /* nothing */ \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
240 : "X" (mem))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
241
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
242 #define fxsave(mem) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
243 __asm__ __volatile__ ("fxsave %0" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
244 : /* nothing */ \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
245 : "X" (mem))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
246
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
247 #define stmxcsr(mem) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
248 __asm__ __volatile__ ("stmxcsr %0" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
249 : /* nothing */ \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
250 : "X" (mem))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
251
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
252 #define ldmxcsr(mem) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
253 __asm__ __volatile__ ("ldmxcsr %0" \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
254 : /* nothing */ \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
255 : "X" (mem))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
256