Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String bstmp = "" ;
- long BRANCH = 0x05 ; // for bits 27-25
- long BRANCHX = 0x12FFF1 ; // for bits 27-4
- long COPRODAX = 0x6 ; // for bits 27-25
- long COPRODAOP = 0xE ; // for bits 27-24 with bit 4 = 0
- long COPROREGX = 0xE ; // for bits 27-24 with bit 4 = 1
- long SWT = 0xF ; // for bits 27-24
- long LOADSTOREM = 0x4 ; //for bits 27-25
- long LOADSTOREB = 0x1 ; //for bits 27-26
- long DATAPROC = 0x01 ; // for bits 27-25
- byte tmp25_27[] = getBits( insr , 25 , 27 ) ;
- bstmp = toBitString( tmp25_27 );
- long bval = Integer.valueOf(bstmp, 2) ;
- if( bval == DATAPROC )
- return "DATAPROC" ;
- if( bval == BRANCH )
- return "BRANCH" ;
- if( bval == COPRODAX )
- return "COPRODAX" ;
- if( bval == LOADSTOREM )
- return "LOADSTOREM" ;
- bstmp = "" ;
- byte tmp24_27[] = getBits( insr , 24 , 27 ) ;
- bstmp = toBitString( tmp24_27 );
- bval = Integer.valueOf(bstmp, 2) ;
- if( bval == SWT )
- return "SWT" ;
- if( bval == COPRODAOP && (insr & 0x10) == 0 )
- return "COPRODAOP" ;
- if( bval == COPROREGX && (insr & 0x10) == 1 )
- return "COPROREGX" ;
- bstmp = "" ;
- byte tmp26_27[] = new byte[2] ;
- tmp26_27[0] = tmp25_27[1] ;
- tmp26_27[1] = tmp25_27[2] ;
- bstmp = toBitString( tmp26_27 );
- bval = Integer.valueOf(bstmp, 2) ;
- if( bval == LOADSTOREB )
- return "LOADSTOREB" ;
- System.out.println( bval );
- byte tmp4_27[] = getBits( insr , 4 , 27 ) ;
- bstmp = toBitString( tmp4_27 );
- bval = Integer.valueOf(bstmp, 2) ;
- if( bval == BRANCHX )
- return "BRANCHX" ;
- //000
- byte tmp20_27[] = getBits( insr , 20 , 27 ) ;
- byte tmp4_7[] = getBits( insr , 4 , 7 ) ;
- bstmp = toBitString( tmp4_7 );
- bval = Integer.valueOf(bstmp, 2) ;
- if( tmp20_27[5] == 1 && (bval == 0x09) )
- return "SWAP" ;
- if( tmp20_27[4] == 1 && (bval == 0x09) )
- return "LONGMULT" ;
- if( (tmp20_27[3] == 0) && (bval == 0x09) )
- return "MULT" ;
- //Now have to distingish between
- // halfword transfer stuff !!!
- // then i be complete!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement