Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
8d8a68dc6d
commit
acc93cb564
1 changed files with 2 additions and 2 deletions
|
@ -737,7 +737,7 @@ struct Memory::Impl {
|
||||||
/// @tparam T The data type to read out of memory.
|
/// @tparam T The data type to read out of memory.
|
||||||
/// @returns The instance of T read from the specified virtual address.
|
/// @returns The instance of T read from the specified virtual address.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline T Read(Common::ProcessAddress vaddr) requires(std::is_trivially_copyable_v<T>) noexcept {
|
inline T Read(Common::ProcessAddress vaddr) noexcept requires(std::is_trivially_copyable_v<T>) {
|
||||||
const u64 addr = GetInteger(vaddr);
|
const u64 addr = GetInteger(vaddr);
|
||||||
if (auto const ptr = GetPointerImpl(addr, [addr]() {
|
if (auto const ptr = GetPointerImpl(addr, [addr]() {
|
||||||
LOG_ERROR(HW_Memory, "Unmapped Read{} @ 0x{:016X}", sizeof(T) * 8, addr);
|
LOG_ERROR(HW_Memory, "Unmapped Read{} @ 0x{:016X}", sizeof(T) * 8, addr);
|
||||||
|
@ -758,7 +758,7 @@ struct Memory::Impl {
|
||||||
/// @param vaddr The virtual address to write the data type to.
|
/// @param vaddr The virtual address to write the data type to.
|
||||||
/// @tparam T The data type to write to memory.
|
/// @tparam T The data type to write to memory.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void Write(Common::ProcessAddress vaddr, const T data) requires(std::is_trivially_copyable_v<T>) noexcept {
|
inline void Write(Common::ProcessAddress vaddr, const T data) noexcept requires(std::is_trivially_copyable_v<T>) {
|
||||||
const u64 addr = GetInteger(vaddr);
|
const u64 addr = GetInteger(vaddr);
|
||||||
if (auto const ptr = GetPointerImpl(addr, [addr, data]() {
|
if (auto const ptr = GetPointerImpl(addr, [addr, data]() {
|
||||||
LOG_ERROR(HW_Memory, "Unmapped Write{} @ 0x{:016X} = 0x{:016X}", sizeof(T) * 8, addr, u64(data));
|
LOG_ERROR(HW_Memory, "Unmapped Write{} @ 0x{:016X} = 0x{:016X}", sizeof(T) * 8, addr, u64(data));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue