summaryrefslogtreecommitdiffstats
path: root/0d538227be3d9ff16e4af886cc6ab015380deefd.patch
blob: 2484e1dcccd8b9a07a8f1d0bd78aa557d0fc0a51 (plain)
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
From 0d538227be3d9ff16e4af886cc6ab015380deefd Mon Sep 17 00:00:00 2001
From: guoxinhua <guoxinhua@10.10.12.142>
Date: Sat, 27 May 2017 14:57:41 +0800
Subject: [PATCH] add sse test

---
 swoole_serialize.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/swoole_serialize.c b/swoole_serialize.c
index ceeccc88..5fc48617 100644
--- a/swoole_serialize.c
+++ b/swoole_serialize.c
@@ -16,7 +16,9 @@
 
 #include "php_swoole.h"
 #include "swoole_serialize.h"
+#ifdef __SSE2__
 #include <emmintrin.h>
+#endif
 
 #if PHP_MAJOR_VERSION >= 7
 #define CPINLINE sw_inline
@@ -101,7 +103,7 @@ static CPINLINE void swoole_check_size(seriaString *str, size_t len)
         str->total = new_size;
     }
 }
-
+#ifdef __SSE2__
 void CPINLINE swoole_mini_memcpy(void *dst, const void *src, size_t len)
 {
     register unsigned char *dd = (unsigned char*) dst + len;
@@ -255,6 +257,7 @@ void CPINLINE swoole_memcpy_fast(void *destination, const void *source, size_t s
 
     // return memcpy_tiny(dst, src, size);
 }
+#endif
 
 static CPINLINE void swoole_string_cpy(seriaString *str, void *mem, size_t len)
 {