|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Shared engine-access table definition (see emu_engine.h). More...
#include "emu_engine.h"Go to the source code of this file.
Functions | |
| void | emu_seam_request_relaunch (void) |
| Implementation of emu_seam_request_relaunch() – set the latch. | |
| bool | emu_seam_take_relaunch (void) |
| Implementation of emu_seam_take_relaunch() – read + clear. | |
Variables | |
| const int | k_arm_reg_id [16] |
| ARM register index (0..15) -> Unicorn register id. | |
| static bool | s_seam_relaunch |
| Set by a C-seam to relaunch WITHOUT consuming a chunk. | |
Shared engine-access table definition (see emu_engine.h).
Holds the one definition of the ARM register-index -> Unicorn register-id mapping the instruction seams share; the inline accessors live entirely in emu_engine.h.
Definition in file emu_engine.c.
| void emu_seam_request_relaunch | ( | void | ) |
Implementation of emu_seam_request_relaunch() – set the latch.
Mark the pending engine stop as a zero-time seam relaunch.
Definition at line 52 of file emu_engine.c.
References s_seam_relaunch.
Referenced by emulate_div0_patched(), and internal_on_sdmmc_read_block().
| bool emu_seam_take_relaunch | ( | void | ) |
Implementation of emu_seam_take_relaunch() – read + clear.
Consume the zero-time seam-relaunch latch.
Definition at line 58 of file emu_engine.c.
References s_seam_relaunch.
Referenced by internal_run_inner_check_stops().
| const int k_arm_reg_id[16] |
ARM register index (0..15) -> Unicorn register id.
Unicorn's UC_ARM_REG_* enum is NOT contiguous (UC_ARM_REG_R0 + n != UC_ARM_REG_Rn), so every instruction seam that decodes a 4-bit register field maps it through this table. PC(15)/SP(13)/LR(14) are never CSx destinations in practice but are mapped for completeness.
Definition at line 17 of file emu_engine.c.
Referenced by emulate_div0_patched(), emulate_long_shift_reg(), internal_emulate_cond_select(), internal_emulate_lob(), internal_long_shift_amount(), internal_long_shift_begin(), internal_long_shift_commit(), and internal_mve_mem_exec().
|
static |
Set by a C-seam to relaunch WITHOUT consuming a chunk.
A block-serve or emulated-instruction seam stops emulation to return to the caller; left alone the inner run loop would treat that clean stop as a full instruction budget elapsing and advance SysTick + charge a chunk. This latch marks the stop as a zero-time seam relaunch – the inner loop just re-enters at the returned PC, exactly like the exception-return path.
Definition at line 49 of file emu_engine.c.
Referenced by emu_seam_request_relaunch(), and emu_seam_take_relaunch().