Bug 362894

Summary: missing (broken) support for wbit field on mtfsfi instruction (ppc64)
Product: [Developer tools] valgrind Reporter: Will Schmidt <will_schmidt>
Component: vexAssignee: Julian Seward <jseward>
Status: CLOSED FIXED    
Severity: normal CC: cel, will_schmidt
Priority: NOR    
Version: 3.12 SVN   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: proposed patch

Description Will Schmidt 2016-05-10 14:36:21 UTC
(ppc64)
Support for the mtfsfi instruction when the Wbit is non-zero is failing.

Test -
int main()
{
	asm ("mtfsfi 7,0,1");
	return 0;
}

$ valgrind ./test
<...>
==64881== 
dis_fp_scr(ppc)(instr,mtfsfi)
disInstr(ppc): unhandled instruction: 0xFF81010C
                 primary 63(0x3F), secondary 268(0x10C)
dis_fp_scr(ppc)(instr,mtfsfi)
disInstr(ppc): unhandled instruction: 0xFF81010C
                 primary 63(0x3F), secondary 268(0x10C)
dis_fp_scr(ppc)(instr,mtfsfi)
disInstr(ppc): unhandled instruction: 0xFF81010C
                 primary 63(0x3F), secondary 268(0x10C)



Reproducible: Always

Steps to Reproduce:
1.  Compile simple test containing "mtfsfi   7,0,1 ".
2.  Run under valgrind.
3.
Comment 1 Will Schmidt 2016-05-10 14:37:44 UTC
Created attachment 98878 [details]
proposed patch

Proposed patch.  tested locally with success.
Comment 2 Carl Love 2016-06-13 17:23:20 UTC
Will, I reveiwed the patch and tested it.  It looks fine.  I will proceed with committing it.

Changing status
Comment 3 Carl Love 2016-06-13 17:31:51 UTC
VEX commit 3221, updates VEX/priv/guest_ppc_toIR.c
valgrind commit, 15892, updates the NEWS file.
Comment 4 Will Schmidt 2016-06-21 16:03:09 UTC
tested with a clean upstream valgrind/vex tree, looks good. 
Thanks, 
-Will