mirror of
https://github.com/revanced/smali.git
synced 2025-05-04 16:44:25 +02:00
Add support for assembling format 21c odex instructions
This commit is contained in:
parent
f356647461
commit
f5f64b26f7
@ -709,10 +709,13 @@ instruction returns [int size]
|
||||
INSTRUCTION_FORMAT21c_FIELD REGISTER COMMA fully_qualified_field {$size = Format.Format21c.size;}
|
||||
-> ^(I_STATEMENT_FORMAT21c_FIELD[$start, "I_STATEMENT_FORMAT21c_FIELD"] INSTRUCTION_FORMAT21c_FIELD REGISTER fully_qualified_field)
|
||||
| //e.g. sget-object-volatile v0 java/lang/System/out LJava/io/PrintStream;
|
||||
INSTRUCTION_FORMAT21c_FIELD_ODEX REGISTER COMMA fully_qualified_field
|
||||
INSTRUCTION_FORMAT21c_FIELD_ODEX REGISTER COMMA fully_qualified_field {$size = Format.Format21c.size;}
|
||||
{
|
||||
throwOdexedInstructionException(input, $INSTRUCTION_FORMAT21c_FIELD_ODEX.text);
|
||||
if (!allowOdex) {
|
||||
throwOdexedInstructionException(input, $INSTRUCTION_FORMAT21c_FIELD_ODEX.text);
|
||||
}
|
||||
}
|
||||
-> ^(I_STATEMENT_FORMAT21c_FIELD[$start, "I_STATEMENT_FORMAT21c_FIELD"] INSTRUCTION_FORMAT21c_FIELD_ODEX REGISTER fully_qualified_field)
|
||||
| //e.g. const-string v1 "Hello World!"
|
||||
INSTRUCTION_FORMAT21c_STRING REGISTER COMMA STRING_LITERAL {$size = Format.Format21c.size;}
|
||||
-> ^(I_STATEMENT_FORMAT21c_STRING[$start, "I_STATEMENT_FORMAT21c_STRING"] INSTRUCTION_FORMAT21c_STRING REGISTER STRING_LITERAL)
|
||||
|
@ -999,9 +999,9 @@ instruction[int totalMethodRegisters, int methodParameterRegisters, List<Instruc
|
||||
$instructions.add(new Instruction20t(opcode, addressOffset));
|
||||
}
|
||||
| //e.g. sget_object v0 java/lang/System/out LJava/io/PrintStream;
|
||||
^(I_STATEMENT_FORMAT21c_FIELD INSTRUCTION_FORMAT21c_FIELD REGISTER fully_qualified_field)
|
||||
^(I_STATEMENT_FORMAT21c_FIELD inst=(INSTRUCTION_FORMAT21c_FIELD | INSTRUCTION_FORMAT21c_FIELD_ODEX) REGISTER fully_qualified_field)
|
||||
{
|
||||
Opcode opcode = Opcode.getOpcodeByName($INSTRUCTION_FORMAT21c_FIELD.text);
|
||||
Opcode opcode = Opcode.getOpcodeByName($inst.text);
|
||||
short regA = parseRegister_byte($REGISTER.text, $totalMethodRegisters, $methodParameterRegisters);
|
||||
|
||||
FieldIdItem fieldIdItem = $fully_qualified_field.fieldIdItem;
|
||||
|
Loading…
x
Reference in New Issue
Block a user