2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 long long q
; /* Quadword (64-bit) value */
24 unsigned long long uq
; /* Unsigned Quadword */
25 int d
[2]; /* 2 Doubleword (32-bit) values */
26 unsigned int ud
[2]; /* 2 Unsigned Doubleword */
27 short w
[4]; /* 4 Word (16-bit) values */
28 unsigned short uw
[4]; /* 4 Unsigned Word */
29 char b
[8]; /* 8 Byte (8-bit) values */
30 unsigned char ub
[8]; /* 8 Unsigned Byte */
31 float s
[2]; /* Single-precision (32-bit) value */
32 } mmx_t
; /* On an 8-byte (64-bit) boundary */
35 #define movq_m2r(var, reg) mmx_m2r(movq, var, reg)
36 #define movq_r2m(reg, var) mmx_r2m(movq, reg, var)
37 #define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd)
39 #define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg)
40 #define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd)
42 #define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg)
43 #define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd)
45 #define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd)
46 #define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd)
47 #define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd)
48 #define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd)
50 #define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg)
51 #define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd)
52 #define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd)
54 #define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd)
55 #define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg)
56 #define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd)
58 #define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg)
60 #define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg)
62 #define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd)
63 #define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg)
65 #define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg)
67 #define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd)
68 #define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd)
70 #define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd)
72 #define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd)
74 #define por_r2r(regs, regd) mmx_r2r(por, regs, regd)
77 #define mmx_i2r(op,imm,reg) \
78 __asm__ volatile (#op " %0, %%" #reg \
82 #define mmx_m2r(op, mem, reg) \
83 __asm__ volatile (#op " %0, %%" #reg \
87 #define mmx_r2m(op, reg, mem) \
88 __asm__ volatile (#op " %%" #reg ", %0" \
92 #define mmx_r2r(op, regs, regd) \
93 __asm__ volatile (#op " %" #regs ", %" #regd)
96 #define emms() __asm__ volatile ("emms")
98 #endif /* MPLAYER_MMX_H */