From 1b5d64873657d3a36c1d67c8006d22715140926c Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 4 Oct 2016 18:30:24 -0700 Subject: Add a new memory map flag to support an auxilliary buffer for translating code from MMAP_PTR_IDX chunks for which the pointer is null --- backend.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'backend.c') diff --git a/backend.c b/backend.c index 1f9e718..c42a7a0 100644 --- a/backend.c +++ b/backend.c @@ -65,6 +65,9 @@ void * get_native_pointer(uint32_t address, void ** mem_pointers, cpu_options * ? mem_pointers[memmap[chunk].ptr_index] : memmap[chunk].buffer; if (!base) { + if (memmap[chunk].flags & MMAP_AUX_BUFF) { + return memmap[chunk].buffer + (address & memmap[chunk].aux_mask); + } return NULL; } return base + (address & memmap[chunk].mask); -- cgit v1.2.3