[PATCH 0/2] target/or1k: fix arithmetic edge cases

joel--- via qemu development posted 2 patches 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260429170519.2137725-1-joel@airwebreathe.org.uk
Maintainers: Stafford Horne <shorne@gmail.com>
target/or1k/translate.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
[PATCH 0/2] target/or1k: fix arithmetic edge cases
Posted by joel--- via qemu development 1 month ago
From: Joel Holdsworth <jholdsworth@nvidia.com>

This series fixes two bugs in the OpenRISC TCG translation:

 1. gen_div: INT_MIN / -1 causes undefined behavior (hardware exception
    on x86/ARM hosts)
 2. gen_mulu: uses signed multiply instead of unsigned, producing
    incorrect carry flags

Note: these patches are AI-generated submissions.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>

Joel Holdsworth (2):
  target/or1k: fix gen_mulu using signed multiply for unsigned operation
  target/or1k: fix gen_div INT_MIN / -1 undefined behavior

 target/or1k/translate.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

-- 
2.51.2
Re: [PATCH 0/2] target/or1k: fix arithmetic edge cases
Posted by Peter Maydell 1 month ago
On Wed, 29 Apr 2026 at 21:06, joel--- via qemu development
<qemu-devel@nongnu.org> wrote:
>
> From: Joel Holdsworth <jholdsworth@nvidia.com>
>
> This series fixes two bugs in the OpenRISC TCG translation:
>
>  1. gen_div: INT_MIN / -1 causes undefined behavior (hardware exception
>     on x86/ARM hosts)
>  2. gen_mulu: uses signed multiply instead of unsigned, producing
>     incorrect carry flags
>
> Note: these patches are AI-generated submissions.

Please read our policy on AI submissions:
https://www.qemu.org/docs/master/devel/code-provenance.html#use-of-ai-generated-content

thanks
-- PMM
Re: [PATCH 0/2] target/or1k: fix arithmetic edge cases
Posted by Philippe Mathieu-Daudé 1 month ago
On 29/4/26 19:03, joel@airwebreathe.org.uk wrote:
> From: Joel Holdsworth <jholdsworth@nvidia.com>
> 
> This series fixes two bugs in the OpenRISC TCG translation:
> 
>   1. gen_div: INT_MIN / -1 causes undefined behavior (hardware exception
>      on x86/ARM hosts)
>   2. gen_mulu: uses signed multiply instead of unsigned, producing
>      incorrect carry flags
> 
> Note: these patches are AI-generated submissions.

Someone (you?) should complete that with an AI-generated review.

> Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
> 
> Joel Holdsworth (2):
>    target/or1k: fix gen_mulu using signed multiply for unsigned operation
>    target/or1k: fix gen_div INT_MIN / -1 undefined behavior
> 
>   target/or1k/translate.c | 24 +++++++++++++++++++-----
>   1 file changed, 19 insertions(+), 5 deletions(-)
>