aboutsummaryrefslogtreecommitdiff
path: root/target/i386
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-06-02 15:29:28 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-07-08 07:30:18 +0100
commit44a0c4a8ccb4c2d7688f4afd901620de6e3f2765 (patch)
tree5dfdbda7721b529276690fbb338d92455da59e4f /target/i386
parent03cf414ec3c6bf016d1b5c73719b67ad614e07c5 (diff)
downloadqemu-44a0c4a8ccb4c2d7688f4afd901620de6e3f2765.zip
qemu-44a0c4a8ccb4c2d7688f4afd901620de6e3f2765.tar.gz
qemu-44a0c4a8ccb4c2d7688f4afd901620de6e3f2765.tar.bz2
target/i386: Use aesdec_ISB_ISR_IMC_AK
This implements the AESDEC instruction. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/i386')
-rw-r--r--target/i386/ops_sse.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h
index 93a4e0c..a0e4257 100644
--- a/target/i386/ops_sse.h
+++ b/target/i386/ops_sse.h
@@ -2162,16 +2162,12 @@ void glue(helper_pclmulqdq, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s,
void glue(helper_aesdec, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s)
{
- int i;
- Reg st = *v;
- Reg rk = *s;
-
- for (i = 0 ; i < 2 << SHIFT ; i++) {
- int j = i & 3;
- d->L(i) = rk.L(i) ^ bswap32(AES_Td0[st.B(AES_ishifts[4 * j + 0])] ^
- AES_Td1[st.B(AES_ishifts[4 * j + 1])] ^
- AES_Td2[st.B(AES_ishifts[4 * j + 2])] ^
- AES_Td3[st.B(AES_ishifts[4 * j + 3])]);
+ for (int i = 0; i < SHIFT; i++) {
+ AESState *ad = (AESState *)&d->ZMM_X(i);
+ AESState *st = (AESState *)&v->ZMM_X(i);
+ AESState *rk = (AESState *)&s->ZMM_X(i);
+
+ aesdec_ISB_ISR_IMC_AK(ad, st, rk, false);
}
}