target-ppc: Refactor AES Instructions
commitc15424531f2406cf5ad9f02d35204fac98601696
authorTom Musta <tommusta@gmail.com>
Thu, 13 Mar 2014 14:13:30 +0000 (13 09:13 -0500)
committerAlexander Graf <agraf@suse.de>
Mon, 16 Jun 2014 11:24:33 +0000 (16 13:24 +0200)
treed0e332d0baa91d48346b8fbe912f42e7e0b36127
parent59dcd29a6c4f89e946fd320539afbfc1859e826e
target-ppc: Refactor AES Instructions

This patch refactors the PowerPC Advanced Encryption Standard (AES) instructions
to use the common AES tables (include/qemu/aes.h).

Specifically:
    - vsbox is recoded to use the AES_sbox table.
    - vcipher, vcipherlast and vncipherlast are all recoded to use the optimized
      AES_t[ed][0-4] tables.
    - vncipher is recoded to use a combination of InvS-Box, InvShiftRows and
      InvMixColumns tables.  It was not possible to use AES_Td[0-4] due to a
      slight difference in how PowerPC implements vncipher.

Signed-off-by: Tom Musta <tommusta@gmail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/int_helper.c