@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 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 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); } }