Bug 371128

Summary: BCD add and subtract instructions on Power BE in 32-bit mode do not work.
Product: [Developer tools] valgrind Reporter: Carl Love <cel>
Component: vexAssignee: Julian Seward <jseward>
Status: CLOSED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.12 SVN   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Fix for bcd add subtract instruction on BE in 32-bit mode

Description Carl Love 2016-10-18 15:38:32 UTC
The bcd add and subtract instructions on BE when running in 32-bit mode do not work due to the use of 64-bit compares.  The 64-bit compare Iops are not supported in 32-bit mode.  The compares fortunately were for hex values.  So the 64-bit compares were changed to 32 bit compares with the appropriate changes to the type of the constants being compared.  Secondly, the clean helper call was not supported in 32-bit mode.  Note, 32-bit mode is not supported for little endian mode so this is only an issue for big endian mode.

Reproducible: Always
Comment 1 Carl Love 2016-10-18 15:59:24 UTC
Created attachment 101625 [details]
Fix for bcd add subtract instruction on BE in 32-bit mode

The patch has been added to the bugzilla.
The patch was committed upstream,  Vex commit 3271,  Valgrind commit 16072
Comment 2 Carl Love 2016-10-18 16:32:28 UTC
The source tree was pulled down into clean directories on my Power 7 and Power 8 BE machines and retested.  I checked the files to make sure the changes were there.  Everything looks good.  Closing the bug as fixed.