ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
long_shift_pending_t Struct Reference

The correct result of one long shift, awaiting write-back. More...

Data Fields

bool active
 A captured result is waiting to be written back.
uint32_t at
 Address of the instruction after the long shift.
uint32_t rdalo
 Low destination register index.
uint32_t rdahi
 High destination register index.
uint32_t lo
 Correct low word of the shifted 64-bit value.
uint32_t hi
 Correct high word of the shifted 64-bit value.
uint32_t nzcv
 NZCV as it stood before the ORRS overwrote it.

Detailed Description

The correct result of one long shift, awaiting write-back.

Filled at the long-shift site before the core mis-executes the encoding as ORRS, and consumed at the following instruction once that ORRS has done its damage.

More than one can be outstanding. The two phases are only one instruction apart, but ra8_emulator delivers an interrupt by ending a run chunk and vectoring, and that boundary can fall inside the window – so a handler can begin (and finish) its own long shift while an outer one is still awaiting write-back. A single slot would be overwritten by the inner shift and the outer result silently lost, which is precisely the wrong-64-bit-arithmetic failure this seam exists to prevent, so entries are held in a small table keyed by write-back address (k_lsh_pending_max deep, far beyond the interrupt nesting this emulator models).

Invariant
active is true only between a site and its immediately following instruction.
At most one active entry exists per at address.
See also
internal_on_long_shift

Definition at line 323 of file emu_seam_longshift.c.

Field Documentation

◆ active

bool long_shift_pending_t::active

A captured result is waiting to be written back.

Definition at line 324 of file emu_seam_longshift.c.

Referenced by internal_long_shift_commit().

◆ at

uint32_t long_shift_pending_t::at

Address of the instruction after the long shift.

Definition at line 325 of file emu_seam_longshift.c.

◆ hi

uint32_t long_shift_pending_t::hi

Correct high word of the shifted 64-bit value.

Definition at line 329 of file emu_seam_longshift.c.

Referenced by internal_long_shift_commit().

◆ lo

uint32_t long_shift_pending_t::lo

Correct low word of the shifted 64-bit value.

Definition at line 328 of file emu_seam_longshift.c.

Referenced by internal_long_shift_commit().

◆ nzcv

uint32_t long_shift_pending_t::nzcv

NZCV as it stood before the ORRS overwrote it.

Definition at line 330 of file emu_seam_longshift.c.

Referenced by internal_long_shift_commit().

◆ rdahi

uint32_t long_shift_pending_t::rdahi

High destination register index.

Definition at line 327 of file emu_seam_longshift.c.

Referenced by internal_long_shift_commit().

◆ rdalo

uint32_t long_shift_pending_t::rdalo

Low destination register index.

Definition at line 326 of file emu_seam_longshift.c.

Referenced by internal_long_shift_commit().


The documentation for this struct was generated from the following file: