On Wednesday, May 1, 2013, Richard Henderson <r...@twiddle.net> wrote: > On 2013-04-30 07:36, John Rigby wrote: >> >> uint32_t regs[16]; >> + >> + /* Regs for A64 mode. */ >> + uint64_t xregs[31]; >> + uint64_t pc; >> + uint64_t sp; >> + uint32_t pstate; >> + uint32_t aarch64_state; /* 1 if CPU is in aarch64 state */ >> + > > How do these registers overlap (or not) in real hardware? > Is it possible to union these with the 32-bit state?
There is an overlap between 32- and 64-bit state registers, but it's against the set of 32 (?) 32-bit registers that exist across all modes, not against the 16 registers as used here. IMHO it doesn't make sense to union them, the mapping can be done when switching from 32- to 64-bit modes. Laurent