Package ghidra.program.model.lang

# Interface ParallelInstructionLanguageHelper

public interface ParallelInstructionLanguageHelper
`ParallelInstructionLanguageHelper` provides the ability via a language specified property to identify certain parallel instruction attributes. Implementations must define a public default constructor.

The following assumptions exist for parallel packets/groups of instructions:

- All instructions in a packet/group which are not the last instruction in the packet/group must have a fall-through.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getMnemonicPrefix(Instruction instr)`
  Return the mnemonic prefix (i.e., || ) for the specified instriction.
  `boolean`
  `isEndOfParallelInstructionGroup(Instruction instruction)`
  Determine if the specified instruction is the last instruction in a parallel instruction group.
  `boolean`
  `isParallelInstruction(Instruction instruction)`
  Determine if the specified instruction is executed in parallel with the instruction preceding it.

- ## Method Details

  - ### getMnemonicPrefix

    String getMnemonicPrefix(Instruction instr)
    Return the mnemonic prefix (i.e., || ) for the specified instriction.
    Parameters:
      `instr` -
    Returns:
      mnemonic prefix or null if not applicable

  - ### isParallelInstruction

    boolean isParallelInstruction(Instruction instruction)
    Determine if the specified instruction is executed in parallel with the instruction preceding it.
    Parameters:
      `instruction` -
    Returns:
      true if parallel else false

  - ### isEndOfParallelInstructionGroup

    boolean isEndOfParallelInstructionGroup(Instruction instruction)
    Determine if the specified instruction is the last instruction in a parallel instruction group. The group is defined as a sequential set of instructions which are executed in parallel. It is assumed that all terminal flows will only be present in the semantics of the last instruction in a parallel group.

    This method is primarily intended to assist disassembly to keep parallel instruction packets/groups intact within a single InstructionBlock to facilitate the pcode crossbuild directive. Such cases are expected to defer all flows to the last instruction in the packet and flows should never have a destination in the middle of a packet/group. If pcode crossbuild's are never utilized this method may always return false.

    Parameters:
      `instruction` -
    Returns:
      true if instruction is last in a parallel group or if no other instruction is executed in parallel with the specified instruction.