From b1651b8d8828fc14076e4202ffe612ad275bb5c8 Mon Sep 17 00:00:00 2001 From: Ewan Crawford Date: Mon, 7 Dec 2015 13:50:32 +0000 Subject: [RenderScript] Mips64 allocations workaround Workaround for Mips64 compiler bug by using function pointers to call functions for expression evaluation. This avoids the emission of the JAL instruction, which can only jump within a particular range of the PC. Author: Dean De Leo, dean@codeplay.com llvm-svn: 254910 --- .../RenderScriptRuntime/RenderScriptRuntime.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h') diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h index 145f5d9932f..971c26bae16 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h @@ -294,6 +294,24 @@ protected: static const size_t s_runtimeHookCount; private: + // Used to index expression format strings + enum ExpressionStrings + { + eExprGetOffsetPtr = 0, + eExprAllocGetType, + eExprTypeDimX, + eExprTypeDimY, + eExprTypeDimZ, + eExprTypeElemPtr, + eExprElementType, + eExprElementKind, + eExprElementVec, + eExprElementFieldCount, + eExprSubelementsId, + eExprSubelementsName, + eExprSubelementsArrSize + }; + RenderScriptRuntime(Process *process); // Call CreateInstance instead. static bool HookCallback(void *baton, StoppointCallbackContext *ctx, lldb::user_id_t break_id, @@ -319,6 +337,8 @@ private: // // Helper functions for jitting the runtime // + const char* JITTemplate(ExpressionStrings e); + bool JITDataPointer(AllocationDetails* allocation, StackFrame* frame_ptr, unsigned int x = 0, unsigned int y = 0, unsigned int z = 0); -- cgit v1.2.3