]> git.proxmox.com Git - qemu.git/commit - target-mips/dsp_helper.c
target-mips: add unions to access DSP elements
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 1 Jan 2013 17:02:23 +0000 (18:02 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 31 Jan 2013 22:29:38 +0000 (23:29 +0100)
commit652613ab5ae4559b481c612010b407e1c2216f36
tree5e36f1dc2590876c2b688dce7a18c15ea1b6ce90
parentad153f153da08f5e08bc8e433c0070af53e34e0a
target-mips: add unions to access DSP elements

Instead of playing with bit shifting, add two unions (one for 32-bit
values, one for 64-bit ones) to access all the DSP elements with the
correct type.

This make the code easier to read and less error prone, and allow GCC
to vectorize the code in some cases.

Reviewed-by: Eric Johnson <ericj@mips.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips/dsp_helper.c