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