Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Unified Diff: net/websockets/websocket_frame.cc

Issue 2941453002: WebSocket frame masking: use SIMD for ARM (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_frame.cc
diff --git a/net/websockets/websocket_frame.cc b/net/websockets/websocket_frame.cc
index 792e7fdee4bc161882292d4cff97877710747d01..bfca09fd37b867f0abc8e7591fbce005a77d6af3 100644
--- a/net/websockets/websocket_frame.cc
+++ b/net/websockets/websocket_frame.cc
@@ -21,7 +21,9 @@ namespace {
// architectures where we know it works, otherwise gcc will attempt to emulate
// the vector ops, which is unlikely to be efficient.
// TODO(ricea): Add ARCH_CPU_ARM_FAMILY when arm_neon=1 becomes the default.
-#if defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL)
+#if defined(COMPILER_GCC) && \
+ (defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY)) && \
+ !defined(OS_NACL)
using PackedMaskType = uint32_t __attribute__((vector_size(16)));
@@ -29,7 +31,8 @@ using PackedMaskType = uint32_t __attribute__((vector_size(16)));
using PackedMaskType = size_t;
-#endif // defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY) &&
+#endif // defined(COMPILER_GCC) &&
+ // (defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY)) &&
// !defined(OS_NACL)
const uint8_t kFinalBit = 0x80;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698