From: Richard Henderson <rth@twiddle.net>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: leon.alrae@imgtec.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/3] target-mips: Copy restrictions from ext/ins to dext/dins
Date: Mon, 3 Aug 2015 14:41:45 -0700 [thread overview]
Message-ID: <55BFE019.2080504@twiddle.net> (raw)
In-Reply-To: <20150803213128.GA19612@aurel32.net>
On 08/03/2015 02:31 PM, Aurelien Jarno wrote:
> On 2015-08-03 12:35, Richard Henderson wrote:
>> if (msb != 31) {
>> - tcg_gen_andi_tl(t0, t0, (1 << (msb + 1)) - 1);
>> + tcg_gen_andi_tl(t0, t0, (1U << (msb + 1)) - 1);
>
> Is this change really needed?
msb == 30 means 1 << 31. Which officially must be unsigned to be correct. If
we were to run under ubsan, this would trigger an error.
> Note that DEXT can't fail as both lsb and msb are in the range 0..31.
> DEXTU and DEXTM can.
...
> The same way DINSM can't fail.
Yes, I know. But it seems cleaner to do the checks always, unifying all of the
code.
> Should we try to get this one into 2.4, if not already too late?
Perhaps. Otherwise via stable after the fact.
r~
next prev parent reply other threads:[~2015-08-03 21:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 18:49 [Qemu-devel] [PATCH 0/3] target-mips fixes Richard Henderson
2015-08-03 18:49 ` [Qemu-devel] [PATCH 1/3] target-mips: Copy restrictions from ext/ins to dext/dins Richard Henderson
2015-08-03 19:29 ` Richard Henderson
2015-08-03 19:35 ` [Qemu-devel] [PATCH v2 " Richard Henderson
2015-08-03 21:31 ` Aurelien Jarno
2015-08-03 21:41 ` Richard Henderson [this message]
2015-08-03 22:09 ` Aurelien Jarno
2015-08-04 8:22 ` Leon Alrae
2015-08-04 10:49 ` Leon Alrae
2015-08-03 18:49 ` [Qemu-devel] [PATCH 2/3] target-mips: Stop translation after unconditional exceptions Richard Henderson
2015-08-03 21:31 ` Aurelien Jarno
2015-08-03 21:47 ` Richard Henderson
2015-08-03 18:49 ` [Qemu-devel] [PATCH 3/3] target-mips: Use CPU_LOG_INT for logging related to interrupts Richard Henderson
2015-08-03 21:31 ` Aurelien Jarno
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=55BFE019.2080504@twiddle.net \
--to=rth@twiddle.net \
--cc=aurelien@aurel32.net \
--cc=leon.alrae@imgtec.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.