Add constexpr getters to magicdiv class so it can be used from jitted x64/dxbc Track the guest return address as well for guest/host sync, if multiple entries have the same guest stack find the first one with a matching guest retaddr. this fixes epic mickey 2 (which the previous guest-stack change had allowed to go ingame for a bit) and potentially also a crash in fable3. Break if under debugger when stackpoints are overflowed Add much more useful output for host exceptions, print out xenia_canary.exe relative offsets if exception is in module, formatmessage for ntstatus/win32err, strerror Minor d3d12 microoptimization, instead of doing SetEventOnCompletion + WaitForSingleObject do SetEventOnCompletion w/ nullptr so that the wait happens in kernel mode, avoiding two extra context switches add unimplemented kernel functions: ExAllocatePoolWithTag ObReferenceObject ObDereferenceObject has no return value. Log a message when ObDereferenceObject/Reference receive unregistered guest kernel objects gave ObLookupThreadByThreadId its correct error status hoist object_types initialization out of ObReferenceObjectByHandle Fix out parameter values on error for a few kernel funcs add note about msr to KeSetCurrentStackPointers add X_STATUS_OBJECT_TYPE_MISMATCH check for xeNtSetEvent add msr_mask field to X_KPCR
54 lines
1.5 KiB
C++
54 lines
1.5 KiB
C++
/**
|
|
******************************************************************************
|
|
* Xenia : Xbox 360 Emulator Research Project *
|
|
******************************************************************************
|
|
* Copyright 2013 Ben Vanik. All rights reserved. *
|
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
|
******************************************************************************
|
|
*/
|
|
|
|
#ifndef XENIA_CPU_PPC_PPC_TRANSLATOR_H_
|
|
#define XENIA_CPU_PPC_PPC_TRANSLATOR_H_
|
|
|
|
#include <memory>
|
|
|
|
#include "xenia/base/string_buffer.h"
|
|
#include "xenia/cpu/backend/assembler.h"
|
|
#include "xenia/cpu/compiler/compiler.h"
|
|
#include "xenia/cpu/function.h"
|
|
|
|
namespace xe {
|
|
namespace cpu {
|
|
namespace ppc {
|
|
|
|
class PPCFrontend;
|
|
class PPCHIRBuilder;
|
|
class PPCScanner;
|
|
|
|
class PPCTranslator {
|
|
public:
|
|
explicit PPCTranslator(PPCFrontend* frontend);
|
|
~PPCTranslator();
|
|
|
|
bool Translate(GuestFunction* function, uint32_t debug_info_flags);
|
|
void DumpHIR(GuestFunction* function, PPCHIRBuilder* builder);
|
|
void Reset();
|
|
|
|
private:
|
|
void DumpSource(GuestFunction* function, StringBuffer* string_buffer);
|
|
|
|
PPCFrontend* frontend_;
|
|
std::unique_ptr<PPCScanner> scanner_;
|
|
std::unique_ptr<PPCHIRBuilder> builder_;
|
|
std::unique_ptr<compiler::Compiler> compiler_;
|
|
std::unique_ptr<backend::Assembler> assembler_;
|
|
|
|
StringBuffer string_buffer_;
|
|
};
|
|
|
|
} // namespace ppc
|
|
} // namespace cpu
|
|
} // namespace xe
|
|
|
|
#endif // XENIA_CPU_PPC_PPC_TRANSLATOR_H_
|