Statistics
| Branch: | Revision:

root / target-mips / dsp_helper.c @ a8aec295

History | View | Annotate | Download (135.2 kB)

# Date Author Comment
d8992825 05/20/2013 07:16 pm Petar Jovanovic

target-mips: clean-up in BIT_INSV

This is a small follow-up change to "fix incorrect behaviour for INSV".

It includes two minor modifications:

- sizefilter is constant so it can be moved inside of the block,
- several lines of the code are replaced with a call to deposit64....

118d1e4f 05/19/2013 04:16 pm Petar Jovanovic

target-mips: set carry bit correctly in DSPControl register

First we need to clear the bit and then we set the given value.
Instruction ADDSC sets the bit and instruction ADDWC uses this bit.

Signed-off-by: Petar Jovanovic <>
Signed-off-by: Aurelien Jarno <>

0ba365f4 05/19/2013 04:10 pm Petar Jovanovic

target-mips: fix EXTPDP and setting up pos field in the DSPControl reg

This change makes sure that modifications of pos field in the DSPControl
register do not trash other bits in the register. This bug can be triggered
with the additional test case in mips32-dsp/extpdp.c in this commit....

489ed4bb 05/17/2013 08:29 pm Petar Jovanovic

target-mips: fix incorrect behaviour for EXTP

The mask for EXTP instruction when size=31 has not been correctly
calculated.

The test (mips32-dsp/extp.c) has been extended to include the case that
triggers the issue.

Signed-off-by: Petar Jovanovic <>...

c0f5f9ce 05/08/2013 07:46 pm Petar Jovanovic

target-mips: fix incorrect behaviour for INSV

Corner case for INSV instruction when size=32 has not been correctly
implemented. The mask for size should be one bit wider, and preparing the
filter variable should be aware of this case too.

The test for INSV has been extended to include the case that triggers the...

29851ee7 05/03/2013 12:50 pm Petar Jovanovic

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...

b1ca31d7 04/15/2013 05:07 pm Petar Jovanovic

target-mips: fix mipsdsp_mul_q15_q15 and tests for MAQ_SA_W_PHL/PHR

The operands for MAQ_SA_W.PHL/MAQ_SA_W.PHR must in specified format.
Otherwise, the results are unpredictable. Once the operands were corrected
in the tests (part of this change), a bug in mipsdsp_mul_q15_q15 became...

8b758d05 03/17/2013 02:06 am Petar Jovanovic

target-mips: fix rndrashift_short_acc and code for EXTR_ instructions

Fix for rndrashift_short_acc to set correct value to higher 64 bits.
This change also corrects conditions when bit 23 of the DSPControl register
is set.

The existing test files have been extended with several examples that...

084d0497 03/05/2013 12:58 pm Richard Henderson

mips-linux-user: Save and restore fpu and dsp from sigcontext

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

20c334a7 03/04/2013 07:15 pm Petar Jovanovic

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...

a345481b 02/23/2013 11:20 pm Petar Jovanovic

target-mips: fix for sign-issue in MULQ_W helper

Correct sign-propagation before multiplication in MULQ_W helper.
The change also fixes previously incorrect expected values in the
tests for MULQ_RS.W and MULQ_S.W.

Signed-off-by: Petar Jovanovic <>...

9c19eb1e 02/23/2013 11:20 pm Petar Jovanovic

target-mips: fix for incorrect multiplication with MULQ_S.PH

The change corrects sign-related issue with MULQ_S.PH. It also includes
extension to the already existing test which will trigger the issue.

Signed-off-by: Petar Jovanovic <>
Signed-off-by: Aurelien Jarno <>

df6126a7 02/01/2013 12:30 am Aurelien Jarno

target-mips: implement DSP (d)append sub-class with TCG

DSP instruction from the (d)append sub-class can be implemented with
TCG. Use a different function for these instructions are they are quite
different from compare-pick sub-class.

Fix BALIGN instruction for negative value, where the value should be...

0a16c79c 02/01/2013 12:30 am Aurelien Jarno

target-mips: use DSP unions for reduction add instructions

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

75d012ac 02/01/2013 12:29 am Aurelien Jarno

target-mips: use DSP unions for unary DSP operators

This allow to reduce the number of macros.

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

6de0e6c1 02/01/2013 12:29 am Aurelien Jarno

target-mips: use DSP unions for binary DSP operators

This allow to reduce the number of macros.

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

652613ab 02/01/2013 12:29 am Aurelien Jarno

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...

da1a4cef 01/08/2013 12:58 pm Petar Jovanovic

target-mips: Fix helper and tests for dot/cross-dot product instructions

Helper function for dpa_w_ph, dpax_w_ph, dps_w_ph and dpsx_w_ph incorrectly
defines halfword vector elements as unsigned values. This results in wrong
output which is not triggered in the tests as they also follow this logic....

fe65a1fa 01/01/2013 12:50 pm Dongxue Zhang

Fix my email address

Fix my email address, last time it's wrong.

Signed-off-by: Dongxue Zhang <>
Signed-off-by: Aurelien Jarno <>

b8abbbe8 01/01/2013 12:11 pm Petar Jovanovic

target-mips: Fix for helpers for EXTR_* instructions

The change removes some unnecessary and incorrect code for EXTR_S.H.
Further, it corrects the mask for shift value in the EXTR_ instructions. It also
extends the existing tests so they trigger the issues corrected with the change....

eec8972a 01/01/2013 12:10 pm Petar Jovanovic

target-mips: Fix incorrect reads and writes to DSPControl register

Upper 4 bits of ccond (bits 31..28 ) of DSPControl register are not used in
the MIPS32 architecture. They are used in the MIPS64 architecture. For MIPS32
these bits must be written as zero, and return zero on read....

19e6c50d 12/06/2012 09:12 am Petar Jovanovic

target-mips: Fix incorrect shift for SHILO and SHILOV

helper_shilo has not been shifting an accumulator value correctly for negative
values in 'shift' field. Minor optimization for shift=0 case.
This change also adds tests that will trigger issue and check for regressions....

34f5606e 12/06/2012 09:10 am Petar Jovanovic

target-mips: Fix incorrect code and test for INSV

Content of register rs should be shifted for pos before applying a mask.
This change contains both fix for the instruction and to the existing test.

Signed-off-by: Petar Jovanovic <>
Reviewed-by: Eric Johnson <>...

1cfd981f 11/05/2012 09:02 am Blue Swirl

target-mips: use ULL for 64 bit constants

Fix build on a 32 bit host:
CC mips-softmmu/target-mips/dsp_helper.o
/src/qemu/target-mips/dsp_helper.c: In function 'helper_dextr_rs_w':
/src/qemu/target-mips/dsp_helper.c:3556: error: integer constant is too large for 'long' type...

b53371ed 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP accumulator instructions

Add MIPS ASE DSP Accumulator and DSPControl Access instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

26690560 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP compare-pick instructions

Add MIPS ASE DSP Compare-Pick instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

a22260ae 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP multiply instructions

Add MIPS ASE DSP Multiply instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

1cb6686c 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP bit/manipulation instructions

Add MIPS ASE DSP Bit/Manipulation instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

77c5fa8b 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP GPR-based shift instructions

Add MIPS ASE DSP GPR-Based Shift instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

461c08df 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP arithmetic instructions

Add MIPS ASE DSP Arithmetic instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

235eb015 10/31/2012 09:24 pm Jia Liu

target-mips: Add ASE DSP internal functions

Add internal functions using by MIPS ASE DSP instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>