Bug 432861

Summary: PPC modsw and modsd give incorrect results for 1 mod 12
Product: [Developer tools] valgrind Reporter: Carl Love <cel>
Component: vexAssignee: Julian Seward <jseward>
Status: CLOSED FIXED    
Severity: normal CC: will_schmidt
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch to fix the modsw and modsd instructions

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