]> git.proxmox.com Git - qemu.git/commit
target-mips: fix mipsdsp_trunc16_sat16_round
authorPetar Jovanovic <petar.jovanovic@imgtec.com>
Sun, 30 Jun 2013 23:54:47 +0000 (01:54 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 28 Jul 2013 22:27:36 +0000 (00:27 +0200)
commitd36c231f4b7386bd8230aa17d362b925aa419b2f
tree49513570a018c658582d8fb24b88bb8487988489
parent05b3274b6bedb68ff78b76c642e17e97f3181c2f
target-mips: fix mipsdsp_trunc16_sat16_round

This change corrects rounding and saturation of Q31 fractional value in
mipsdsp_trunc16_sat16_round(). Overflow detection was incorrect for the
corner case for PRECRQ_RS.PH, and this test case is also part of the change.

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/precrq_rs_ph_w.c