It is irrelevant to the API what the buffers to fill are made of.
In particular, some MIPS ISA have 16-bit wide instructions.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/mips/bootloader.c | 55 +++++++++++++++++++++---------------
hw/mips/malta.c | 19 +++++++------
include/hw/mips/bootloader.h | 10 +++----
3 files changed, 48 insertions(+), 36 deletions(-)
diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c
index f5f42f2bf2..fc14eb0894 100644
--- a/hw/mips/bootloader.c
+++ b/hw/mips/bootloader.c
@@ -55,16 +55,20 @@ static bool bootcpu_supports_isa(uint64_t isa_mask)
}
/* Base types */
-static void bl_gen_nop(uint32_t **p)
+static void bl_gen_nop(void **ptr)
{
- stl_p(*p, 0);
- *p = *p + 1;
+ uint32_t *p = (uint32_t *)*ptr;