dsp: detect mips64 & disable mips32 code

Change-Id: Icf68dafd5cf0614ca25b36a0252caa1784ac8059
This commit is contained in:
James Zern 2014-08-01 21:15:15 +02:00
parent d3485d9607
commit 0524d9e5e8
3 changed files with 4 additions and 3 deletions

View File

@ -118,7 +118,7 @@ static int armCPUInfo(CPUFeature feature) {
return 1; return 1;
} }
VP8CPUInfo VP8GetCPUInfo = armCPUInfo; VP8CPUInfo VP8GetCPUInfo = armCPUInfo;
#elif defined(__mips__) #elif defined(WEBP_USE_MIPS32)
static int mipsCPUInfo(CPUFeature feature) { static int mipsCPUInfo(CPUFeature feature) {
(void)feature; (void)feature;
return 1; return 1;

View File

@ -60,7 +60,7 @@ extern "C" {
#define WEBP_USE_NEON #define WEBP_USE_NEON
#endif #endif
#if defined(__mips__) #if defined(__mips__) && !defined(__mips64)
#define WEBP_USE_MIPS32 #define WEBP_USE_MIPS32
#endif #endif

View File

@ -24,6 +24,7 @@
#include <string.h> // memcpy #include <string.h> // memcpy
#endif #endif
#include "../dsp/dsp.h"
#include "./bit_reader.h" #include "./bit_reader.h"
#include "./endian_inl.h" #include "./endian_inl.h"
@ -63,7 +64,7 @@ static WEBP_INLINE void VP8LoadNewBytes(VP8BitReader* const br) {
#if defined(WEBP_FORCE_ALIGNED) #if defined(WEBP_FORCE_ALIGNED)
lbit_t in_bits; lbit_t in_bits;
memcpy(&in_bits, br->buf_, sizeof(in_bits)); memcpy(&in_bits, br->buf_, sizeof(in_bits));
#elif defined(__mips__) // MIPS #elif defined(WEBP_USE_MIPS32)
// This is needed because of un-aligned read. // This is needed because of un-aligned read.
lbit_t in_bits; lbit_t in_bits;
lbit_t* p_buf_ = (lbit_t*)br->buf_; lbit_t* p_buf_ = (lbit_t*)br->buf_;