aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/cpu.h
diff options
context:
space:
mode:
authorLucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>2022-05-24 11:05:30 -0300
committerDaniel Henrique Barboza <danielhb413@gmail.com>2022-05-26 17:11:33 -0300
commita702c5339eda791b969ed531ce99456df7ca8451 (patch)
tree4bbff29dd291a3a3518204e4af0ddf4fc04116f1 /target/ppc/cpu.h
parent03abfd90cfb02aa08f44bbb7141b0aaaf69042ef (diff)
downloadqemu-a702c5339eda791b969ed531ce99456df7ca8451.zip
qemu-a702c5339eda791b969ed531ce99456df7ca8451.tar.gz
qemu-a702c5339eda791b969ed531ce99456df7ca8451.tar.bz2
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>
Diffstat (limited to 'target/ppc/cpu.h')
-rw-r--r--target/ppc/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index bf8f8aa..c865206 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -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);