@@ -932,7 +932,7 @@ static void xed_print_insn(const xed_decoded_inst_t *inst, uint64_t ip,
932
932
printf (" %s" , buffer );
933
933
}
934
934
935
- static void print_insn (const struct pt_insn * insn , xed_state_t * xed ,
935
+ static void print_insn (const struct pt_insn * insn ,
936
936
const struct ptxed_options * options , uint64_t offset ,
937
937
uint64_t time )
938
938
{
@@ -956,11 +956,11 @@ static void print_insn(const struct pt_insn *insn, xed_state_t *xed,
956
956
xed_machine_mode_enum_t mode ;
957
957
xed_decoded_inst_t inst ;
958
958
xed_error_enum_t errcode ;
959
+ xed_state_t xed ;
959
960
960
961
mode = translate_mode (insn -> mode );
961
-
962
- xed_state_set_machine_mode (xed , mode );
963
- xed_decoded_inst_zero_set_mode (& inst , xed );
962
+ xed_state_init2 (& xed , mode , XED_ADDRESS_WIDTH_INVALID );
963
+ xed_decoded_inst_zero_set_mode (& inst , & xed );
964
964
965
965
errcode = xed_decode (& inst , insn -> raw , insn -> size );
966
966
switch (errcode ) {
@@ -1519,16 +1519,13 @@ static void decode_insn(struct ptxed_decoder *decoder,
1519
1519
struct ptxed_stats * stats )
1520
1520
{
1521
1521
struct pt_insn_decoder * ptdec ;
1522
- xed_state_t xed ;
1523
1522
uint64_t offset , sync , time ;
1524
1523
1525
1524
if (!decoder || !options ) {
1526
1525
printf ("[internal error]\n" );
1527
1526
return ;
1528
1527
}
1529
1528
1530
- xed_state_zero (& xed );
1531
-
1532
1529
ptdec = decoder -> variant .insn ;
1533
1530
offset = 0ull ;
1534
1531
sync = 0ull ;
@@ -1597,7 +1594,7 @@ static void decode_insn(struct ptxed_decoder *decoder,
1597
1594
#endif
1598
1595
{
1599
1596
if (!options -> quiet )
1600
- print_insn (& insn , & xed , options ,
1597
+ print_insn (& insn , options ,
1601
1598
offset , time );
1602
1599
if (stats )
1603
1600
stats -> insn += 1 ;
@@ -1609,7 +1606,7 @@ static void decode_insn(struct ptxed_decoder *decoder,
1609
1606
}
1610
1607
1611
1608
if (!options -> quiet )
1612
- print_insn (& insn , & xed , options , offset , time );
1609
+ print_insn (& insn , options , offset , time );
1613
1610
1614
1611
if (stats )
1615
1612
stats -> insn += 1 ;
0 commit comments