@@ -865,6 +865,17 @@ static ut32 tb(ArmOp *op) {
865865 } else {
866866 return UT32_MAX ;
867867 }
868+ if (reg64_imm ) {
869+ if (op -> operands [1 ].immediate > 0x3f ) {
870+ R_LOG_ERROR ("Bit to be tested must be in range 0-63 for %s" , op -> mnemonic );
871+ return UT32_MAX ;
872+ }
873+ } else if (reg32_imm ) {
874+ if (op -> operands [1 ].immediate > 0x1f ) {
875+ R_LOG_ERROR ("Bit to be tested must be in range 0-31 for %s" , op -> mnemonic );
876+ return UT32_MAX ;
877+ }
878+ }
868879 ut64 dst = op -> operands [2 ].immediate ;
869880 st64 delta = dst - op -> addr ;
870881 ut64 maxis = R_ABS (delta );
@@ -2182,20 +2193,28 @@ bool arm64ass (const char *str, ut64 addr, ut32 *op) {
21822193 } else if (r_str_startswith (str , "ldur" )) {
21832194 * op = regsluop (& ops , 0x000040f8 );
21842195 } else if (r_str_startswith (str , "str" )) {
2196+ #if 0
2197+ // AITODO: maybe
2198+ * op = reglsop (& ops , 0x000000f8 );
2199+ #else
21852200 * op = UT32_MAX ;
21862201 * op = lsop (& ops , 0x000000f8 , -1 );
21872202 if (* op == UT32_MAX ) {
21882203 * op = reglsop (& ops , 0x000000f8 );
21892204 }
2205+ #endif
21902206 } else if (r_str_startswith (str , "stp" )) {
21912207 * op = stp (& ops , 0x000000a9 );
21922208 } else if (r_str_startswith (str , "ldp" )) {
21932209 * op = stp (& ops , 0x000040a9 );
21942210 } else if (r_str_startswith (str , "sub" ) && !r_str_startswith (str , "subg" ) && !r_str_startswith (str , "subp" )) { // w, skip this for mte versions of sub, e.g. subg, subp ins
21952211 * op = arithmetic (& ops , 0xd1 );
2212+ #if 0
2213+ // AITODO
21962214 } else if (r_str_startswith (str , "msub x" )) {
21972215 /* msub: multiply-subtract (Rd = Rn * Rm - Ra) */
21982216 * op = math (& ops , 0x1b008000 , true);
2217+ #endif
21992218 } else if (r_str_startswith (str , "madd x" )) {
22002219 * op = math (& ops , 0x9b , true);
22012220 } else if (r_str_startswith (str , "add x" )) {
0 commit comments