mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
target/ppc: Implement xxm[tf]acc and xxsetaccz
Implement the following PowerISA v3.1 instructions: xxmfacc: VSX Move From Accumulator xxmtacc: VSX Move To Accumulator xxsetaccz: VSX Set Accumulator to Zero The PowerISA 3.1 mentions that for the current version of the architecture, "the hardware implementation provides the effect of ACC[i] and VSRs 4*i to 4*i + 3 logically containing the same data" and "The Accumulators introduce no new logical state at this time" (page 501). For now it seems unnecessary to create new structures, so this patch just uses ACC[i] as VSRs 4*i to 4*i+3 and therefore move to and from accumulators are no-ops. Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220524140537.27451-2-lucas.araujo@eldorado.org.br> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
03abfd90cf
commit
a702c5339e
3 changed files with 45 additions and 0 deletions
|
@ -2663,6 +2663,11 @@ static inline int vsr_full_offset(int i)
|
|||
return offsetof(CPUPPCState, vsr[i].u64[0]);
|
||||
}
|
||||
|
||||
static inline int acc_full_offset(int i)
|
||||
{
|
||||
return vsr_full_offset(i * 4);
|
||||
}
|
||||
|
||||
static inline int fpr_offset(int i)
|
||||
{
|
||||
return vsr64_offset(i, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue