diff options
Diffstat (limited to 'libpixelflinger')
-rw-r--r-- | libpixelflinger/Android.mk | 2 | ||||
-rw-r--r-- | libpixelflinger/codeflinger/CodeCache.cpp | 4 | ||||
-rw-r--r-- | libpixelflinger/scanline.cpp | 12 | ||||
-rw-r--r-- | libpixelflinger/tests/codegen/codegen.cpp | 8 |
4 files changed, 15 insertions, 11 deletions
diff --git a/libpixelflinger/Android.mk b/libpixelflinger/Android.mk index 484cf50..6a3a58f 100644 --- a/libpixelflinger/Android.mk +++ b/libpixelflinger/Android.mk @@ -44,11 +44,13 @@ PIXELFLINGER_SRC_FILES_arm64 := \ arch-arm64/col32cb16blend.S \ arch-arm64/t32cb16blend.S \ +ifndef ARCH_MIPS_REV6 PIXELFLINGER_SRC_FILES_mips := \ codeflinger/MIPSAssembler.cpp \ codeflinger/mips_disassem.c \ arch-mips/t32cb16blend.S \ +endif # # Shared library # diff --git a/libpixelflinger/codeflinger/CodeCache.cpp b/libpixelflinger/codeflinger/CodeCache.cpp index cfd2b37..d770302 100644 --- a/libpixelflinger/codeflinger/CodeCache.cpp +++ b/libpixelflinger/codeflinger/CodeCache.cpp @@ -201,8 +201,8 @@ int CodeCache::cache( const AssemblyKeyBase& keyBase, mCacheInUse += assemblySize; mWhen++; // synchronize caches... - void* base = assembly->base(); - void* curr = (uint8_t*)base + assembly->size(); + char* base = reinterpret_cast<char*>(assembly->base()); + char* curr = reinterpret_cast<char*>(base + assembly->size()); __builtin___clear_cache(base, curr); } diff --git a/libpixelflinger/scanline.cpp b/libpixelflinger/scanline.cpp index 26b9a3e..3d14531 100644 --- a/libpixelflinger/scanline.cpp +++ b/libpixelflinger/scanline.cpp @@ -39,7 +39,7 @@ #include "codeflinger/ARMAssembler.h" #elif defined(__aarch64__) #include "codeflinger/Arm64Assembler.h" -#elif defined(__mips__) && !defined(__LP64__) +#elif defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6 #include "codeflinger/MIPSAssembler.h" #endif //#include "codeflinger/ARMAssemblerOptimizer.h" @@ -59,7 +59,7 @@ # define ANDROID_CODEGEN ANDROID_CODEGEN_GENERATED #endif -#if defined(__arm__) || (defined(__mips__) && !defined(__LP64__)) || defined(__aarch64__) +#if defined(__arm__) || (defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6) || defined(__aarch64__) # define ANDROID_ARM_CODEGEN 1 #else # define ANDROID_ARM_CODEGEN 0 @@ -73,7 +73,7 @@ */ #define DEBUG_NEEDS 0 -#if defined( __mips__) && !defined(__LP64__) +#if defined( __mips__) && !defined(__LP64__) && __mips_isa_rev < 6 #define ASSEMBLY_SCRATCH_SIZE 4096 #elif defined(__aarch64__) #define ASSEMBLY_SCRATCH_SIZE 8192 @@ -134,7 +134,7 @@ extern "C" void scanline_col32cb16blend_arm(uint16_t *dst, uint32_t col, size_t #elif defined(__aarch64__) extern "C" void scanline_t32cb16blend_arm64(uint16_t*, uint32_t*, size_t); extern "C" void scanline_col32cb16blend_arm64(uint16_t *dst, uint32_t col, size_t ct); -#elif defined(__mips__) && !defined(__LP64__) +#elif defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6 extern "C" void scanline_t32cb16blend_mips(uint16_t*, uint32_t*, size_t); #endif @@ -286,7 +286,7 @@ static const needs_filter_t fill16noblend = { #if ANDROID_ARM_CODEGEN -#if defined(__mips__) +#if defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6 static CodeCache gCodeCache(32 * 1024); #elif defined(__aarch64__) static CodeCache gCodeCache(48 * 1024); @@ -2175,7 +2175,7 @@ last_one: void scanline_t32cb16blend(context_t* c) { -#if ((ANDROID_CODEGEN >= ANDROID_CODEGEN_ASM) && (defined(__arm__) || (defined(__mips__) && !defined(__LP64__)) || defined(__aarch64__))) +#if ((ANDROID_CODEGEN >= ANDROID_CODEGEN_ASM) && (defined(__arm__) || (defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6) || defined(__aarch64__))) int32_t x = c->iterators.xl; size_t ct = c->iterators.xr - x; int32_t y = c->iterators.y; diff --git a/libpixelflinger/tests/codegen/codegen.cpp b/libpixelflinger/tests/codegen/codegen.cpp index 46c1ccc..148b6f4 100644 --- a/libpixelflinger/tests/codegen/codegen.cpp +++ b/libpixelflinger/tests/codegen/codegen.cpp @@ -9,16 +9,18 @@ #include "codeflinger/CodeCache.h" #include "codeflinger/GGLAssembler.h" #include "codeflinger/ARMAssembler.h" +#if defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6 #include "codeflinger/MIPSAssembler.h" +#endif #include "codeflinger/Arm64Assembler.h" -#if defined(__arm__) || defined(__mips__) || defined(__aarch64__) +#if defined(__arm__) || (defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6) || defined(__aarch64__) # define ANDROID_ARM_CODEGEN 1 #else # define ANDROID_ARM_CODEGEN 0 #endif -#if defined (__mips__) +#if defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6 #define ASSEMBLY_SCRATCH_SIZE 4096 #elif defined(__aarch64__) #define ASSEMBLY_SCRATCH_SIZE 8192 @@ -52,7 +54,7 @@ static void ggl_test_codegen(uint32_t n, uint32_t p, uint32_t t0, uint32_t t1) GGLAssembler assembler( new ARMAssembler(a) ); #endif -#if defined(__mips__) && !defined(__LP64__) +#if defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6 GGLAssembler assembler( new ArmToMipsAssembler(a) ); #endif |