mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-12 19:36:57 +00:00
aarch64/mem: Fixed pointer arithmatic warning
Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
parent
55af4bebda
commit
c550b00dde
2 changed files with 5 additions and 5 deletions
|
|
@ -2,12 +2,12 @@
|
||||||
#include "Base/Assert.h"
|
#include "Base/Assert.h"
|
||||||
#include "memory/arena.h"
|
#include "memory/arena.h"
|
||||||
|
|
||||||
static inline void* aarch64::memory::gpa_to_hva(aarch64::memory::guest_memory_t* memory, uint64_t gpa)
|
static inline uint8_t* aarch64::memory::gpa_to_hva(aarch64::memory::guest_memory_t* memory, uint64_t gpa)
|
||||||
{
|
{
|
||||||
ASSERT(nullptr != memory);
|
ASSERT(nullptr != memory);
|
||||||
ASSERT(nullptr != memory->base);
|
ASSERT(nullptr != memory->base);
|
||||||
ASSERT(gpa < memory->size);
|
ASSERT(gpa < memory->size);
|
||||||
void* hva = memory->base + gpa;
|
uint8_t* hva = memory->base + gpa;
|
||||||
return hva;
|
return hva;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -18,7 +18,7 @@ void cpuTest()
|
||||||
ASSERT(nullptr != guest_memory_arena.data);
|
ASSERT(nullptr != guest_memory_arena.data);
|
||||||
|
|
||||||
aarch64::memory::guest_memory_t guest_ram = {};
|
aarch64::memory::guest_memory_t guest_ram = {};
|
||||||
guest_ram.base = guest_memory_arena.data;
|
guest_ram.base = static_cast<uint8_t*>(guest_memory_arena.data);
|
||||||
guest_ram.size = guest_memory_arena.capacity;
|
guest_ram.size = guest_memory_arena.capacity;
|
||||||
|
|
||||||
// Outdated Code
|
// Outdated Code
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ namespace memory
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
void* base;
|
uint8_t* base;
|
||||||
uint64_t size;
|
uint64_t size;
|
||||||
} guest_memory_t;
|
} guest_memory_t;
|
||||||
|
|
||||||
|
|
@ -74,7 +74,7 @@ typedef struct
|
||||||
*
|
*
|
||||||
* Return: A valid host virtual address pointer corresponding to the GPA.
|
* Return: A valid host virtual address pointer corresponding to the GPA.
|
||||||
*/
|
*/
|
||||||
static inline void* gpa_to_hva(guest_memory_t* memory, uint64_t gpa);
|
static inline uint8_t* gpa_to_hva(guest_memory_t* memory, uint64_t gpa);
|
||||||
} // namespace memory
|
} // namespace memory
|
||||||
} // namespace aarch64
|
} // namespace aarch64
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue