ops_sse.h (5f40edb71e7da2d050c40766c9681dd0c672f92e) | ops_sse.h (03cf414ec3c6bf016d1b5c73719b67ad614e07c5) |
---|---|
1/* 2 * MMX/3DNow!/SSE/SSE2/SSE3/SSSE3/SSE4/PNI support 3 * 4 * Copyright (c) 2005 Fabrice Bellard 5 * Copyright (c) 2008 Intel Corporation <andrew.zaborowski@intel.com> 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public --- 2174 unchanged lines hidden (view full) --- 2183 AESState *rk = (AESState *)&s->ZMM_X(i); 2184 2185 aesdec_ISB_ISR_AK(ad, st, rk, false); 2186 } 2187} 2188 2189void glue(helper_aesenc, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) 2190{ | 1/* 2 * MMX/3DNow!/SSE/SSE2/SSE3/SSSE3/SSE4/PNI support 3 * 4 * Copyright (c) 2005 Fabrice Bellard 5 * Copyright (c) 2008 Intel Corporation <andrew.zaborowski@intel.com> 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public --- 2174 unchanged lines hidden (view full) --- 2183 AESState *rk = (AESState *)&s->ZMM_X(i); 2184 2185 aesdec_ISB_ISR_AK(ad, st, rk, false); 2186 } 2187} 2188 2189void glue(helper_aesenc, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) 2190{ |
2191 int i; 2192 Reg st = *v; 2193 Reg rk = *s; | 2191 for (int i = 0; i < SHIFT; i++) { 2192 AESState *ad = (AESState *)&d->ZMM_X(i); 2193 AESState *st = (AESState *)&v->ZMM_X(i); 2194 AESState *rk = (AESState *)&s->ZMM_X(i); |
2194 | 2195 |
2195 for (i = 0 ; i < 2 << SHIFT ; i++) { 2196 int j = i & 3; 2197 d->L(i) = rk.L(i) ^ bswap32(AES_Te0[st.B(AES_shifts[4 * j + 0])] ^ 2198 AES_Te1[st.B(AES_shifts[4 * j + 1])] ^ 2199 AES_Te2[st.B(AES_shifts[4 * j + 2])] ^ 2200 AES_Te3[st.B(AES_shifts[4 * j + 3])]); | 2196 aesenc_SB_SR_MC_AK(ad, st, rk, false); |
2201 } 2202} 2203 2204void glue(helper_aesenclast, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) 2205{ 2206 for (int i = 0; i < SHIFT; i++) { 2207 AESState *ad = (AESState *)&d->ZMM_X(i); 2208 AESState *st = (AESState *)&v->ZMM_X(i); --- 362 unchanged lines hidden --- | 2197 } 2198} 2199 2200void glue(helper_aesenclast, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) 2201{ 2202 for (int i = 0; i < SHIFT; i++) { 2203 AESState *ad = (AESState *)&d->ZMM_X(i); 2204 AESState *st = (AESState *)&v->ZMM_X(i); --- 362 unchanged lines hidden --- |