]> git.proxmox.com Git - qemu.git/commit - target-mips/dsp_helper.c
target-mips: fix calculation of overflow for SHLL.PH and SHLL.QB
authorPetar Jovanovic <petar.jovanovic@imgtec.com>
Sun, 28 Apr 2013 01:18:36 +0000 (03:18 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 3 May 2013 09:50:49 +0000 (11:50 +0200)
commit29851ee7c8bd3fb8542e21cd0270c73132590350
treee046e54284c3d18bce7f363c670cecb0f01a72a6
parent8ca27ce2e1150486ea2db4116a03706b28294f16
target-mips: fix calculation of overflow for SHLL.PH and SHLL.QB

This change corrects and simplifies how discard is calculated for shift
left logical vector instructions. It is used to detect overflow and set bit
22 in the DSPControl register.

The existing tests (shll_ph.c, shll_qb.c) are extended with the corner cases
that expose incorrectness in the previous implementation.

Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips/dsp_helper.c
tests/tcg/mips/mips32-dsp/shll_ph.c
tests/tcg/mips/mips32-dsp/shll_qb.c