diff options
Diffstat (limited to 'libpixelflinger/scanline.cpp')
-rw-r--r-- | libpixelflinger/scanline.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libpixelflinger/scanline.cpp b/libpixelflinger/scanline.cpp index d1f3d9677..a5d28b276 100644 --- a/libpixelflinger/scanline.cpp +++ b/libpixelflinger/scanline.cpp @@ -32,6 +32,9 @@ #include "codeflinger/CodeCache.h" #include "codeflinger/GGLAssembler.h" #include "codeflinger/ARMAssembler.h" +#if defined(__mips__) +#include "codeflinger/MIPSAssembler.h" +#endif //#include "codeflinger/ARMAssemblerOptimizer.h" // ---------------------------------------------------------------------------- @@ -49,7 +52,7 @@ # define ANDROID_CODEGEN ANDROID_CODEGEN_GENERATED #endif -#if defined(__arm__) +#if defined(__arm__) || defined(__mips__) # define ANDROID_ARM_CODEGEN 1 #else # define ANDROID_ARM_CODEGEN 0 @@ -63,7 +66,11 @@ */ #define DEBUG_NEEDS 0 +#ifdef __mips__ +#define ASSEMBLY_SCRATCH_SIZE 4096 +#else #define ASSEMBLY_SCRATCH_SIZE 2048 +#endif // ---------------------------------------------------------------------------- namespace android { @@ -266,7 +273,12 @@ static const needs_filter_t fill16noblend = { // ---------------------------------------------------------------------------- #if ANDROID_ARM_CODEGEN + +#if defined(__mips__) +static CodeCache gCodeCache(32 * 1024); +#else static CodeCache gCodeCache(12 * 1024); +#endif class ScanlineAssembly : public Assembly { AssemblyKey<needs_t> mKey; @@ -375,9 +387,14 @@ static void pick_scanline(context_t* c) sp<ScanlineAssembly> a = new ScanlineAssembly(c->state.needs, ASSEMBLY_SCRATCH_SIZE); // initialize our assembler +#if defined(__arm__) GGLAssembler assembler( new ARMAssembler(a) ); //GGLAssembler assembler( // new ARMAssemblerOptimizer(new ARMAssembler(a)) ); +#endif +#if defined(__mips__) + GGLAssembler assembler( new ArmToMipsAssembler(a) ); +#endif // generate the scanline code for the given needs int err = assembler.scanline(c->state.needs, c); if (ggl_likely(!err)) { |