mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
[Renderscript] Add stack argument reading code for Mipsel 2
This commit implements the reading of stack spilled function arguments for little endian MIPS targets. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263131
This commit is contained in:
@@ -364,8 +364,15 @@ GetArgsMipsel(GetArgsCtx &ctx, ArgItem *arg_list, size_t num_args)
|
||||
// arguments passed on the stack
|
||||
else
|
||||
{
|
||||
if (log)
|
||||
log->Printf("%s - reading arguments spilled to stack not implemented.", __FUNCTION__);
|
||||
const size_t arg_size = sizeof(uint32_t);
|
||||
uint64_t sp = ctx.reg_ctx->GetSP();
|
||||
uint32_t offset = i * arg_size;
|
||||
arg.value = 0;
|
||||
Error error;
|
||||
size_t bytes_read = ctx.process->ReadMemory(sp + offset, &arg.value, arg_size, error);
|
||||
success = (error.Success() && bytes_read == arg_size);
|
||||
if (!success && log)
|
||||
log->Printf ("RenderScriptRuntime::GetArgSimple - error reading Mips stack: %s.", error.AsCString());
|
||||
}
|
||||
// fail if we couldn't read this argument
|
||||
if (!success)
|
||||
|
||||
Reference in New Issue
Block a user