annotate mp3lib/decode_MMX.c @ 23927:91ccac9cc015

Add test for GNUisms It currently tests for case ... ranges only, but other tests (like GNU extensions to libc) can be added later
author ivo
date Mon, 30 Jul 2007 18:08:26 +0000
parents d986b47f1451
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4142
nick
parents:
diff changeset
1 /*
nick
parents:
diff changeset
2 * this code comes under GPL
nick
parents:
diff changeset
3 * This code was taken from http://www.mpg123.org
nick
parents:
diff changeset
4 * See ChangeLog of mpg123-0.59s-pre.1 for detail
nick
parents:
diff changeset
5 * Applied to mplayer by Nick Kurshev <nickols_k@mail.ru>
nick
parents:
diff changeset
6 *
nick
parents:
diff changeset
7 * Local ChangeLog:
nick
parents:
diff changeset
8 * - Partial loops unrolling and removing MOVW insn from loops
nick
parents:
diff changeset
9 */
16989
e7a129082fda Unify include paths, -I.. is in CFLAGS.
diego
parents: 12292
diff changeset
10 #include "config.h"
e7a129082fda Unify include paths, -I.. is in CFLAGS.
diego
parents: 12292
diff changeset
11 #include "mangle.h"
4142
nick
parents:
diff changeset
12 #define real float /* ugly - but only way */
nick
parents:
diff changeset
13
23342
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
14 extern void (*dct64_MMX_func)(short*, short*, real*);
12292
114f3d149324 attribute_used for gcc3.4
alex
parents: 11266
diff changeset
15 static unsigned long long attribute_used __attribute__((aligned(8))) null_one = 0x0000ffff0000ffffULL;
114f3d149324 attribute_used for gcc3.4
alex
parents: 11266
diff changeset
16 static unsigned long long attribute_used __attribute__((aligned(8))) one_null = 0xffff0000ffff0000ULL;
23434
d986b47f1451 Use int and uint32_t instead of long and unsigned long, when appropriate.
zuxy
parents: 23365
diff changeset
17 unsigned int __attribute__((aligned(16))) costab_mmx[] =
4142
nick
parents:
diff changeset
18 {
nick
parents:
diff changeset
19 1056974725,
nick
parents:
diff changeset
20 1057056395,
nick
parents:
diff changeset
21 1057223771,
nick
parents:
diff changeset
22 1057485416,
nick
parents:
diff changeset
23 1057855544,
nick
parents:
diff changeset
24 1058356026,
nick
parents:
diff changeset
25 1059019886,
nick
parents:
diff changeset
26 1059897405,
nick
parents:
diff changeset
27 1061067246,
nick
parents:
diff changeset
28 1062657950,
nick
parents:
diff changeset
29 1064892987,
nick
parents:
diff changeset
30 1066774581,
nick
parents:
diff changeset
31 1069414683,
nick
parents:
diff changeset
32 1073984175,
nick
parents:
diff changeset
33 1079645762,
nick
parents:
diff changeset
34 1092815430,
nick
parents:
diff changeset
35 1057005197,
nick
parents:
diff changeset
36 1057342072,
nick
parents:
diff changeset
37 1058087743,
nick
parents:
diff changeset
38 1059427869,
nick
parents:
diff changeset
39 1061799040,
nick
parents:
diff changeset
40 1065862217,
nick
parents:
diff changeset
41 1071413542,
nick
parents:
diff changeset
42 1084439708,
nick
parents:
diff changeset
43 1057128951,
nick
parents:
diff changeset
44 1058664893,
nick
parents:
diff changeset
45 1063675095,
nick
parents:
diff changeset
46 1076102863,
nick
parents:
diff changeset
47 1057655764,
nick
parents:
diff changeset
48 1067924853,
nick
parents:
diff changeset
49 1060439283,
nick
parents:
diff changeset
50 };
nick
parents:
diff changeset
51
23365
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
52 /**
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
53 This array of magic numbers were calculated by the pure function
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
54 make_decode_tables_MMX(32768), which had been implemented in (deleted since
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
55 r23383) tabinit_MMX.c.
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
56 */
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
57 static short __attribute__((aligned(8))) mp3lib_decwins[] =
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
58 {
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
59 0, 7, 54, 114, 510, 1288, 1644, 9372,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
60 18760, -9373, 1644, -1289, 510, -115, 54, -8,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
61 0, 7, 54, 114, 510, 1288, 1644, 9372,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
62 18760, -9373, 1644, -1289, 510, -115, 54, -8,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
63 0, 7, 55, 129, 500, 1379, 1490, 9834,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
64 18748, -8910, 1784, -1197, 516, -101, 52, -7,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
65 0, 7, 55, 129, 500, 1379, 1490, 9834,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
66 18748, -8910, 1784, -1197, 516, -101, 52, -7,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
67 0, 8, 56, 145, 488, 1469, 1322, 10294,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
68 18714, -8448, 1910, -1107, 520, -87, 51, -6,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
69 0, 8, 56, 145, 488, 1469, 1322, 10294,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
70 18714, -8448, 1910, -1107, 520, -87, 51, -6,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
71 0, 9, 57, 161, 474, 1559, 1141, 10751,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
72 18658, -7987, 2023, -1016, 522, -74, 49, -6,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
73 0, 9, 57, 161, 474, 1559, 1141, 10751,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
74 18658, -7987, 2023, -1016, 522, -74, 49, -6,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
75 0, 10, 57, 177, 456, 1647, 944, 11205,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
76 18579, -7528, 2123, -927, 522, -61, 48, -5,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
77 0, 10, 57, 177, 456, 1647, 944, 11205,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
78 18579, -7528, 2123, -927, 522, -61, 48, -5,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
79 0, 11, 57, 194, 435, 1733, 734, 11654,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
80 18477, -7073, 2210, -838, 519, -50, 46, -5,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
81 0, 11, 57, 194, 435, 1733, 734, 11654,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
82 18477, -7073, 2210, -838, 519, -50, 46, -5,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
83 0, 12, 57, 212, 411, 1817, 510, 12097,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
84 18354, -6621, 2285, -751, 515, -39, 44, -4,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
85 0, 12, 57, 212, 411, 1817, 510, 12097,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
86 18354, -6621, 2285, -751, 515, -39, 44, -4,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
87 0, 13, 57, 229, 384, 1899, 271, 12534,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
88 18209, -6174, 2348, -666, 508, -28, 43, -4,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
89 0, 13, 57, 229, 384, 1899, 271, 12534,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
90 18209, -6174, 2348, -666, 508, -28, 43, -4,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
91 0, 14, 56, 247, 354, 1977, 18, 12963,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
92 18043, -5733, 2398, -583, 501, -18, 41, -4,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
93 0, 14, 56, 247, 354, 1977, 18, 12963,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
94 18043, -5733, 2398, -583, 501, -18, 41, -4,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
95 0, 15, 56, 266, 320, 2052, -249, 13383,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
96 17855, -5298, 2438, -502, 491, -9, 39, -3,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
97 0, 15, 56, 266, 320, 2052, -249, 13383,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
98 17855, -5298, 2438, -502, 491, -9, 39, -3,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
99 0, 17, 54, 284, 283, 2122, -530, 13794,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
100 17648, -4870, 2466, -423, 480, -1, 37, -3,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
101 0, 17, 54, 284, 283, 2122, -530, 13794,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
102 17648, -4870, 2466, -423, 480, -1, 37, -3,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
103 0, 18, 52, 302, 243, 2188, -825, 14194,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
104 17420, -4450, 2484, -347, 468, 7, 35, -3,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
105 0, 18, 52, 302, 243, 2188, -825, 14194,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
106 17420, -4450, 2484, -347, 468, 7, 35, -3,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
107 0, 19, 50, 320, 199, 2249, -1133, 14583,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
108 17173, -4039, 2492, -274, 455, 14, 33, -2,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
109 0, 19, 50, 320, 199, 2249, -1133, 14583,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
110 17173, -4039, 2492, -274, 455, 14, 33, -2,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
111 -1, 21, 48, 339, 152, 2304, -1454, 14959,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
112 16908, -3637, 2490, -204, 440, 20, 32, -2,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
113 -1, 21, 48, 339, 152, 2304, -1454, 14959,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
114 16908, -3637, 2490, -204, 440, 20, 32, -2,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
115 -1, 22, 45, 357, 101, 2354, -1788, 15322,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
116 16624, -3245, 2479, -137, 425, 26, 30, -2,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
117 -1, 22, 45, 357, 101, 2354, -1788, 15322,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
118 16624, -3245, 2479, -137, 425, 26, 30, -2,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
119 -1, 24, 41, 374, 47, 2396, -2135, 15671,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
120 16323, -2864, 2460, -72, 409, 31, 28, -2,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
121 -1, 24, 41, 374, 47, 2396, -2135, 15671,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
122 16323, -2864, 2460, -72, 409, 31, 28, -2,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
123 -1, 26, 37, 391, -11, 2431, -2493, 16004,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
124 16005, -2494, 2432, -12, 392, 36, 26, -2,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
125 -1, 26, 37, 391, -11, 2431, -2493, 16004,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
126 16005, -2494, 2432, -12, 392, 36, 26, -2,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
127 -2, -28, 31, -409, -72, -2460, -2864, -16323,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
128 15671, 2135, 2396, -47, 374, -41, 24, 1,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
129 -2, -28, 31, -409, -72, -2460, -2864, -16323,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
130 15671, 2135, 2396, -47, 374, -41, 24, 1,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
131 -2, -30, 26, -425, -137, -2479, -3245, -16624,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
132 15322, 1788, 2354, -101, 357, -45, 22, 1,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
133 -2, -30, 26, -425, -137, -2479, -3245, -16624,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
134 15322, 1788, 2354, -101, 357, -45, 22, 1,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
135 -2, -32, 20, -440, -204, -2490, -3637, -16908,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
136 14959, 1454, 2304, -152, 339, -48, 21, 1,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
137 -2, -32, 20, -440, -204, -2490, -3637, -16908,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
138 14959, 1454, 2304, -152, 339, -48, 21, 1,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
139 -2, -33, 14, -455, -274, -2492, -4039, -17173,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
140 14583, 1133, 2249, -199, 320, -50, 19, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
141 -2, -33, 14, -455, -274, -2492, -4039, -17173,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
142 14583, 1133, 2249, -199, 320, -50, 19, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
143 -3, -35, 7, -468, -347, -2484, -4450, -17420,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
144 14194, 825, 2188, -243, 302, -52, 18, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
145 -3, -35, 7, -468, -347, -2484, -4450, -17420,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
146 14194, 825, 2188, -243, 302, -52, 18, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
147 -3, -37, -1, -480, -423, -2466, -4870, -17648,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
148 13794, 530, 2122, -283, 284, -54, 17, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
149 -3, -37, -1, -480, -423, -2466, -4870, -17648,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
150 13794, 530, 2122, -283, 284, -54, 17, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
151 -3, -39, -9, -491, -502, -2438, -5298, -17855,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
152 13383, 249, 2052, -320, 266, -56, 15, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
153 -3, -39, -9, -491, -502, -2438, -5298, -17855,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
154 13383, 249, 2052, -320, 266, -56, 15, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
155 -4, -41, -18, -501, -583, -2398, -5733, -18043,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
156 12963, -18, 1977, -354, 247, -56, 14, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
157 -4, -41, -18, -501, -583, -2398, -5733, -18043,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
158 12963, -18, 1977, -354, 247, -56, 14, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
159 -4, -43, -28, -508, -666, -2348, -6174, -18209,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
160 12534, -271, 1899, -384, 229, -57, 13, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
161 -4, -43, -28, -508, -666, -2348, -6174, -18209,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
162 12534, -271, 1899, -384, 229, -57, 13, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
163 -4, -44, -39, -515, -751, -2285, -6621, -18354,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
164 12097, -510, 1817, -411, 212, -57, 12, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
165 -4, -44, -39, -515, -751, -2285, -6621, -18354,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
166 12097, -510, 1817, -411, 212, -57, 12, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
167 -5, -46, -50, -519, -838, -2210, -7073, -18477,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
168 11654, -734, 1733, -435, 194, -57, 11, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
169 -5, -46, -50, -519, -838, -2210, -7073, -18477,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
170 11654, -734, 1733, -435, 194, -57, 11, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
171 -5, -48, -61, -522, -927, -2123, -7528, -18579,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
172 11205, -944, 1647, -456, 177, -57, 10, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
173 -5, -48, -61, -522, -927, -2123, -7528, -18579,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
174 11205, -944, 1647, -456, 177, -57, 10, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
175 -6, -49, -74, -522, -1016, -2023, -7987, -18658,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
176 10751, -1141, 1559, -474, 161, -57, 9, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
177 -6, -49, -74, -522, -1016, -2023, -7987, -18658,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
178 10751, -1141, 1559, -474, 161, -57, 9, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
179 -6, -51, -87, -520, -1107, -1910, -8448, -18714,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
180 10294, -1322, 1469, -488, 145, -56, 8, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
181 -6, -51, -87, -520, -1107, -1910, -8448, -18714,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
182 10294, -1322, 1469, -488, 145, -56, 8, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
183 -7, -52, -101, -516, -1197, -1784, -8910, -18748,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
184 9834, -1490, 1379, -500, 129, -55, 7, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
185 -7, -52, -101, -516, -1197, -1784, -8910, -18748,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
186 9834, -1490, 1379, -500, 129, -55, 7, 0,
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
187 };
84eaacdc380d Record what was produced by make_decode_table_MMX() and used that data to
zuxy
parents: 23360
diff changeset
188
23342
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
189 int synth_1to1_MMX(real *bandPtr, int channel, short *samples)
4142
nick
parents:
diff changeset
190 {
23342
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
191 static short buffs[2][2][0x110] __attribute__((aligned(8)));
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
192 static int bo = 1;
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
193 short *b0, (*buf)[0x110], *a, *b;
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
194 short* window;
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
195 int bo1, i = 8;
11244
b91bd88dafea 100l to Nick
alex
parents: 11240
diff changeset
196
23342
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
197 if (channel == 0) {
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
198 bo = (bo - 1) & 0xf;
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
199 buf = buffs[1];
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
200 } else {
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
201 samples++;
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
202 buf = buffs[0];
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
203 }
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
204
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
205 if (bo & 1) {
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
206 b0 = buf[1];
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
207 bo1 = bo + 1;
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
208 a = buf[0] + bo;
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
209 b = buf[1] + ((bo + 1) & 0xf);
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
210 } else {
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
211 b0 = buf[0];
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
212 bo1 = bo;
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
213 b = buf[0] + bo;
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
214 a = buf[1] + ((bo + 1) & 0xf);
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
215 }
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
216
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
217 dct64_MMX_func(a, b, bandPtr);
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
218 window = mp3lib_decwins + 16 - bo1;
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
219 //printf("DEBUG: channel %d, bo %d, off %d\n", channel, bo, 16 - bo1);
4142
nick
parents:
diff changeset
220 __asm __volatile(
21046
ba5087cb0bd4 Use ASMALIGN macro for better compatibility and remove SYS_DARWIN
reimar
parents: 21040
diff changeset
221 ASMALIGN(4)
4608
b9c19fe73850 Fix according to strange bugreport
nick
parents: 4322
diff changeset
222 ".L03:\n\t"
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
223 "movq (%1),%%mm0\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
224 "movq 64(%1),%%mm4\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
225 "pmaddwd (%2),%%mm0\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
226 "pmaddwd 32(%2),%%mm4\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
227 "movq 8(%1),%%mm1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
228 "movq 72(%1),%%mm5\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
229 "pmaddwd 8(%2),%%mm1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
230 "pmaddwd 40(%2),%%mm5\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
231 "movq 16(%1),%%mm2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
232 "movq 80(%1),%%mm6\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
233 "pmaddwd 16(%2),%%mm2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
234 "pmaddwd 48(%2),%%mm6\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
235 "movq 24(%1),%%mm3\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
236 "movq 88(%1),%%mm7\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
237 "pmaddwd 24(%2),%%mm3\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
238 "pmaddwd 56(%2),%%mm7\n\t"
4142
nick
parents:
diff changeset
239 "paddd %%mm1,%%mm0\n\t"
nick
parents:
diff changeset
240 "paddd %%mm5,%%mm4\n\t"
nick
parents:
diff changeset
241 "paddd %%mm2,%%mm0\n\t"
nick
parents:
diff changeset
242 "paddd %%mm6,%%mm4\n\t"
nick
parents:
diff changeset
243 "paddd %%mm3,%%mm0\n\t"
nick
parents:
diff changeset
244 "paddd %%mm7,%%mm4\n\t"
nick
parents:
diff changeset
245 "movq %%mm0,%%mm1\n\t"
nick
parents:
diff changeset
246 "movq %%mm4,%%mm5\n\t"
nick
parents:
diff changeset
247 "psrlq $32,%%mm1\n\t"
nick
parents:
diff changeset
248 "psrlq $32,%%mm5\n\t"
nick
parents:
diff changeset
249 "paddd %%mm1,%%mm0\n\t"
nick
parents:
diff changeset
250 "paddd %%mm5,%%mm4\n\t"
nick
parents:
diff changeset
251 "psrad $13,%%mm0\n\t"
nick
parents:
diff changeset
252 "psrad $13,%%mm4\n\t"
nick
parents:
diff changeset
253 "packssdw %%mm0,%%mm0\n\t"
nick
parents:
diff changeset
254 "packssdw %%mm4,%%mm4\n\t"
nick
parents:
diff changeset
255
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
256 "movq (%3), %%mm1\n\t"
4142
nick
parents:
diff changeset
257 "punpckldq %%mm4, %%mm0\n\t"
4246
3f677202418b mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents: 4142
diff changeset
258 "pand "MANGLE(one_null)", %%mm1\n\t"
3f677202418b mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents: 4142
diff changeset
259 "pand "MANGLE(null_one)", %%mm0\n\t"
4142
nick
parents:
diff changeset
260 "por %%mm0, %%mm1\n\t"
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
261 "movq %%mm1,(%3)\n\t"
4142
nick
parents:
diff changeset
262
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
263 "add $64,%2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
264 "add $128,%1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
265 "add $8,%3\n\t"
4142
nick
parents:
diff changeset
266
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
267 "decl %0\n\t"
4608
b9c19fe73850 Fix according to strange bugreport
nick
parents: 4322
diff changeset
268 "jnz .L03\n\t"
4142
nick
parents:
diff changeset
269
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
270 "movq (%1),%%mm0\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
271 "pmaddwd (%2),%%mm0\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
272 "movq 8(%1),%%mm1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
273 "pmaddwd 8(%2),%%mm1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
274 "movq 16(%1),%%mm2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
275 "pmaddwd 16(%2),%%mm2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
276 "movq 24(%1),%%mm3\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
277 "pmaddwd 24(%2),%%mm3\n\t"
4142
nick
parents:
diff changeset
278 "paddd %%mm1,%%mm0\n\t"
nick
parents:
diff changeset
279 "paddd %%mm2,%%mm0\n\t"
nick
parents:
diff changeset
280 "paddd %%mm3,%%mm0\n\t"
nick
parents:
diff changeset
281 "movq %%mm0,%%mm1\n\t"
nick
parents:
diff changeset
282 "psrlq $32,%%mm1\n\t"
nick
parents:
diff changeset
283 "paddd %%mm1,%%mm0\n\t"
nick
parents:
diff changeset
284 "psrad $13,%%mm0\n\t"
nick
parents:
diff changeset
285 "packssdw %%mm0,%%mm0\n\t"
nick
parents:
diff changeset
286 "movd %%mm0,%%eax\n\t"
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
287 "movw %%ax, (%3)\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
288 "sub $32,%2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
289 "add $64,%1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
290 "add $4,%3\n\t"
23358
ccb70d86d797 Replace hardcoded 32-bit leal with equivalent add/sub so pointer arithmetic will be 64-bit under AMD64
zuxy
parents: 23342
diff changeset
291
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
292 "movl $7,%0\n\t"
21046
ba5087cb0bd4 Use ASMALIGN macro for better compatibility and remove SYS_DARWIN
reimar
parents: 21040
diff changeset
293 ASMALIGN(4)
4608
b9c19fe73850 Fix according to strange bugreport
nick
parents: 4322
diff changeset
294 ".L04:\n\t"
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
295 "movq (%1),%%mm0\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
296 "movq 64(%1),%%mm4\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
297 "pmaddwd (%2),%%mm0\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
298 "pmaddwd -32(%2),%%mm4\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
299 "movq 8(%1),%%mm1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
300 "movq 72(%1),%%mm5\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
301 "pmaddwd 8(%2),%%mm1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
302 "pmaddwd -24(%2),%%mm5\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
303 "movq 16(%1),%%mm2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
304 "movq 80(%1),%%mm6\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
305 "pmaddwd 16(%2),%%mm2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
306 "pmaddwd -16(%2),%%mm6\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
307 "movq 24(%1),%%mm3\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
308 "movq 88(%1),%%mm7\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
309 "pmaddwd 24(%2),%%mm3\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
310 "pmaddwd -8(%2),%%mm7\n\t"
4142
nick
parents:
diff changeset
311 "paddd %%mm1,%%mm0\n\t"
nick
parents:
diff changeset
312 "paddd %%mm5,%%mm4\n\t"
nick
parents:
diff changeset
313 "paddd %%mm2,%%mm0\n\t"
nick
parents:
diff changeset
314 "paddd %%mm6,%%mm4\n\t"
nick
parents:
diff changeset
315 "paddd %%mm3,%%mm0\n\t"
nick
parents:
diff changeset
316 "paddd %%mm7,%%mm4\n\t"
nick
parents:
diff changeset
317 "movq %%mm0,%%mm1\n\t"
nick
parents:
diff changeset
318 "movq %%mm4,%%mm5\n\t"
nick
parents:
diff changeset
319 "psrlq $32,%%mm1\n\t"
nick
parents:
diff changeset
320 "psrlq $32,%%mm5\n\t"
nick
parents:
diff changeset
321 "paddd %%mm0,%%mm1\n\t"
nick
parents:
diff changeset
322 "paddd %%mm4,%%mm5\n\t"
nick
parents:
diff changeset
323 "psrad $13,%%mm1\n\t"
nick
parents:
diff changeset
324 "psrad $13,%%mm5\n\t"
nick
parents:
diff changeset
325 "packssdw %%mm1,%%mm1\n\t"
nick
parents:
diff changeset
326 "packssdw %%mm5,%%mm5\n\t"
nick
parents:
diff changeset
327 "psubd %%mm0,%%mm0\n\t"
nick
parents:
diff changeset
328 "psubd %%mm4,%%mm4\n\t"
nick
parents:
diff changeset
329 "psubsw %%mm1,%%mm0\n\t"
nick
parents:
diff changeset
330 "psubsw %%mm5,%%mm4\n\t"
nick
parents:
diff changeset
331
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
332 "movq (%3), %%mm1\n\t"
4142
nick
parents:
diff changeset
333 "punpckldq %%mm4, %%mm0\n\t"
4246
3f677202418b mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents: 4142
diff changeset
334 "pand "MANGLE(one_null)", %%mm1\n\t"
3f677202418b mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents: 4142
diff changeset
335 "pand "MANGLE(null_one)", %%mm0\n\t"
4142
nick
parents:
diff changeset
336 "por %%mm0, %%mm1\n\t"
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
337 "movq %%mm1,(%3)\n\t"
4142
nick
parents:
diff changeset
338
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
339 "sub $64,%2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
340 "add $128,%1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
341 "add $8,%3\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
342 "decl %0\n\t"
4608
b9c19fe73850 Fix according to strange bugreport
nick
parents: 4322
diff changeset
343 "jnz .L04\n\t"
4142
nick
parents:
diff changeset
344
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
345 "movq (%1),%%mm0\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
346 "pmaddwd (%2),%%mm0\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
347 "movq 8(%1),%%mm1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
348 "pmaddwd 8(%2),%%mm1\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
349 "movq 16(%1),%%mm2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
350 "pmaddwd 16(%2),%%mm2\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
351 "movq 24(%1),%%mm3\n\t"
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
352 "pmaddwd 24(%2),%%mm3\n\t"
4142
nick
parents:
diff changeset
353 "paddd %%mm1,%%mm0\n\t"
nick
parents:
diff changeset
354 "paddd %%mm2,%%mm0\n\t"
nick
parents:
diff changeset
355 "paddd %%mm3,%%mm0\n\t"
nick
parents:
diff changeset
356 "movq %%mm0,%%mm1\n\t"
nick
parents:
diff changeset
357 "psrlq $32,%%mm1\n\t"
nick
parents:
diff changeset
358 "paddd %%mm0,%%mm1\n\t"
nick
parents:
diff changeset
359 "psrad $13,%%mm1\n\t"
nick
parents:
diff changeset
360 "packssdw %%mm1,%%mm1\n\t"
nick
parents:
diff changeset
361 "psubd %%mm0,%%mm0\n\t"
nick
parents:
diff changeset
362 "psubsw %%mm1,%%mm0\n\t"
nick
parents:
diff changeset
363 "movd %%mm0,%%eax\n\t"
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
364 "movw %%ax,(%3)\n\t"
4142
nick
parents:
diff changeset
365 "emms\n\t"
23360
57a99b0631b2 Remove hardcoded registers
zuxy
parents: 23358
diff changeset
366 :"+r"(i), "+r"(window), "+r"(b0), "+r"(samples)
23342
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
367 :
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
368 :"memory", "%eax");
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
369 return 0;
4142
nick
parents:
diff changeset
370 }
23342
e070d7f61e9a Rewrite generic code in decode_MMX.c in C for easier AMD64 port. Slightly faster than original assembly.
zuxy
parents: 22375
diff changeset
371