mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-09 07:58:16 +01:00
backend_x64: Inline Routines::GenReturnFromRunCode into emitted code
This commit is contained in:
parent
619b451902
commit
08e848044d
3 changed files with 8 additions and 18 deletions
|
|
@ -19,7 +19,6 @@ Routines::Routines() {
|
|||
AllocCodeSpace(1024);
|
||||
|
||||
GenRunCode();
|
||||
GenReturnFromRunCode();
|
||||
}
|
||||
|
||||
size_t Routines::RunCode(JitState* jit_state, CodePtr basic_block, size_t cycles_to_run) const {
|
||||
|
|
@ -30,10 +29,6 @@ size_t Routines::RunCode(JitState* jit_state, CodePtr basic_block, size_t cycles
|
|||
return cycles_to_run - jit_state->cycles_remaining; // Return number of cycles actually run.
|
||||
}
|
||||
|
||||
CodePtr Routines::RunCodeReturnAddress() const {
|
||||
return return_from_run_code;
|
||||
}
|
||||
|
||||
void Routines::GenRunCode() {
|
||||
run_code = reinterpret_cast<RunCodeFuncType>(const_cast<u8*>(this->GetCodePtr()));
|
||||
|
||||
|
|
@ -49,12 +44,10 @@ void Routines::GenRunCode() {
|
|||
JMPptr(R(ABI_PARAM2));
|
||||
}
|
||||
|
||||
void Routines::GenReturnFromRunCode() {
|
||||
return_from_run_code = this->GetCodePtr();
|
||||
|
||||
MOV(64, R(RSP), MDisp(R15, offsetof(JitState, save_host_RSP)));
|
||||
ABI_PopRegistersAndAdjustStack(ABI_ALL_CALLEE_SAVED, 8);
|
||||
RET();
|
||||
void Routines::GenReturnFromRunCode(XEmitter* code) const {
|
||||
code->MOV(64, R(RSP), MDisp(R15, offsetof(JitState, save_host_RSP)));
|
||||
code->ABI_PopRegistersAndAdjustStack(ABI_ALL_CALLEE_SAVED, 8);
|
||||
code->RET();
|
||||
}
|
||||
|
||||
} // namespace BackendX64
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue