Chromium Code Reviews

Side by Side Diff: source/row_gcc.cc

Issue 1455463002: test for unaligned vs aligned for CopyRow_SSE2 (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « include/libyuv/version.h ('k') | source/row_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // VERSION 2 1 // VERSION 2
2 /* 2 /*
3 * Copyright 2011 The LibYuv Project Authors. All rights reserved. 3 * Copyright 2011 The LibYuv Project Authors. All rights reserved.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license 5 * Use of this source code is governed by a BSD-style license
6 * that can be found in the LICENSE file in the root of the source 6 * that can be found in the LICENSE file in the root of the source
7 * tree. An additional intellectual property rights grant can be found 7 * tree. An additional intellectual property rights grant can be found
8 * in the file PATENTS. All contributing project authors may 8 * in the file PATENTS. All contributing project authors may
9 * be found in the AUTHORS file in the root of the source tree. 9 * be found in the AUTHORS file in the root of the source tree.
10 */ 10 */
(...skipping 2708 matching lines...)
2719 : 2719 :
2720 : "memory", "cc", NACL_R14 2720 : "memory", "cc", NACL_R14
2721 "xmm0", "xmm1", "xmm2" 2721 "xmm0", "xmm1", "xmm2"
2722 ); 2722 );
2723 } 2723 }
2724 #endif // HAS_MERGEUVROW_SSE2 2724 #endif // HAS_MERGEUVROW_SSE2
2725 2725
2726 #ifdef HAS_COPYROW_SSE2 2726 #ifdef HAS_COPYROW_SSE2
2727 void CopyRow_SSE2(const uint8* src, uint8* dst, int count) { 2727 void CopyRow_SSE2(const uint8* src, uint8* dst, int count) {
2728 asm volatile ( 2728 asm volatile (
2729 "test $0xf,%0 \n"
2730 "jne 2f \n"
2731 "test $0xf,%1 \n"
2732 "jne 2f \n"
2729 LABELALIGN 2733 LABELALIGN
2730 "1: \n" 2734 "1: \n"
2735 "movdqa " MEMACCESS(0) ",%%xmm0 \n"
2736 "movdqa " MEMACCESS2(0x10,0) ",%%xmm1 \n"
2737 "lea " MEMLEA(0x20,0) ",%0 \n"
2738 "movdqa %%xmm0," MEMACCESS(1) " \n"
2739 "movdqa %%xmm1," MEMACCESS2(0x10,1) " \n"
2740 "lea " MEMLEA(0x20,1) ",%1 \n"
2741 "sub $0x20,%2 \n"
2742 "jg 1b \n"
2743 "jmp 9f \n"
2744 LABELALIGN
2745 "2: \n"
2731 "movdqu " MEMACCESS(0) ",%%xmm0 \n" 2746 "movdqu " MEMACCESS(0) ",%%xmm0 \n"
2732 "movdqu " MEMACCESS2(0x10,0) ",%%xmm1 \n" 2747 "movdqu " MEMACCESS2(0x10,0) ",%%xmm1 \n"
2733 "lea " MEMLEA(0x20,0) ",%0 \n" 2748 "lea " MEMLEA(0x20,0) ",%0 \n"
2734 "movdqu %%xmm0," MEMACCESS(1) " \n" 2749 "movdqu %%xmm0," MEMACCESS(1) " \n"
2735 "movdqu %%xmm1," MEMACCESS2(0x10,1) " \n" 2750 "movdqu %%xmm1," MEMACCESS2(0x10,1) " \n"
2736 "lea " MEMLEA(0x20,1) ",%1 \n" 2751 "lea " MEMLEA(0x20,1) ",%1 \n"
2737 "sub $0x20,%2 \n" 2752 "sub $0x20,%2 \n"
2738 "jg 1b \n" 2753 "jg 2b \n"
2754 "9: \n"
2739 : "+r"(src), // %0 2755 : "+r"(src), // %0
2740 "+r"(dst), // %1 2756 "+r"(dst), // %1
2741 "+r"(count) // %2 2757 "+r"(count) // %2
2742 : 2758 :
2743 : "memory", "cc" 2759 : "memory", "cc"
2744 , "xmm0", "xmm1" 2760 , "xmm0", "xmm1"
2745 ); 2761 );
2746 } 2762 }
2747 #endif // HAS_COPYROW_SSE2 2763 #endif // HAS_COPYROW_SSE2
2748 2764
(...skipping 2713 matching lines...)
5462 ); 5478 );
5463 } 5479 }
5464 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 5480 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3
5465 5481
5466 #endif // defined(__x86_64__) || defined(__i386__) 5482 #endif // defined(__x86_64__) || defined(__i386__)
5467 5483
5468 #ifdef __cplusplus 5484 #ifdef __cplusplus
5469 } // extern "C" 5485 } // extern "C"
5470 } // namespace libyuv 5486 } // namespace libyuv
5471 #endif 5487 #endif
OLDNEW
« no previous file with comments | « include/libyuv/version.h ('k') | source/row_win.cc » ('j') | no next file with comments »

Powered by Google App Engine