mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 514624 - UTF8 to Unicode conversion of SSE2 optimization for x86_64 platform. r=vlad
This commit is contained in:
parent
a38b70a82c
commit
4d45703ece
@ -38,22 +38,22 @@
|
||||
#include "nsUCSupport.h"
|
||||
#include "nsUTF8ToUnicode.h"
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__) && defined(__APPLE__)
|
||||
#define MAC_SSE2
|
||||
#if defined(__GNUC__) && defined(__SSE2__)
|
||||
// on x86_64 environment or using -msse2 such as MacOS X
|
||||
#define GCC_SSE2
|
||||
#endif
|
||||
#if defined(XP_WIN32) && defined(_M_IX86) && defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
#if (defined(_M_IX86) || defined(_M_AMD64)) && defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
#define WIN_SSE2
|
||||
#endif
|
||||
|
||||
#if defined(MAC_SSE2) || defined(WIN_SSE2)
|
||||
#if defined(GCC_SSE2) || defined(WIN_SSE2)
|
||||
#include "emmintrin.h"
|
||||
#endif
|
||||
|
||||
#if defined(MAC_SSE2)
|
||||
#if defined(GCC_SSE2) || defined(_M_AMD64)
|
||||
// x86_64 supports SSE2 instruction.
|
||||
#define __sse2_available 1
|
||||
#endif
|
||||
|
||||
#if defined(WIN_SSE2)
|
||||
#elif defined(WIN_SSE2)
|
||||
extern "C" int __sse2_available;
|
||||
#endif
|
||||
|
||||
@ -146,7 +146,7 @@ NS_IMETHODIMP nsUTF8ToUnicode::Reset()
|
||||
// number of bytes left in src and the number of unichars available in
|
||||
// dst.)
|
||||
|
||||
#if defined(MAC_SSE2) || defined(WIN_SSE2)
|
||||
#if defined(GCC_SSE2) || defined(WIN_SSE2)
|
||||
|
||||
static inline void
|
||||
Convert_ascii_run (const char *&src,
|
||||
|
Loading…
Reference in New Issue
Block a user