target-mips: fix DSP overflow macro and affected routines
commit20c334a797bf46a4ee59a6e42be6d5e7c3cda585
authorPetar Jovanovic <petar.jovanovic@imgtec.com>
Mon, 25 Feb 2013 15:45:40 +0000 (25 16:45 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Mon, 4 Mar 2013 17:15:34 +0000 (4 18:15 +0100)
treebd6332ea17f9c46696842a252a3e2e3e6e693cb6
parent71df81afc618da79008a7071a666cf97b62e1237
target-mips: fix DSP overflow macro and affected routines

The previous implementation incorrectly used same macro to detect overflow
for addition and subtraction. This patch makes distinction between these
two, and creates separate macros. The affected routines are changed
accordingly.

This change also includes additions to the existing tests for SUBQ_S_PH and
SUBQ_S_W that would trigger the fixed issue, and it removes dead code from
the test file. The last test case in subq_s_w.c is a bug found/reported/
isolated by Klaus Peichl from Dolby.

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/subq_s_ph.c
tests/tcg/mips/mips32-dsp/subq_s_w.c