~ubuntu-branches/ubuntu/trusty/zoneminder/trusty

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
Description: Make sure we don't use any sse related instructions for all archs
Author: Ricardo Salveti de Araujo <rsalveti@rsalveti.net>
Forwarded: no

Index: zoneminder-1.26.5/src/zm_image.cpp
===================================================================
--- zoneminder-1.26.5.orig/src/zm_image.cpp	2013-12-16 13:42:36.000000000 -0200
+++ zoneminder-1.26.5/src/zm_image.cpp	2014-01-20 17:00:00.719048135 -0200
@@ -146,10 +146,13 @@
 {
 	/* Assign the blend pointer to function */
 	if(config.fast_image_blends) {
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 		if(config.cpu_extensions && sseversion >= 20) {
 			fptr_blend = &sse2_fastblend; /* SSE2 fast blend */
 			Debug(2,"Blend: Using SSE2 fast blend function");
-		} else {
+		} else
+#endif
+		{
 			fptr_blend = &std_fastblend;  /* standard fast blend */
 			Debug(2,"Blend: Using fast blend function");
 		}
@@ -177,6 +180,7 @@
 	
 	/* Assign the delta functions */
 	if(config.cpu_extensions) {
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 		if(sseversion >= 35) {
 			/* SSSE3 available */
 			fptr_delta8_rgba = &ssse3_delta8_rgba;
@@ -202,7 +206,9 @@
 			// fptr_delta8_abgr = &std_delta8_abgr;
 			fptr_delta8_gray8 = &sse2_delta8_gray8;
 			Debug(2,"Delta: Using SSE2 delta functions");
-		} else {
+		} else
+#endif
+		{
 			/* No suitable SSE version available */
 			fptr_delta8_rgba = &std_delta8_rgba;
 			fptr_delta8_bgra = &std_delta8_bgra;
@@ -221,6 +227,7 @@
 		Debug(2,"Delta: CPU extensions disabled, using standard delta functions");
 	}
 	
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 	/* Use SSSE3 deinterlace functions? */
 	if(config.cpu_extensions && sseversion >= 35) {
 		fptr_deinterlace_4field_rgba = &ssse3_deinterlace_4field_rgba;
@@ -229,7 +236,9 @@
 		fptr_deinterlace_4field_abgr = &ssse3_deinterlace_4field_abgr;
 		fptr_deinterlace_4field_gray8 = &ssse3_deinterlace_4field_gray8;
 		Debug(2,"Deinterlace: Using SSSE3 delta functions");
-	} else {
+	} else
+#endif
+	{
 		fptr_deinterlace_4field_rgba = &std_deinterlace_4field_rgba;
 		fptr_deinterlace_4field_bgra = &std_deinterlace_4field_bgra;
 		fptr_deinterlace_4field_argb = &std_deinterlace_4field_argb;
@@ -238,11 +247,14 @@
 		Debug(2,"Deinterlace: Using standard delta functions");
 	}
 	
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 	/* Use SSE2 aligned memory copy? */
 	if(config.cpu_extensions && sseversion >= 20) {
 		fptr_imgbufcpy = &sse2_aligned_memcpy;
 		Debug(2,"Image buffer copy: Using SSE2 aligned memcpy");
-	} else {
+	} else
+#endif
+	{
 		fptr_imgbufcpy = &memcpy;
 		Debug(2,"Image buffer copy: Using standard memcpy");
 	}
@@ -2987,9 +2999,8 @@
 
 /************************************************* BLEND FUNCTIONS *************************************************/
 
-
-__attribute__((noinline,__target__("sse2"))) void sse2_fastblend(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count, double blendpercent) {
 #if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
+__attribute__((noinline,__target__("sse2"))) void sse2_fastblend(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count, double blendpercent) {
 	static uint32_t divider = 0;
 	static uint32_t clearmask = 0;
 	static double current_blendpercent = 0.0;
@@ -3048,10 +3059,8 @@
 	: "r" (col1), "r" (col2), "r" (result), "r" (count), "m" (clearmask), "m" (divider)
 	: "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
 __attribute__((noinline)) void std_fastblend(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count, double blendpercent) {
 	static int divider = 0;
@@ -3329,9 +3338,9 @@
 	}
 }
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* Grayscale SSE2 */
 __attribute__((noinline,__target__("sse2"))) void sse2_delta8_gray8(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
 
 	__asm__ __volatile__ (
 	"sub $0x10, %0\n\t"
@@ -3352,14 +3361,12 @@
 	: "r" (col1), "r" (col2), "r" (result), "r" (count)
 	: "%xmm1", "%xmm2", "%xmm3", "%xmm4", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* RGB32: RGBA SSE2 */
 __attribute__((noinline,__target__("sse2"))) void sse2_delta8_rgba(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
   
 	__asm__ __volatile__ (
 	"mov $0x1F1F1F1F, %%eax\n\t"
@@ -3407,14 +3414,12 @@
 	: "r" (col1), "r" (col2), "r" (result), "r" (count)
 	: "%eax", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* RGB32: BGRA SSE2 */
 __attribute__((noinline,__target__("sse2"))) void sse2_delta8_bgra(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
   
 	__asm__ __volatile__ (
 	"mov $0x1F1F1F1F, %%eax\n\t"
@@ -3462,14 +3467,12 @@
 	: "r" (col1), "r" (col2), "r" (result), "r" (count)
 	: "%eax", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* RGB32: ARGB SSE2 */
 __attribute__((noinline,__target__("sse2"))) void sse2_delta8_argb(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
   
 	__asm__ __volatile__ (
 	"mov $0x1F1F1F1F, %%eax\n\t"
@@ -3518,14 +3521,12 @@
 	: "r" (col1), "r" (col2), "r" (result), "r" (count)
 	: "%eax", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* RGB32: ABGR SSE2 */
 __attribute__((noinline,__target__("sse2"))) void sse2_delta8_abgr(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
   
 	__asm__ __volatile__ (
 	"mov $0x1F1F1F1F, %%eax\n\t"
@@ -3574,14 +3575,12 @@
 	: "r" (col1), "r" (col2), "r" (result), "r" (count)
 	: "%eax", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* RGB32: RGBA SSSE3 */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_delta8_rgba(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
 	
 	__asm__ __volatile__ (
 	"mov $0x1F1F1F1F, %%eax\n\t"
@@ -3626,14 +3625,12 @@
 	: "r" (col1), "r" (col2), "r" (result), "r" (count), "m" (*movemask)
 	: "%eax", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* RGB32: BGRA SSSE3 */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_delta8_bgra(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
 	
 	__asm__ __volatile__ (
 	"mov $0x1F1F1F1F, %%eax\n\t"
@@ -3678,14 +3675,12 @@
 	: "r" (col1), "r" (col2), "r" (result), "r" (count), "m" (*movemask)
 	: "%eax", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* RGB32: ARGB SSSE3 */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_delta8_argb(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
 	
 	__asm__ __volatile__ (
 	"mov $0x1F1F1F1F, %%eax\n\t"
@@ -3731,14 +3726,12 @@
 	: "r" (col1), "r" (col2), "r" (result), "r" (count), "m" (*movemask)
 	: "%eax", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* RGB32: ABGR SSSE3 */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_delta8_abgr(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
 	
 	__asm__ __volatile__ (
 	"mov $0x1F1F1F1F, %%eax\n\t"
@@ -3784,10 +3777,8 @@
 	: "r" (col1), "r" (col2), "r" (result), "r" (count), "m" (*movemask)
 	: "%eax", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
 
 /************************************************* CONVERT FUNCTIONS *************************************************/
@@ -3988,9 +3979,9 @@
 	}
 }
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* RGBA to grayscale SSSE3 */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_convert_rgba_gray8(const uint8_t* col1, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
 
 	__asm__ __volatile__ (
 	"mov $0x1F1F1F1F, %%eax\n\t"
@@ -4029,14 +4020,12 @@
 	: "r" (col1), "r" (result), "r" (count), "m" (*movemask)
 	: "%eax", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* Converts a YUYV image into grayscale by extracting the Y channel */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_convert_yuyv_gray8(const uint8_t* col1, uint8_t* result, unsigned long count) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))  
 	unsigned long i = 0;
   
 	__attribute__((aligned(16))) static const uint8_t movemask1[16] = {0,2,4,6,8,10,12,14,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
@@ -4074,10 +4063,8 @@
 #endif
 	: "%xmm3", "%xmm4", "cc", "memory"
 	);
-#else
-	Panic("SSE function called on a non x86\\x86-64 platform");
-#endif
 }
+#endif
 
 /* YUYV to RGB24 - relocated from zm_local_camera.cpp */
 __attribute__((noinline)) void zm_convert_yuyv_rgb(const uint8_t* col1, uint8_t* result, unsigned long count) {
@@ -4651,6 +4638,7 @@
 	}
 }
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* Grayscale SSSE3 */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_deinterlace_4field_gray8(uint8_t* col1, uint8_t* col2, unsigned int threshold, unsigned int width, unsigned int height) {
 	
@@ -4779,7 +4767,9 @@
 	: "%eax", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "cc", "memory"
 	);
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* RGBA SSSE3 */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_deinterlace_4field_rgba(uint8_t* col1, uint8_t* col2, unsigned int threshold, unsigned int width, unsigned int height) {
 	__attribute__((aligned(16))) static const uint8_t movemask2[16] = {1,1,1,1,1,0,0,2,9,9,9,9,9,8,8,10};
@@ -4955,7 +4945,9 @@
 #endif
 	);
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* BGRA SSSE3 */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_deinterlace_4field_bgra(uint8_t* col1, uint8_t* col2, unsigned int threshold, unsigned int width, unsigned int height) {
 	__attribute__((aligned(16))) static const uint8_t movemask2[16] = {1,1,1,1,1,2,2,0,9,9,9,9,9,10,10,8};
@@ -5131,7 +5123,9 @@
 #endif
 	);
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* ARGB SSSE3 */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_deinterlace_4field_argb(uint8_t* col1, uint8_t* col2, unsigned int threshold, unsigned int width, unsigned int height) {
 	__attribute__((aligned(16))) static const uint8_t movemask2[16] = {2,2,2,2,2,1,1,3,10,10,10,10,10,9,9,11};
@@ -5307,7 +5301,9 @@
 #endif
 	);
 }
+#endif
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* ABGR SSSE3 */
 __attribute__((noinline,__target__("ssse3"))) void ssse3_deinterlace_4field_abgr(uint8_t* col1, uint8_t* col2, unsigned int threshold, unsigned int width, unsigned int height) {
 	__attribute__((aligned(16))) static const uint8_t movemask2[16] = {2,2,2,2,2,3,3,1,10,10,10,10,10,11,11,9};
@@ -5483,4 +5479,5 @@
 #endif
 	);
 }
+#endif
 
Index: zoneminder-1.26.5/src/zm_local_camera.cpp
===================================================================
--- zoneminder-1.26.5.orig/src/zm_local_camera.cpp	2013-12-16 13:42:36.000000000 -0200
+++ zoneminder-1.26.5/src/zm_local_camera.cpp	2014-01-20 16:54:58.000000000 -0200
@@ -457,10 +457,13 @@
 					subpixelorder = ZM_SUBPIX_ORDER_NONE;
 				} else if(palette == V4L2_PIX_FMT_YUYV && colours == ZM_COLOUR_GRAY8) {
 					/* Fast YUYV->Grayscale conversion by extracting the Y channel */
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 					if(config.cpu_extensions && sseversion >= 35) {
 						conversion_fptr = &ssse3_convert_yuyv_gray8;
 						Debug(2,"Using SSSE3 YUYV->grayscale fast conversion");
-					} else {
+					} else
+#endif
+					{
 						conversion_fptr = &std_convert_yuyv_gray8;
 						Debug(2,"Using standard YUYV->grayscale fast conversion");
 					}
@@ -569,10 +572,13 @@
 					}
 				} else if((palette == VIDEO_PALETTE_YUYV || palette == VIDEO_PALETTE_YUV422) && colours == ZM_COLOUR_GRAY8) {
 					/* Fast YUYV->Grayscale conversion by extracting the Y channel */
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 					if(config.cpu_extensions && sseversion >= 35) {
 						conversion_fptr = &ssse3_convert_yuyv_gray8;
 						Debug(2,"Using SSSE3 YUYV->grayscale fast conversion");
-					} else {
+					} else
+#endif
+					{
 						conversion_fptr = &std_convert_yuyv_gray8;
 						Debug(2,"Using standard YUYV->grayscale fast conversion");
 					}
Index: zoneminder-1.26.5/src/zm_utils.cpp
===================================================================
--- zoneminder-1.26.5.orig/src/zm_utils.cpp	2014-01-20 16:59:05.619046240 -0200
+++ zoneminder-1.26.5/src/zm_utils.cpp	2014-01-20 16:59:54.603047924 -0200
@@ -190,10 +190,10 @@
 #endif
 }
 
+#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 /* SSE2 aligned memory copy. Useful for big copying of aligned memory like image buffers in ZM */
 /* For platforms without SSE2 we will use standard x86 asm memcpy or glibc's memcpy() */
 __attribute__((noinline,__target__("sse2"))) void* sse2_aligned_memcpy(void* dest, const void* src, size_t bytes) {
-#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
 	if(bytes > 128) {
 		unsigned int remainder = bytes % 128;
 		const uint8_t* lastsrc = (uint8_t*)src + (bytes - remainder);
@@ -234,12 +234,9 @@
 		/* Standard memcpy */
 		__asm__ __volatile__("cld; rep movsb" :: "S"(src), "D"(dest), "c"(bytes) : "cc", "memory");
 	}
-#else
-	/* Non x86\x86-64 platform, use memcpy */
-	memcpy(dest,src,bytes);
-#endif
 	return dest;
 }
+#endif
 
 void timespec_diff(struct timespec *start, struct timespec *end, struct timespec *diff) {
 	if (((end->tv_nsec)-(start->tv_nsec))<0) {