Properly using XapiThreadStartup routines, if present.

This commit is contained in:
Ben Vanik
2013-06-30 10:27:06 -07:00
parent 8d5e877a03
commit 39ef8d8263
3 changed files with 28 additions and 12 deletions

View File

@@ -225,7 +225,7 @@ int Processor::Execute(ThreadState* thread_state, uint32_t address) {
}
uint64_t Processor::Execute(ThreadState* thread_state, uint32_t address,
uint64_t arg0) {
uint64_t arg0) {
xe_ppc_state_t* ppc_state = thread_state->ppc_state();
ppc_state->r[3] = arg0;
if (Execute(thread_state, address)) {
@@ -234,6 +234,17 @@ uint64_t Processor::Execute(ThreadState* thread_state, uint32_t address,
return ppc_state->r[3];
}
uint64_t Processor::Execute(ThreadState* thread_state, uint32_t address,
uint64_t arg0, uint64_t arg1) {
xe_ppc_state_t* ppc_state = thread_state->ppc_state();
ppc_state->r[3] = arg0;
ppc_state->r[4] = arg1;
if (Execute(thread_state, address)) {
return 0xDEADBABE;
}
return ppc_state->r[3];
}
FunctionSymbol* Processor::GetFunction(uint32_t address) {
// Attempt to grab the function symbol from the global lookup table.
FunctionSymbol* fn_symbol = sym_table_->GetFunction(address);