mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-08 01:36:47 +08:00
Support string instructions for NaCl
BUG=253 TEST=validator R=fbarchard@google.com Review URL: https://webrtc-codereview.appspot.com/1990004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@750 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
e64c236250
commit
22402bfa6f
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 749
|
||||
Version: 750
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -55,10 +55,13 @@ extern "C" {
|
||||
// Conversions:
|
||||
#define HAS_ARGBTOBAYERROW_SSSE3
|
||||
#define HAS_ARGBSHUFFLEROW_SSSE3
|
||||
#define HAS_COPYROW_X86
|
||||
#define HAS_COPYROW_ERMS
|
||||
#define HAS_FIXEDDIV_X86
|
||||
#define HAS_ARGBTOYROW_SSSE3
|
||||
#define HAS_ARGBTOYJROW_SSSE3
|
||||
#define HAS_I400TOARGBROW_SSE2
|
||||
#define HAS_SETROW_X86
|
||||
#endif
|
||||
|
||||
// The following are available on all x86 platforms except NaCL x64:
|
||||
@ -83,8 +86,6 @@ extern "C" {
|
||||
#define HAS_BGRATOUVROW_SSSE3
|
||||
#define HAS_BGRATOYROW_SSSE3
|
||||
#define HAS_COPYROW_SSE2
|
||||
#define HAS_COPYROW_X86
|
||||
#define HAS_COPYROW_ERMS
|
||||
#define HAS_HALFROW_SSE2
|
||||
#define HAS_I411TOARGBROW_SSSE3
|
||||
#define HAS_I422TOABGRROW_SSSE3
|
||||
@ -113,7 +114,6 @@ extern "C" {
|
||||
#define HAS_RGB565TOARGBROW_SSE2
|
||||
#define HAS_RGBATOUVROW_SSSE3
|
||||
#define HAS_RGBATOYROW_SSSE3
|
||||
#define HAS_SETROW_X86
|
||||
#define HAS_SPLITUVROW_SSE2
|
||||
#define HAS_UYVYTOARGBROW_SSSE3
|
||||
#define HAS_UYVYTOUV422ROW_SSE2
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 749
|
||||
#define LIBYUV_VERSION 750
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -26,12 +26,16 @@ extern "C" {
|
||||
#define MEMLEA(offset, base) #offset "(%q" #base ")"
|
||||
#define MEMLEA4(offset, base, index, scale) \
|
||||
#offset "(%q" #base ",%q" #index "," #scale ")"
|
||||
#define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15"
|
||||
#define MEMSTORESTRING(d) "%%nacl:(%q" #d "), %%r15"
|
||||
#else
|
||||
#define MEMACCESS(base) "(%" #base ")"
|
||||
#define MEMACCESS2(offset, base) #offset "(%" #base ")"
|
||||
#define MEMLEA(offset, base) #offset "(%" #base ")"
|
||||
#define MEMLEA4(offset, base, index, scale) \
|
||||
#offset "(%" #base ",%" #index "," #scale ")"
|
||||
#define MEMMOVESTRING(s, d)
|
||||
#define MEMSTORESTRING(d)
|
||||
#endif
|
||||
|
||||
#if defined(HAS_ARGBTOYROW_SSSE3) || defined(HAS_ARGBGRAYROW_SSSE3)
|
||||
@ -3040,7 +3044,7 @@ void CopyRow_X86(const uint8* src, uint8* dst, int width) {
|
||||
size_t width_tmp = static_cast<size_t>(width);
|
||||
asm volatile (
|
||||
"shr $0x2,%2 \n"
|
||||
"rep movsl \n"
|
||||
"rep movsl "MEMMOVESTRING(0,1)" \n"
|
||||
: "+S"(src), // %0
|
||||
"+D"(dst), // %1
|
||||
"+c"(width_tmp) // %2
|
||||
@ -3055,7 +3059,7 @@ void CopyRow_X86(const uint8* src, uint8* dst, int width) {
|
||||
void CopyRow_ERMS(const uint8* src, uint8* dst, int width) {
|
||||
size_t width_tmp = static_cast<size_t>(width);
|
||||
asm volatile (
|
||||
"rep movsb \n"
|
||||
"rep movsb "MEMMOVESTRING(0,1)" \n"
|
||||
: "+S"(src), // %0
|
||||
"+D"(dst), // %1
|
||||
"+c"(width_tmp) // %2
|
||||
@ -3070,7 +3074,7 @@ void SetRow_X86(uint8* dst, uint32 v32, int width) {
|
||||
size_t width_tmp = static_cast<size_t>(width);
|
||||
asm volatile (
|
||||
"shr $0x2,%1 \n"
|
||||
"rep stosl \n"
|
||||
"rep stosl "MEMSTORESTRING(0)" \n"
|
||||
: "+D"(dst), // %0
|
||||
"+c"(width_tmp) // %1
|
||||
: "a"(v32) // %2
|
||||
@ -3083,7 +3087,7 @@ void ARGBSetRows_X86(uint8* dst, uint32 v32, int width,
|
||||
size_t width_tmp = static_cast<size_t>(width);
|
||||
uint32* d = reinterpret_cast<uint32*>(dst);
|
||||
asm volatile (
|
||||
"rep stosl \n"
|
||||
"rep stosl "MEMSTORESTRING(0)" \n"
|
||||
: "+D"(d), // %0
|
||||
"+c"(width_tmp) // %1
|
||||
: "a"(v32) // %2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user