qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/1] tricore: fixed faulty conditions for extr and imask


From: Bastian Koppelmann
Subject: Re: [PATCH v2 1/1] tricore: fixed faulty conditions for extr and imask
Date: Fri, 5 Mar 2021 13:43:21 +0100

On Thu, Feb 11, 2021 at 01:49:14PM +0000, Konopik, Andreas (EFS-GH2) wrote:
> Hi Philippe,
> 
> > From: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> On
> > Behalf Of Philippe Mathieu-Daudé
> > Sent: Thursday, February 11, 2021 13:10
> > Hi David and Andreas,
> > 
> > On 2/11/21 12:53 PM, David Brenken wrote:
> > > From: Andreas Konopik <andreas.konopik@efs-auto.de>
> > 
> > Here is a good place to explain why you need this change, how did you
> > noticed it (example of opcode and conditions reaching this issue) - 
> > eventually
> > provide a reproducer (asm dump could be enough) - and also eventually a
> > reference to the manual (chapter, table) justifying your change.
> > 
> > See also:
> > https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
> > https://chris.beams.io/posts/git-commit/#why-not-how
> 
> I appreciate your feedback and will write more verbose commit messages in
> the future.
> 
> According to the TC 1.3.1. Architecture Manual [1; page 174], results are
> undefined, if pos + width > 32 or if width = 0.

While editing the commit message of this patch, I realized that we are not
checking for width=0. A quick test let to:

qemu-system-tricore: ../upstream/tcg/tcg-op.c:217: tcg_gen_sari_i32: Assertion 
`arg2 >= 0 && arg2 < 32' failed.

As Richard suggested that is not what should happen in case of undefined 
behaviour.
I'll fix this in a another patch.

Cheers,
Bastian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]