Remove unused arg, inline step function

This commit is contained in:
Toby Jaffey 2025-12-18 12:19:34 +00:00
parent d04811a3c5
commit 21f7190427
4 changed files with 5 additions and 5 deletions

Binary file not shown.

View file

@ -103,7 +103,7 @@ struct MiniRV32IMAState
}; };
#ifndef MINIRV32_STEPPROTO #ifndef MINIRV32_STEPPROTO
MINIRV32_DECORATE int32_t MiniRV32IMAStep(void *userdata, struct MiniRV32IMAState * state, uint8_t * image, uint32_t vProcAddress, MINIRV32_DECORATE int32_t MiniRV32IMAStep(void *userdata, struct MiniRV32IMAState * state, uint8_t * image,
#ifndef MINIRV32_NO_TIMERS_NO_CYCLES #ifndef MINIRV32_NO_TIMERS_NO_CYCLES
uint32_t elapsedUs, uint32_t elapsedUs,
#endif #endif
@ -120,7 +120,7 @@ int count );
#endif #endif
#ifndef MINIRV32_STEPPROTO #ifndef MINIRV32_STEPPROTO
MINIRV32_DECORATE int32_t MiniRV32IMAStep(void *userdata, struct MiniRV32IMAState * state, uint8_t * image, uint32_t vProcAddress, MINIRV32_DECORATE int32_t MiniRV32IMAStep(void *userdata, struct MiniRV32IMAState * state, uint8_t * image,
#ifndef MINIRV32_NO_TIMERS_NO_CYCLES #ifndef MINIRV32_NO_TIMERS_NO_CYCLES
uint32_t elapsedUs, uint32_t elapsedUs,
#endif #endif

View file

@ -251,10 +251,9 @@ uint32_t uvm32_run(uvm32_state_t *vmst, uvm32_evt_t *evt, uint32_t instr_meter)
// run CPU until no longer in running state // run CPU until no longer in running state
while(vmst->_status == UVM32_STATUS_RUNNING && instr_meter > 0) { while(vmst->_status == UVM32_STATUS_RUNNING && instr_meter > 0) {
uint64_t elapsedUs = 1;
uint32_t ret; uint32_t ret;
ret = MiniRV32IMAStep(vmst, &vmst->_core, vmst->_memory, elapsedUs, 1); ret = MiniRV32IMAStep(vmst, &vmst->_core, vmst->_memory, 1);
instr_meter--; instr_meter--;
switch(ret) { switch(ret) {

View file

@ -38,6 +38,7 @@ SOFTWARE.
// Include definitions for required syscalls // Include definitions for required syscalls
#include "uvm32_sys.h" #include "uvm32_sys.h"
/*! Union for safely casting differently sized types */
typedef union __attribute__((packed)) { typedef union __attribute__((packed)) {
uint32_t u32; uint32_t u32;
uint16_t u16; uint16_t u16;
@ -48,7 +49,7 @@ typedef union __attribute__((packed)) {
} uvm32_val_t; } uvm32_val_t;
// Setup and hooks for mini-rv32ima emulator core // Setup and hooks for mini-rv32ima emulator core
#define MINIRV32_DECORATE static #define MINIRV32_DECORATE static inline
#define MINIRV32_RETURN_TRAP #define MINIRV32_RETURN_TRAP
#define MINIRV32_NO_TIMERS_NO_CYCLES #define MINIRV32_NO_TIMERS_NO_CYCLES
#define MINIRV32_NO_ZICSR #define MINIRV32_NO_ZICSR