[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 26/28] target-ppc: Altivec 2.07: AES Instruction
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 26/28] target-ppc: Altivec 2.07: AES Instructions |
Date: |
Mon, 24 Feb 2014 09:59:31 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 02/12/2014 01:23 PM, Tom Musta wrote:
> +static uint8_t SBOX[256] = {
I'm not keen on yet another copy of AES data.
Please reuse "qemu/aes.h" as much as possible. Please see how we use those in
target-i386; from a quick reading, these insns should match up:
aesenc vcipher
aesenclast vcipherlast
aesdec vncipher
aesdeclast vncipherlast
It does look like the aes_shifts/aes_ishifts arrays should be moved from i386
specific code. Which would also be good since ops_sse.h is included multiple
times and thus we have unnecessary multiple copies of this data.
There's more data that should be moved out to common code in
target-arm/crypto_helper.c. The most pertinent of which is a copy of your SBOX
and InvSBOX arrays, which you'll still need for the vsbox insn.
I'll also note that arm contains a second copy of the aes_{i,}shifts arrays.
So after those are moved to common code, we avoid that duplication too.
r~
- [Qemu-devel] [PATCH 19/28] target-ppc: Altivec 2.07: Vector Doubleword Rotate and Shift Instructions, (continued)
- [Qemu-devel] [PATCH 19/28] target-ppc: Altivec 2.07: Vector Doubleword Rotate and Shift Instructions, Tom Musta, 2014/02/12
- [Qemu-devel] [PATCH 20/28] target-ppc: Altivec 2.07: Quadword Addition and Subtracation, Tom Musta, 2014/02/12
- [Qemu-devel] [PATCH 21/28] target-ppc: Altivec 2.07: vbpermq Instruction, Tom Musta, 2014/02/12
- [Qemu-devel] [PATCH 22/28] target-ppc: Altivec 2.07: Doubleword Compares, Tom Musta, 2014/02/12
- [Qemu-devel] [PATCH 23/28] target-ppc: Altivec 2.07: Vector Gather Bits by Bytes, Tom Musta, 2014/02/12
- [Qemu-devel] [PATCH 24/28] target-ppc: Altivec 2.07: Vector Polynomial Multiply Sum, Tom Musta, 2014/02/12
- [Qemu-devel] [PATCH 25/28] target-ppc: Altivec 2.07: Binary Coded Decimal Instructions, Tom Musta, 2014/02/12
- [Qemu-devel] [PATCH 26/28] target-ppc: Altivec 2.07: AES Instructions, Tom Musta, 2014/02/12
[Qemu-devel] [PATCH 27/28] target-ppc: Altivec 2.07: Vector SHA Sigma Instructions, Tom Musta, 2014/02/12
[Qemu-devel] [PATCH 28/28] target-ppc: Altivec 2.07: Vector Permute and Exclusive OR, Tom Musta, 2014/02/12
Re: [Qemu-devel] [PATCH 00/28] target-ppc: Altivec 2.07, Richard W.M. Jones, 2014/02/18