@Nonnull private BuilderInstruction22s newBuilderInstruction22s(@Nonnull Instruction22s instruction) { return new BuilderInstruction22s( instruction.getOpcode(), instruction.getRegisterA(), instruction.getRegisterB(), instruction.getNarrowLiteral()); }
private BuilderInstruction22s buildInstruction22s(Opcode opcode, int value) { BuilderInstruction22s instruction = mock(BuilderInstruction22s.class); setupInstruction(instruction, opcode); when(((Instruction22s) instruction).getRegisterA()).thenReturn(DEST_REGISTER); when(((Instruction22s) instruction).getRegisterB()).thenReturn(ARG1_REGISTER); when(((Instruction22s) instruction).getNarrowLiteral()).thenReturn(value); return instruction; }
@Nonnull private BuilderInstruction22s newBuilderInstruction22s(@Nonnull Instruction22s instruction) { return new BuilderInstruction22s( instruction.getOpcode(), instruction.getRegisterA(), instruction.getRegisterB(), instruction.getNarrowLiteral()); }
@Nonnull private BuilderInstruction22s newBuilderInstruction22s(@Nonnull Instruction22s instruction) { return new BuilderInstruction22s( instruction.getOpcode(), instruction.getRegisterA(), instruction.getRegisterB(), instruction.getNarrowLiteral()); }
@Nonnull private BuilderInstruction22s newBuilderInstruction22s(@Nonnull Instruction22s instruction) { return new BuilderInstruction22s( instruction.getOpcode(), instruction.getRegisterA(), instruction.getRegisterB(), instruction.getNarrowLiteral()); }
@Nonnull private BuilderInstruction22s newBuilderInstruction22s(@Nonnull Instruction22s instruction) { return new BuilderInstruction22s( instruction.getOpcode(), instruction.getRegisterA(), instruction.getRegisterB(), instruction.getNarrowLiteral()); }
public static ImmutableInstruction22s of(Instruction22s instruction) { if (instruction instanceof ImmutableInstruction22s) { return (ImmutableInstruction22s)instruction; } return new ImmutableInstruction22s( instruction.getOpcode(), instruction.getRegisterA(), instruction.getRegisterB(), instruction.getNarrowLiteral()); }
public void write(@Nonnull Instruction22s instruction) { try { writer.write(instruction.getOpcode().value); writer.write(packNibbles(instruction.getRegisterA(), instruction.getRegisterB())); writer.writeShort(instruction.getNarrowLiteral()); } catch (IOException ex) { throw new RuntimeException(ex); } }
public static ImmutableInstruction22s of(Instruction22s instruction) { if (instruction instanceof ImmutableInstruction22s) { return (ImmutableInstruction22s)instruction; } return new ImmutableInstruction22s( instruction.getOpcode(), instruction.getRegisterA(), instruction.getRegisterB(), instruction.getNarrowLiteral()); }
public static ImmutableInstruction22s of(Instruction22s instruction) { if (instruction instanceof ImmutableInstruction22s) { return (ImmutableInstruction22s)instruction; } return new ImmutableInstruction22s( instruction.getOpcode(), instruction.getRegisterA(), instruction.getRegisterB(), instruction.getNarrowLiteral()); }
public void write(@Nonnull Instruction22s instruction) { try { writer.write(getOpcodeValue(instruction.getOpcode())); writer.write(packNibbles(instruction.getRegisterA(), instruction.getRegisterB())); writer.writeShort(instruction.getNarrowLiteral()); } catch (IOException ex) { throw new RuntimeException(ex); } }
public void write(@Nonnull Instruction22s instruction) { try { writer.write(getOpcodeValue(instruction.getOpcode())); writer.write(packNibbles(instruction.getRegisterA(), instruction.getRegisterB())); writer.writeShort(instruction.getNarrowLiteral()); } catch (IOException ex) { throw new RuntimeException(ex); } }
Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.ADD_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break; Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.RSUB_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break; Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.MUL_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break; Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.DIV_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break; Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.REM_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break; Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.AND_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break;
Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.ADD_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break; Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.RSUB_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break; Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.MUL_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break; Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.DIV_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break; Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.REM_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break; Literal lit = new Literal.LongLiteral(((Instruction22s)inst).getWideLiteral()); instructions.add(new BinaryLiteralOperation(instLoc, BinaryLiteralOperation.OpID.AND_INT, ((Instruction22s)inst).getRegisterA(), ((Instruction22s)inst).getRegisterB(), lit, inst.getOpcode(), this)); break;