duckstation

duckstation, but archived from the revision just before upstream changed it to a proprietary software project, this version is the libre one
git clone https://git.neptards.moe/u3shit/duckstation.git
Log | Files | Refs | README | LICENSE

cpu_recompiler_thunks.h (1329B)


      1 // SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
      2 // SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
      3 
      4 #pragma once
      5 #include "cpu_code_cache.h"
      6 #include "cpu_types.h"
      7 
      8 namespace CPU::Recompiler::Thunks {
      9 
     10 //////////////////////////////////////////////////////////////////////////
     11 // Trampolines for calling back from the JIT
     12 // Needed because we can't cast member functions to void*...
     13 // TODO: Abuse carry flag or something else for exception
     14 //////////////////////////////////////////////////////////////////////////
     15 bool InterpretInstruction();
     16 bool InterpretInstructionPGXP();
     17 
     18 // Memory access functions for the JIT - MSB is set on exception.
     19 u64 ReadMemoryByte(u32 address);
     20 u64 ReadMemoryHalfWord(u32 address);
     21 u64 ReadMemoryWord(u32 address);
     22 u32 WriteMemoryByte(u32 address, u32 value);
     23 u32 WriteMemoryHalfWord(u32 address, u32 value);
     24 u32 WriteMemoryWord(u32 address, u32 value);
     25 
     26 // Unchecked memory access variants. No alignment or bus exceptions.
     27 u32 UncheckedReadMemoryByte(u32 address);
     28 u32 UncheckedReadMemoryHalfWord(u32 address);
     29 u32 UncheckedReadMemoryWord(u32 address);
     30 void UncheckedWriteMemoryByte(u32 address, u32 value);
     31 void UncheckedWriteMemoryHalfWord(u32 address, u32 value);
     32 void UncheckedWriteMemoryWord(u32 address, u32 value);
     33 
     34 } // namespace CPU::Recompiler::Thunks