mirror of
https://github.com/revanced/smali.git
synced 2025-05-22 00:37:04 +02:00
Fix a multitude of format related issues with immutable instructions
This commit is contained in:
parent
0033480503
commit
e2f2c89ddc
@ -39,7 +39,7 @@ import org.jf.dexlib2.util.Preconditions;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ImmutableInstruction10t extends ImmutableInstruction implements Instruction10t {
|
||||
public static final Format FORMAT = Format.Format12x;
|
||||
public static final Format FORMAT = Format.Format10t;
|
||||
|
||||
public final int codeOffset;
|
||||
|
||||
|
@ -39,7 +39,7 @@ import org.jf.dexlib2.util.Preconditions;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ImmutableInstruction20t extends ImmutableInstruction implements Instruction20t {
|
||||
public static final Format FORMAT = Format.Format12x;
|
||||
public static final Format FORMAT = Format.Format20t;
|
||||
|
||||
public final int codeOffset;
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class ImmutableInstruction22b extends ImmutableInstruction implements Ins
|
||||
int registerB,
|
||||
int literal) {
|
||||
super(opcode);
|
||||
Preconditions.checkFormat(opcode, Format.Format35c);
|
||||
Preconditions.checkFormat(opcode, FORMAT);
|
||||
this.registerA = Preconditions.checkByteRegister(registerA);
|
||||
this.registerB = Preconditions.checkByteRegister(registerB);
|
||||
this.literal = Preconditions.checkByteLiteral(literal);
|
||||
|
@ -50,7 +50,7 @@ public class ImmutableInstruction22s extends ImmutableInstruction implements Ins
|
||||
int registerB,
|
||||
int literal) {
|
||||
super(opcode);
|
||||
Preconditions.checkFormat(opcode, Format.Format35c);
|
||||
Preconditions.checkFormat(opcode, FORMAT);
|
||||
this.registerA = Preconditions.checkNibbleRegister(registerA);
|
||||
this.registerB = Preconditions.checkNibbleRegister(registerB);
|
||||
this.literal = Preconditions.checkShortLiteral(literal);
|
||||
|
@ -50,7 +50,7 @@ public class ImmutableInstruction22t extends ImmutableInstruction implements Ins
|
||||
int registerB,
|
||||
int codeOffset) {
|
||||
super(opcode);
|
||||
Preconditions.checkFormat(opcode, Format.Format35c);
|
||||
Preconditions.checkFormat(opcode, FORMAT);
|
||||
this.registerA = Preconditions.checkNibbleRegister(registerA);
|
||||
this.registerB = Preconditions.checkNibbleRegister(registerB);
|
||||
this.codeOffset = Preconditions.checkShortCodeOffset(codeOffset);
|
||||
|
@ -48,7 +48,7 @@ public class ImmutableInstruction22x extends ImmutableInstruction implements Ins
|
||||
int registerA,
|
||||
int registerB) {
|
||||
super(opcode);
|
||||
Preconditions.checkFormat(opcode, Format.Format35c);
|
||||
Preconditions.checkFormat(opcode, FORMAT);
|
||||
this.registerA = Preconditions.checkByteRegister(registerA);
|
||||
this.registerB = Preconditions.checkShortRegister(registerB);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class ImmutableInstruction23x extends ImmutableInstruction implements Ins
|
||||
int registerB,
|
||||
int registerC) {
|
||||
super(opcode);
|
||||
Preconditions.checkFormat(opcode, Format.Format35c);
|
||||
Preconditions.checkFormat(opcode, FORMAT);
|
||||
this.registerA = Preconditions.checkByteRegister(registerA);
|
||||
this.registerB = Preconditions.checkByteRegister(registerB);
|
||||
this.registerC = Preconditions.checkByteRegister(registerC);
|
||||
|
@ -39,7 +39,7 @@ import org.jf.dexlib2.util.Preconditions;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ImmutableInstruction30t extends ImmutableInstruction implements Instruction30t {
|
||||
public static final Format FORMAT = Format.Format12x;
|
||||
public static final Format FORMAT = Format.Format30t;
|
||||
|
||||
public final int codeOffset;
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class ImmutableInstruction32x extends ImmutableInstruction implements Ins
|
||||
int registerA,
|
||||
int registerB) {
|
||||
super(opcode);
|
||||
Preconditions.checkFormat(opcode, Format.Format35c);
|
||||
Preconditions.checkFormat(opcode, FORMAT);
|
||||
this.registerA = Preconditions.checkShortRegister(registerA);
|
||||
this.registerB = Preconditions.checkShortRegister(registerB);
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class ImmutableInstruction35c extends ImmutableInstruction implements Ins
|
||||
int registerG,
|
||||
@Nonnull String reference) {
|
||||
super(opcode);
|
||||
Preconditions.checkFormat(opcode, Format.Format35c);
|
||||
Preconditions.checkFormat(opcode, FORMAT);
|
||||
this.registerCount = Preconditions.check35cRegisterCount(registerCount);
|
||||
this.registerC = (registerCount>0) ? Preconditions.checkNibbleRegister(registerC) : 0;
|
||||
this.registerD = (registerCount>1) ? Preconditions.checkNibbleRegister(registerD) : 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user