Bug 432861 - PPC modsw and modsd give incorrect results for 1 mod 12
Summary: PPC modsw and modsd give incorrect results for 1 mod 12
Status: CLOSED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: vex (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-12 16:04 UTC by Carl Love
Modified: 2021-02-12 17:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch to fix the modsw and modsd instructions (35.81 KB, patch)
2021-02-12 16:21 UTC, Carl Love
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Love 2021-02-12 16:04:16 UTC
The result of 1 mod 12 should be 1.  Valgrind is giving 0 for modsw and modsd
Comment 1 Carl Love 2021-02-12 16:21:52 UTC
Created attachment 135639 [details]
Patch to fix the modsw and modsd instructions

The patch has the fix for the modsw and modsd instructions.  Also adds a testcase for the signed, unsigned versions of the mod instruction for both word and long types.
Comment 2 Carl Love 2021-02-12 17:41:16 UTC
Patch committed, closing bug

commit b4eff82004077b5628e9c0958121fe6156c29664 (origin/master, origin/HEAD)
Author: Carl Love <cel@us.ibm.com>
Date:   Wed Feb 10 21:04:22 2021 -0600

    PPC, modsw and modsd instruction fix