File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -141,8 +141,17 @@ void print_insn_detail_ppc(csh handle, cs_insn *ins)
141141 printf ("\tBranch:\n" );
142142 printf ("\t\tbi: %u\n" , ppc -> bc .bi );
143143 printf ("\t\tbo: %u\n" , ppc -> bc .bo );
144- if (ppc -> bc .bh != PPC_BH_INVALID )
145- printf ("\t\tbh: %u\n" , ppc -> bc .bh );
144+ if (ppc -> bc .bh != PPC_BH_INVALID ) {
145+ int bh = -1 ;
146+ switch (ppc -> bc .bh ) {
147+ case PPC_BH_SUBROUTINE_RET : bh = 0 ; break ;
148+ case PPC_BH_NO_SUBROUTINE_RET : bh = 1 ; break ;
149+ case PPC_BH_NOT_PREDICTABLE : bh = 3 ; break ;
150+ case PPC_BH_RESERVED : bh = 2 ; break ;
151+ case PPC_BH_INVALID : break ;
152+ }
153+ printf ("\t\tbh: %u\n" , bh );
154+ }
146155 if (ppc -> bc .pred_cr != PPC_PRED_INVALID ) {
147156 printf ("\t\tcrX: %s\n" , cs_reg_name (handle , ppc -> bc .crX ));
148157 printf ("\t\tpred CR-bit: %s\n" , get_pred_name (ppc -> bc .pred_cr ));
You can’t perform that action at this time.
0 commit comments