qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Markovic <smarkovic@wavecomp.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL v4 29/46] target/mips: Add emulation of DSP ASE for nanoMIPS - part 1
Date: Tue, 16 Oct 2018 16:22:25 +0200	[thread overview]
Message-ID: <ef130dd3-ad83-d34d-60fb-c89de39ff97e@wavecomp.com> (raw)
In-Reply-To: <CAFEAcA_aMAn5fND1U32q4u8Lf7P6OOVHG0EKUHeLsH7MmsTxkw@mail.gmail.com>


On 16.10.18. 16:00, Peter Maydell wrote:
> On 23 August 2018 at 14:34, Aleksandar Markovic
> <aleksandar.markovic@rt-rk.com> wrote:
>> From: Stefan Markovic <smarkovic@wavecomp.com>
>>
>> Add emulation of DSP ASE instructions for nanoMIPS - part 1.
>>
>> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
>> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
>> Signed-off-by: Stefan Markovic <smarkovic@wavecomp.com>
> Hi. Coverity points out a bug in this patch (CID 1395627):
>
>> ---
>>   target/mips/translate.c | 554 ++++++++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 554 insertions(+)
>>
>> diff --git a/target/mips/translate.c b/target/mips/translate.c
>> index 95632dd..d3635e7 100644
>> --- a/target/mips/translate.c
>> +++ b/target/mips/translate.c
>> @@ -18061,6 +18061,554 @@ static void gen_pool32f_nanomips_insn(DisasContext *ctx)
>>       }
>>   }
>>
>> +static void gen_pool32a5_nanomips_insn(DisasContext *ctx, int opc,
>> +                                       int rd, int rs, int rt)
>> +{
> [...]
>
>> +    case NM_SHRA_R_PH:
>> +        check_dsp(ctx);
>> +        tcg_gen_movi_tl(t0, rd >> 1);
>> +        switch (extract32(ctx->opcode, 10, 1)) {
>> +        case 0:
>> +            /* SHRA_PH */
>> +            gen_helper_shra_ph(v1_t, t0, v1_t);
>> +            break;
>> +            gen_store_gpr(v1_t, rt);
> This gen_store_gpr() call is unreachable because it
> is after the 'break'. Should the two lines be in the
> other order?


Yes, those two lines should be in the other order:

+        case 0:
+            /* SHRA_PH */
+            gen_helper_shra_ph(v1_t, t0, v1_t);
+            gen_store_gpr(v1_t, rt);
+            break;


>> +        case 1:
>> +            /* SHRA_R_PH */
>> +            gen_helper_shra_r_ph(v1_t, t0, v1_t);
>> +            gen_store_gpr(v1_t, rt);
>> +            break;
>> +        }
>> +        break;
> thanks
> -- PMM

  reply	other threads:[~2018-10-16 14:22 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23 13:33 [Qemu-devel] [PULL v4 00/46] MIPS queue August 2018 v4 Aleksandar Markovic
2018-08-23 13:33 ` [Qemu-devel] [PULL v4 01/46] target/mips: Add preprocessor constants for nanoMIPS Aleksandar Markovic
2018-08-23 13:33 ` [Qemu-devel] [PULL v4 02/46] target/mips: Add nanoMIPS base instruction set opcodes Aleksandar Markovic
2018-08-23 13:33 ` [Qemu-devel] [PULL v4 03/46] target/mips: Add nanoMIPS DSP ASE opcodes Aleksandar Markovic
2018-08-23 13:33 ` [Qemu-devel] [PULL v4 04/46] target/mips: Prevent switching mode related to Config3 ISA bit for nanoMIPS Aleksandar Markovic
2018-08-23 13:33 ` [Qemu-devel] [PULL v4 05/46] target/mips: Add placeholder and invocation of decode_nanomips_opc() Aleksandar Markovic
2018-08-23 13:33 ` [Qemu-devel] [PULL v4 06/46] target/mips: Add nanoMIPS decoding and extraction utilities Aleksandar Markovic
2018-08-23 13:33 ` [Qemu-devel] [PULL v4 07/46] target/mips: Add emulation of nanoMIPS 16-bit arithmetic instructions Aleksandar Markovic
2018-08-23 13:33 ` [Qemu-devel] [PULL v4 08/46] target/mips: Add emulation of nanoMIPS 16-bit branch instructions Aleksandar Markovic
2018-08-23 13:33 ` [Qemu-devel] [PULL v4 09/46] target/mips: Add emulation of nanoMIPS 16-bit shift instructions Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 10/46] target/mips: Add emulation of nanoMIPS 16-bit misc instructions Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 11/46] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 12/46] target/mips: Add emulation of nanoMIPS 16-bit logic instructions Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 13/46] target/mips: Add emulation of nanoMIPS 16-bit save and restore instructions Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 14/46] target/mips: Add emulation of some common nanoMIPS 32-bit instructions Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 15/46] target/mips: Add emulation of nanoMIPS instructions MOVE.P and MOVE.PREV Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 16/46] target/mips: Add emulation of nanoMIPS 48-bit instructions Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 17/46] target/mips: Add emulation of nanoMIPS FP instructions Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 18/46] target/mips: Add emulation of misc nanoMIPS instructions (pool32a0) Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 19/46] target/mips: Add emulation of misc nanoMIPS instructions (pool32axf) Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 20/46] target/mips: Add emulation of misc nanoMIPS instructions (p_lsx) Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 21/46] target/mips: Implement emulation of nanoMIPS ROTX instruction Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 22/46] target/mips: Implement emulation of nanoMIPS EXTW instruction Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 23/46] target/mips: Add emulation of nanoMIPS 32-bit load and store instructions Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 24/46] target/mips: Add CP0 Config3 and Config5 fields to DisasContext structure Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 25/46] target/mips: Implement emulation of nanoMIPS LLWP/SCWP pair Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 26/46] target/mips: Add emulation of nanoMIPS 32-bit branch instructions Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 27/46] target/mips: Fix pre-nanoMIPS MT ASE instructions availability control Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 28/46] target/mips: Implement MT ASE support for nanoMIPS Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 29/46] target/mips: Add emulation of DSP ASE for nanoMIPS - part 1 Aleksandar Markovic
2018-10-16 14:00   ` Peter Maydell
2018-10-16 14:22     ` Stefan Markovic [this message]
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 30/46] target/mips: Add emulation of DSP ASE for nanoMIPS - part 2 Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 31/46] target/mips: Add emulation of DSP ASE for nanoMIPS - part 3 Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 32/46] target/mips: Add emulation of DSP ASE for nanoMIPS - part 4 Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 33/46] target/mips: Add emulation of DSP ASE for nanoMIPS - part 5 Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 34/46] target/mips: Add emulation of DSP ASE for nanoMIPS - part 6 Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 35/46] target/mips: Add availability control via bit NMS Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 36/46] disas: Add support for nanoMIPS platform Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 37/46] target/mips: Add updating BadInstr and BadInstrX for nanoMIPS Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 38/46] target/mips: Fix ERET/ERETNC behavior related to ADEL exception Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 39/46] elf: Add EM_NANOMIPS value as a valid one for e_machine field Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 40/46] elf: Relax MIPS' elf_check_arch() to accept EM_NANOMIPS too Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 41/46] elf: On elf loading, treat both EM_MIPS and EM_NANOMIPS as legal for MIPS Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 42/46] elf: Don't check FCR31_NAN2008 bit for nanoMIPS Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 43/46] mips_malta: Add basic nanoMIPS boot code for Malta board Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 44/46] mips_malta: Add setting up GT64120 BARs to the nanoMIPS bootloader Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 45/46] mips_malta: Fix semihosting argument passing for nanoMIPS bare metal Aleksandar Markovic
2018-08-23 13:34 ` [Qemu-devel] [PULL v4 46/46] target/mips: Add definition of nanoMIPS I7200 CPU Aleksandar Markovic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef130dd3-ad83-d34d-60fb-c89de39ff97e@wavecomp.com \
    --to=smarkovic@wavecomp.com \
    --cc=aleksandar.markovic@rt-rk.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).