mirror of
https://github.com/revanced/smali.git
synced 2025-06-12 04:17:36 +02:00
Add support in MethodAnalyzer for the new opcodes
This commit is contained in:
@ -675,28 +675,34 @@ public class MethodAnalyzer {
|
||||
analyzeConstString(analyzedInstruction);
|
||||
return true;
|
||||
case CONST_CLASS:
|
||||
case CONST_CLASS_JUMBO:
|
||||
analyzeConstClass(analyzedInstruction);
|
||||
return true;
|
||||
case MONITOR_ENTER:
|
||||
case MONITOR_EXIT:
|
||||
return true;
|
||||
case CHECK_CAST:
|
||||
case CHECK_CAST_JUMBO:
|
||||
analyzeCheckCast(analyzedInstruction);
|
||||
return true;
|
||||
case INSTANCE_OF:
|
||||
case INSTANCE_OF_JUMBO:
|
||||
analyzeInstanceOf(analyzedInstruction);
|
||||
return true;
|
||||
case ARRAY_LENGTH:
|
||||
analyzeArrayLength(analyzedInstruction);
|
||||
return true;
|
||||
case NEW_INSTANCE:
|
||||
case NEW_INSTANCE_JUMBO:
|
||||
analyzeNewInstance(analyzedInstruction);
|
||||
return true;
|
||||
case NEW_ARRAY:
|
||||
case NEW_ARRAY_JUMBO:
|
||||
analyzeNewArray(analyzedInstruction);
|
||||
return true;
|
||||
case FILLED_NEW_ARRAY:
|
||||
case FILLED_NEW_ARRAY_RANGE:
|
||||
case FILLED_NEW_ARRAY_JUMBO:
|
||||
return true;
|
||||
case FILL_ARRAY_DATA:
|
||||
analyzeArrayDataOrSwitch(analyzedInstruction);
|
||||
@ -759,58 +765,86 @@ public class MethodAnalyzer {
|
||||
case APUT_OBJECT:
|
||||
return true;
|
||||
case IGET:
|
||||
case IGET_JUMBO:
|
||||
analyze32BitPrimitiveIget(analyzedInstruction, RegisterType.Category.Integer);
|
||||
return true;
|
||||
case IGET_BOOLEAN:
|
||||
case IGET_BOOLEAN_JUMBO:
|
||||
analyze32BitPrimitiveIget(analyzedInstruction, RegisterType.Category.Boolean);
|
||||
return true;
|
||||
case IGET_BYTE:
|
||||
case IGET_BYTE_JUMBO:
|
||||
analyze32BitPrimitiveIget(analyzedInstruction, RegisterType.Category.Byte);
|
||||
return true;
|
||||
case IGET_CHAR:
|
||||
case IGET_CHAR_JUMBO:
|
||||
analyze32BitPrimitiveIget(analyzedInstruction, RegisterType.Category.Char);
|
||||
return true;
|
||||
case IGET_SHORT:
|
||||
case IGET_SHORT_JUMBO:
|
||||
analyze32BitPrimitiveIget(analyzedInstruction, RegisterType.Category.Short);
|
||||
return true;
|
||||
case IGET_WIDE:
|
||||
case IGET_WIDE_JUMBO:
|
||||
case IGET_OBJECT:
|
||||
case IGET_OBJECT_JUMBO:
|
||||
analyzeIgetWideObject(analyzedInstruction);
|
||||
return true;
|
||||
case IPUT:
|
||||
case IPUT_JUMBO:
|
||||
case IPUT_BOOLEAN:
|
||||
case IPUT_BOOLEAN_JUMBO:
|
||||
case IPUT_BYTE:
|
||||
case IPUT_BYTE_JUMBO:
|
||||
case IPUT_CHAR:
|
||||
case IPUT_CHAR_JUMBO:
|
||||
case IPUT_SHORT:
|
||||
case IPUT_SHORT_JUMBO:
|
||||
case IPUT_WIDE:
|
||||
case IPUT_WIDE_JUMBO:
|
||||
case IPUT_OBJECT:
|
||||
case IPUT_OBJECT_JUMBO:
|
||||
return true;
|
||||
case SGET:
|
||||
case SGET_JUMBO:
|
||||
analyze32BitPrimitiveSget(analyzedInstruction, RegisterType.Category.Integer);
|
||||
return true;
|
||||
case SGET_BOOLEAN:
|
||||
case SGET_BOOLEAN_JUMBO:
|
||||
analyze32BitPrimitiveSget(analyzedInstruction, RegisterType.Category.Boolean);
|
||||
return true;
|
||||
case SGET_BYTE:
|
||||
case SGET_BYTE_JUMBO:
|
||||
analyze32BitPrimitiveSget(analyzedInstruction, RegisterType.Category.Byte);
|
||||
return true;
|
||||
case SGET_CHAR:
|
||||
case SGET_CHAR_JUMBO:
|
||||
analyze32BitPrimitiveSget(analyzedInstruction, RegisterType.Category.Char);
|
||||
return true;
|
||||
case SGET_SHORT:
|
||||
case SGET_SHORT_JUMBO:
|
||||
analyze32BitPrimitiveSget(analyzedInstruction, RegisterType.Category.Short);
|
||||
return true;
|
||||
case SGET_WIDE:
|
||||
case SGET_WIDE_JUMBO:
|
||||
case SGET_OBJECT:
|
||||
case SGET_OBJECT_JUMBO:
|
||||
analyzeSgetWideObject(analyzedInstruction);
|
||||
return true;
|
||||
case SPUT:
|
||||
case SPUT_JUMBO:
|
||||
case SPUT_BOOLEAN:
|
||||
case SPUT_BOOLEAN_JUMBO:
|
||||
case SPUT_BYTE:
|
||||
case SPUT_BYTE_JUMBO:
|
||||
case SPUT_CHAR:
|
||||
case SPUT_CHAR_JUMBO:
|
||||
case SPUT_SHORT:
|
||||
case SPUT_SHORT_JUMBO:
|
||||
case SPUT_WIDE:
|
||||
case SPUT_WIDE_JUMBO:
|
||||
case SPUT_OBJECT:
|
||||
case SPUT_OBJECT_JUMBO:
|
||||
return true;
|
||||
case INVOKE_VIRTUAL:
|
||||
case INVOKE_SUPER:
|
||||
@ -821,13 +855,18 @@ public class MethodAnalyzer {
|
||||
case INVOKE_STATIC:
|
||||
case INVOKE_INTERFACE:
|
||||
case INVOKE_VIRTUAL_RANGE:
|
||||
case INVOKE_VIRTUAL_JUMBO:
|
||||
case INVOKE_SUPER_RANGE:
|
||||
case INVOKE_SUPER_JUMBO:
|
||||
return true;
|
||||
case INVOKE_DIRECT_RANGE:
|
||||
case INVOKE_DIRECT_JUMBO:
|
||||
analyzeInvokeDirectRange(analyzedInstruction);
|
||||
return true;
|
||||
case INVOKE_STATIC_RANGE:
|
||||
case INVOKE_STATIC_JUMBO:
|
||||
case INVOKE_INTERFACE_RANGE:
|
||||
case INVOKE_INTERFACE_JUMBO:
|
||||
return true;
|
||||
case NEG_INT:
|
||||
case NOT_INT:
|
||||
@ -1109,6 +1148,7 @@ public class MethodAnalyzer {
|
||||
case CONST_STRING_JUMBO:
|
||||
return;
|
||||
case CONST_CLASS:
|
||||
case CONST_CLASS_JUMBO:
|
||||
verifyConstClass(analyzedInstruction);
|
||||
return;
|
||||
case MONITOR_ENTER:
|
||||
@ -1116,15 +1156,18 @@ public class MethodAnalyzer {
|
||||
verifyMonitor(analyzedInstruction);
|
||||
return;
|
||||
case CHECK_CAST:
|
||||
case CHECK_CAST_JUMBO:
|
||||
verifyCheckCast(analyzedInstruction);
|
||||
return;
|
||||
case INSTANCE_OF:
|
||||
case INSTANCE_OF_JUMBO:
|
||||
verifyInstanceOf(analyzedInstruction);
|
||||
return;
|
||||
case ARRAY_LENGTH:
|
||||
verifyArrayLength(analyzedInstruction);
|
||||
return;
|
||||
case NEW_INSTANCE:
|
||||
case NEW_INSTANCE_JUMBO:
|
||||
verifyNewInstance(analyzedInstruction);
|
||||
return;
|
||||
case NEW_ARRAY:
|
||||
@ -3676,4 +3719,4 @@ public class MethodAnalyzer {
|
||||
return currentRegister >= registerCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user