Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. String bstmp = "" ;
  2. long BRANCH = 0x05 ; // for bits 27-25
  3. long BRANCHX = 0x12FFF1 ; // for bits 27-4
  4. long COPRODAX = 0x6 ; // for bits 27-25
  5. long COPRODAOP = 0xE ; // for bits 27-24 with bit 4 = 0
  6. long COPROREGX = 0xE ; // for bits 27-24 with bit 4 = 1
  7. long SWT = 0xF ; // for bits 27-24
  8. long LOADSTOREM = 0x4 ; //for bits 27-25
  9. long LOADSTOREB = 0x1 ; //for bits 27-26
  10. long DATAPROC = 0x01 ; // for bits 27-25
  11.  
  12. byte tmp25_27[] = getBits( insr , 25 , 27 ) ;
  13. bstmp = toBitString( tmp25_27 );
  14. long bval = Integer.valueOf(bstmp, 2) ;
  15.  
  16. if( bval == DATAPROC )
  17. return "DATAPROC" ;
  18.  
  19. if( bval == BRANCH )
  20. return "BRANCH" ;
  21.  
  22. if( bval == COPRODAX )
  23. return "COPRODAX" ;
  24.  
  25. if( bval == LOADSTOREM )
  26. return "LOADSTOREM" ;
  27.  
  28.  
  29. bstmp = "" ;
  30. byte tmp24_27[] = getBits( insr , 24 , 27 ) ;
  31. bstmp = toBitString( tmp24_27 );
  32. bval = Integer.valueOf(bstmp, 2) ;
  33.  
  34. if( bval == SWT )
  35. return "SWT" ;
  36.  
  37. if( bval == COPRODAOP && (insr & 0x10) == 0 )
  38. return "COPRODAOP" ;
  39.  
  40. if( bval == COPROREGX && (insr & 0x10) == 1 )
  41. return "COPROREGX" ;
  42.  
  43. bstmp = "" ;
  44. byte tmp26_27[] = new byte[2] ;
  45. tmp26_27[0] = tmp25_27[1] ;
  46. tmp26_27[1] = tmp25_27[2] ;
  47. bstmp = toBitString( tmp26_27 );
  48. bval = Integer.valueOf(bstmp, 2) ;
  49.  
  50. if( bval == LOADSTOREB )
  51. return "LOADSTOREB" ;
  52.  
  53. System.out.println( bval );
  54.  
  55. byte tmp4_27[] = getBits( insr , 4 , 27 ) ;
  56. bstmp = toBitString( tmp4_27 );
  57. bval = Integer.valueOf(bstmp, 2) ;
  58.  
  59. if( bval == BRANCHX )
  60. return "BRANCHX" ;
  61.  
  62. //000
  63. byte tmp20_27[] = getBits( insr , 20 , 27 ) ;
  64. byte tmp4_7[] = getBits( insr , 4 , 7 ) ;
  65. bstmp = toBitString( tmp4_7 );
  66. bval = Integer.valueOf(bstmp, 2) ;
  67.  
  68.  
  69. if( tmp20_27[5] == 1 && (bval == 0x09) )
  70. return "SWAP" ;
  71.  
  72. if( tmp20_27[4] == 1 && (bval == 0x09) )
  73. return "LONGMULT" ;
  74.  
  75. if( (tmp20_27[3] == 0) && (bval == 0x09) )
  76. return "MULT" ;
  77.  
  78. //Now have to distingish between
  79. // halfword transfer stuff !!!
  80. // then i be complete!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement