@@ -40,6 +40,7 @@ static const char * const std_opcodes[] = {
4040 [OP_SWR ] = "swr " ,
4141 [OP_LWC2 ] = "lwc2 " ,
4242 [OP_SWC2 ] = "swc2 " ,
43+ [OP_META_BIOS ] = "bios " ,
4344 [OP_META_MULT2 ] = "mult2 " ,
4445 [OP_META_MULTU2 ] = "multu2 " ,
4546 [OP_META_LWU ] = "lwu " ,
@@ -467,6 +468,10 @@ static int print_op(union code c, u32 pc, char *buf, size_t len,
467468 lightrec_reg_name (c .i .rt ),
468469 (s16 )c .i .imm ,
469470 lightrec_reg_name (c .i .rs ));
471+ case OP_META_BIOS :
472+ return snprintf (buf , len , "%s0x%x" ,
473+ std_opcodes [c .i .op ],
474+ c .opcode & 0x03ffffff );
470475 case OP_META :
471476 return snprintf (buf , len , "%s%s,%s" ,
472477 meta_opcodes [c .m .op ],
@@ -492,7 +497,7 @@ void lightrec_print_disassembly(const struct block *block, const u32 *code_ptr)
492497 const char * const * flags_ptr ;
493498 size_t nb_flags , count , count2 ;
494499 char buf [256 ], buf2 [256 ], buf3 [256 ];
495- unsigned int i ;
500+ unsigned int i , nb_spaces1 , nb_spaces2 ;
496501 u32 pc , branch_pc , code ;
497502 bool is_io ;
498503
@@ -518,7 +523,10 @@ void lightrec_print_disassembly(const struct block *block, const u32 *code_ptr)
518523
519524 print_flags (buf3 , sizeof (buf3 ), op , flags_ptr , nb_flags , is_io );
520525
526+ nb_spaces1 = (* buf2 || * buf3 ) ? 30 - (int )count : 0 ;
527+ nb_spaces2 = * buf3 ? 30 - (int )count2 : 0 ;
528+
521529 printf (X32_FMT " (0x%x)\t%s%*c%s%*c%s\n" , pc , i << 2 ,
522- buf , 30 - ( int ) count , ' ' , buf2 , 30 - ( int ) count2 , ' ' , buf3 );
530+ buf , nb_spaces1 , ' ' , buf2 , nb_spaces2 , ' ' , buf3 );
523531 }
524532}
0 commit comments