PPUJIT: Support exception based MMIO and reservations

This commit is contained in:
S Gopal Rajagopal 2015-02-16 22:49:17 +05:30
parent bf1e29e227
commit e7f278b5d2
3 changed files with 6024 additions and 6141 deletions

File diff suppressed because it is too large Load diff

View file

@ -242,6 +242,11 @@ namespace vm
return broken;
}
bool reservation_acquire_no_cb(void* data, u32 addr, u32 size)
{
return reservation_acquire(data, addr, size);
}
bool reservation_update(u32 addr, const void* data, u32 size)
{
assert(size == 1 || size == 2 || size == 4 || size == 8 || size == 128);

View file

@ -36,6 +36,9 @@ namespace vm
bool reservation_break(u32 addr);
// read memory and reserve it for further atomic update, return true if the previous reservation was broken
bool reservation_acquire(void* data, u32 addr, u32 size, const std::function<void()>& callback = nullptr);
// same as reservation_acquire but does not have the callback argument
// used by the PPU LLVM JIT since creating a std::function object in LLVM IR is too complicated
bool reservation_acquire_no_cb(void* data, u32 addr, u32 size);
// attempt to atomically update reserved memory
bool reservation_update(u32 addr, const void* data, u32 size);
// for internal use