diff --git a/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction21t.java b/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction21t.java index a8f9f725..7b09c6c8 100644 --- a/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction21t.java +++ b/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction21t.java @@ -28,14 +28,12 @@ package org.jf.dexlib.Code.Format; -import org.jf.dexlib.Code.Instruction; -import org.jf.dexlib.Code.Opcode; -import org.jf.dexlib.Code.OffsetInstruction; +import org.jf.dexlib.Code.*; import org.jf.dexlib.DexFile; import org.jf.dexlib.Util.NumberUtils; import org.jf.dexlib.Util.AnnotatedOutput; -public class Instruction21t extends Instruction implements OffsetInstruction { +public class Instruction21t extends Instruction implements OffsetInstruction, SingleRegisterInstruction { public static final Instruction.InstructionFactory Factory = new Factory(); private byte regA; private short offset; @@ -85,7 +83,7 @@ public class Instruction21t extends Instruction implements OffsetInstruction { return Format.Format21t; } - public int getRegister() { + public int getRegisterA() { return regA & 0xFF; } diff --git a/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction22b.java b/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction22b.java index 54277644..94e5848a 100644 --- a/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction22b.java +++ b/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction22b.java @@ -29,12 +29,13 @@ package org.jf.dexlib.Code.Format; import org.jf.dexlib.Code.Instruction; +import org.jf.dexlib.Code.LiteralInstruction; import org.jf.dexlib.Code.Opcode; import org.jf.dexlib.Code.TwoRegisterInstruction; import org.jf.dexlib.DexFile; import org.jf.dexlib.Util.AnnotatedOutput; -public class Instruction22b extends Instruction implements TwoRegisterInstruction { +public class Instruction22b extends Instruction implements TwoRegisterInstruction, LiteralInstruction { public static final Instruction.InstructionFactory Factory = new Factory(); private byte regA; private byte regB; @@ -80,7 +81,7 @@ public class Instruction22b extends Instruction implements TwoRegisterInstructio return regB & 0xFF; } - public byte getLiteral() { + public long getLiteral() { return litC; } diff --git a/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction22s.java b/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction22s.java index 17262b1f..39e77ca0 100644 --- a/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction22s.java +++ b/dexlib/src/main/java/org/jf/dexlib/Code/Format/Instruction22s.java @@ -29,13 +29,14 @@ package org.jf.dexlib.Code.Format; import org.jf.dexlib.Code.Instruction; +import org.jf.dexlib.Code.LiteralInstruction; import org.jf.dexlib.Code.Opcode; import org.jf.dexlib.Code.TwoRegisterInstruction; import org.jf.dexlib.DexFile; import org.jf.dexlib.Util.NumberUtils; import org.jf.dexlib.Util.AnnotatedOutput; -public class Instruction22s extends Instruction implements TwoRegisterInstruction { +public class Instruction22s extends Instruction implements TwoRegisterInstruction, LiteralInstruction { public static final Instruction.InstructionFactory Factory = new Factory(); private byte regA; private byte regB; @@ -80,7 +81,7 @@ public class Instruction22s extends Instruction implements TwoRegisterInstructio return regB; } - public short getLiteral() { + public long getLiteral() { return litC; }