valgrind/valgrind-3.16.1-stxsibx-stxsihx.patch
DistroBaker 7e3e7c8253 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/valgrind.git#de7a086ef34c1316e53d4565406be8a818b47751
2020-12-13 23:58:26 +00:00

64 lines
2.4 KiB
Diff

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