forked from etc/pineapple-src
early-access version 1394
This commit is contained in:
parent
20a3b9c2b1
commit
0586ca869c
3 changed files with 13 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 1393.
|
This is the source code for early-access 1394.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,8 @@ struct UserCallbacks {
|
||||||
|
|
||||||
virtual void ExceptionRaised(VAddr pc, Exception exception) = 0;
|
virtual void ExceptionRaised(VAddr pc, Exception exception) = 0;
|
||||||
|
|
||||||
|
virtual void InstructionSynchronizationBarrierRaised() {}
|
||||||
|
|
||||||
// Timing-related callbacks
|
// Timing-related callbacks
|
||||||
// ticks ticks have passed
|
// ticks ticks have passed
|
||||||
virtual void AddTicks(std::uint64_t ticks) = 0;
|
virtual void AddTicks(std::uint64_t ticks) = 0;
|
||||||
|
@ -164,6 +166,11 @@ struct UserConfig {
|
||||||
// Coprocessors
|
// Coprocessors
|
||||||
std::array<std::shared_ptr<Coprocessor>, 16> coprocessors{};
|
std::array<std::shared_ptr<Coprocessor>, 16> coprocessors{};
|
||||||
|
|
||||||
|
/// When set to true, UserCallbacks::InstructionSynchronizationBarrierRaised will be
|
||||||
|
/// called when an ISB instruction is executed.
|
||||||
|
/// When set to false, ISB will be treated as a NOP instruction.
|
||||||
|
bool hook_isb = false;
|
||||||
|
|
||||||
/// Hint instructions would cause ExceptionRaised to be called with the appropriate
|
/// Hint instructions would cause ExceptionRaised to be called with the appropriate
|
||||||
/// argument.
|
/// argument.
|
||||||
bool hook_hint_instructions = false;
|
bool hook_hint_instructions = false;
|
||||||
|
|
|
@ -720,10 +720,12 @@ void A32EmitX64::EmitA32DataMemoryBarrier(A32EmitContext&, IR::Inst*) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void A32EmitX64::EmitA32InstructionSynchronizationBarrier(A32EmitContext& ctx, IR::Inst*) {
|
void A32EmitX64::EmitA32InstructionSynchronizationBarrier(A32EmitContext& ctx, IR::Inst*) {
|
||||||
ctx.reg_alloc.HostCall(nullptr);
|
if (!conf.hook_isb) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
code.mov(code.ABI_PARAM1, reinterpret_cast<u64>(jit_interface));
|
ctx.reg_alloc.HostCall(nullptr);
|
||||||
code.CallLambda([](A32::Jit* jit) { jit->ClearCache(); });
|
Devirtualize<&A32::UserCallbacks::InstructionSynchronizationBarrierRaised>(conf.callbacks).EmitCall(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
void A32EmitX64::EmitA32BXWritePC(A32EmitContext& ctx, IR::Inst* inst) {
|
void A32EmitX64::EmitA32BXWritePC(A32EmitContext& ctx, IR::Inst* inst) {
|
||||||
|
|
Loading…
Reference in a new issue