|
Mark Wielaard |
de7a08 |
diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c
|
|
Mark Wielaard |
de7a08 |
index c9c058a7a..d726d63de 100644
|
|
Mark Wielaard |
de7a08 |
--- a/VEX/priv/guest_ppc_toIR.c
|
|
Mark Wielaard |
de7a08 |
+++ b/VEX/priv/guest_ppc_toIR.c
|
|
Mark Wielaard |
de7a08 |
@@ -25671,49 +25671,29 @@ dis_vx_store ( UInt prefix, UInt theInstr )
|
|
Mark Wielaard |
de7a08 |
|
|
Mark Wielaard |
de7a08 |
case 0x38D: // stxsibx
|
|
Mark Wielaard |
de7a08 |
{
|
|
Mark Wielaard |
de7a08 |
- IRExpr *stored_word;
|
|
Mark Wielaard |
de7a08 |
- IRTemp byte_to_store = newTemp( Ity_I64 );
|
|
Mark Wielaard |
de7a08 |
+ IRTemp byte_to_store = newTemp( Ity_I8 );
|
|
Mark Wielaard |
de7a08 |
|
|
Mark Wielaard |
de7a08 |
DIP("stxsibx %u,r%u,r%u\n", (UInt)XS, rA_addr, rB_addr);
|
|
Mark Wielaard |
de7a08 |
|
|
Mark Wielaard |
de7a08 |
- /* Can't store just a byte, need to fetch the word at EA merge data
|
|
Mark Wielaard |
de7a08 |
- * and store.
|
|
Mark Wielaard |
de7a08 |
- */
|
|
Mark Wielaard |
de7a08 |
- stored_word = load( Ity_I64, mkexpr( EA ) );
|
|
Mark Wielaard |
de7a08 |
- assign( byte_to_store, binop( Iop_And64,
|
|
Mark Wielaard |
de7a08 |
+ assign( byte_to_store, unop( Iop_64to8,
|
|
Mark Wielaard |
de7a08 |
unop( Iop_V128HIto64,
|
|
Mark Wielaard |
de7a08 |
- mkexpr( vS ) ),
|
|
Mark Wielaard |
de7a08 |
- mkU64( 0xFF ) ) );
|
|
Mark Wielaard |
de7a08 |
+ mkexpr( vS ) ) ) );
|
|
Mark Wielaard |
de7a08 |
|
|
Mark Wielaard |
de7a08 |
- store( mkexpr( EA ), binop( Iop_Or64,
|
|
Mark Wielaard |
de7a08 |
- binop( Iop_And64,
|
|
Mark Wielaard |
de7a08 |
- stored_word,
|
|
Mark Wielaard |
de7a08 |
- mkU64( 0xFFFFFFFFFFFFFF00 ) ),
|
|
Mark Wielaard |
de7a08 |
- mkexpr( byte_to_store ) ) );
|
|
Mark Wielaard |
de7a08 |
+ store( mkexpr( EA ), mkexpr( byte_to_store ) );
|
|
Mark Wielaard |
de7a08 |
break;
|
|
Mark Wielaard |
de7a08 |
}
|
|
Mark Wielaard |
de7a08 |
|
|
Mark Wielaard |
de7a08 |
case 0x3AD: // stxsihx
|
|
Mark Wielaard |
de7a08 |
{
|
|
Mark Wielaard |
de7a08 |
- IRExpr *stored_word;
|
|
Mark Wielaard |
de7a08 |
- IRTemp byte_to_store = newTemp( Ity_I64 );
|
|
Mark Wielaard |
de7a08 |
+ IRTemp hword_to_store = newTemp( Ity_I16 );
|
|
Mark Wielaard |
de7a08 |
|
|
Mark Wielaard |
de7a08 |
DIP("stxsihx %u,r%u,r%u\n", (UInt)XS, rA_addr, rB_addr);
|
|
Mark Wielaard |
de7a08 |
|
|
Mark Wielaard |
de7a08 |
- /* Can't store just a halfword, need to fetch the word at EA merge data
|
|
Mark Wielaard |
de7a08 |
- * and store.
|
|
Mark Wielaard |
de7a08 |
- */
|
|
Mark Wielaard |
de7a08 |
- stored_word = load( Ity_I64, mkexpr( EA ) );
|
|
Mark Wielaard |
de7a08 |
- assign( byte_to_store, binop( Iop_And64,
|
|
Mark Wielaard |
de7a08 |
- unop( Iop_V128HIto64,
|
|
Mark Wielaard |
de7a08 |
- mkexpr( vS ) ),
|
|
Mark Wielaard |
de7a08 |
- mkU64( 0xFFFF ) ) );
|
|
Mark Wielaard |
de7a08 |
+ assign( hword_to_store, unop( Iop_64to16,
|
|
Mark Wielaard |
de7a08 |
+ unop( Iop_V128HIto64,
|
|
Mark Wielaard |
de7a08 |
+ mkexpr( vS ) ) ) );
|
|
Mark Wielaard |
de7a08 |
|
|
Mark Wielaard |
de7a08 |
- store( mkexpr( EA ), binop( Iop_Or64,
|
|
Mark Wielaard |
de7a08 |
- binop( Iop_And64,
|
|
Mark Wielaard |
de7a08 |
- stored_word,
|
|
Mark Wielaard |
de7a08 |
- mkU64( 0xFFFFFFFFFFFF0000 ) ),
|
|
Mark Wielaard |
de7a08 |
- mkexpr( byte_to_store ) ) );
|
|
Mark Wielaard |
de7a08 |
+ store( mkexpr( EA ), mkexpr( hword_to_store ) );
|
|
Mark Wielaard |
de7a08 |
break;
|
|
Mark Wielaard |
de7a08 |
}
|
|
Mark Wielaard |
de7a08 |
|