Add missing addTwosCompSignedIndeterminate method Bug: 293811969 Test: TH Change-Id: I9151aab9e4001e026a22da580cdfcde9462e7ecb
diff --git a/src/android/net/apf/ApfGenerator.java b/src/android/net/apf/ApfGenerator.java index e575113..5784a6e 100644 --- a/src/android/net/apf/ApfGenerator.java +++ b/src/android/net/apf/ApfGenerator.java
@@ -215,6 +215,10 @@ return new IntImmediate((int) imm, IntImmediateType.INDETERMINATE_SIZE_UNSIGNED); } + public static IntImmediate newTwosComplementSignedIndeterminate(long imm) { + return new IntImmediate((int) imm, IntImmediateType.INDETERMINATE_SIZE_SIGNED); + } + public static IntImmediate newSigned8(byte imm) { checkRange("Signed8 IMM", imm, Byte.MIN_VALUE, Byte.MAX_VALUE); return new IntImmediate(imm, IntImmediateType.SIGNED_8); @@ -308,6 +312,11 @@ return this; } + Instruction addTwosCompSignedIndeterminate(int imm) { + mIntImms.add(IntImmediate.newTwosComplementSignedIndeterminate(imm)); + return this; + } + Instruction setLabel(String label) throws IllegalInstructionException { if (mLabels.containsKey(label)) { throw new IllegalInstructionException("duplicate label " + label);