Migration of branch conditional statements with no separator after mnemonic

The AIX® assembler parses some statements different from the previous version of the assembler.

The AIX® assembler may parse some statements different from the previous version of the assembler. This different parsing is only a possibility for statements that meet all the following conditions:

  • The statement does not have a separator character (space or tab) between the mnemonic and the operands.
  • The first character of the first operand is a plus sign (+) or a minus sign (-).
  • The mnemonic represents a Branch Conditional instruction.

If an assembler program has statements that meet all the conditions above, and the minus sign, or a plus sign in the same location, is intended to be part of the operands, not part of the mnemonic, the source program must be modified. This is especially important for minus signs, because moving a minus sign can significantly change the meaning of a statement.

The possibility of different parsing occurs in AIX® because the assembler was modified to support branch prediction extended mnemonics which use the plus sign and minus sign as part of the mnemonic. In previous versions of the assembler, letters and period (.) were the only possible characters in mnemonics.

Examples

  1. The following statement is parsed by the AIX® assembler so that the minus sign is part of the mnemonic (but previous versions of the assembler parsed the minus sign as part of the operands) and must be modified if the minus sign is intended to be part of the operands:
    
      bnea-   16  #  Separator after the - , but none before
                  #  Now: bnea- is a Branch Prediction Mnemonic
                  #       and 16 is operand.
                  #  Previously: bnea was mnemonic
                  #              and -16 was operand.   
    
  2. The following are several sample statements which the AIX® assembler parses the same as previous assemblers (the minus sign will be interpreted as part of the operands):
    
       bnea  -16  # Separator in source program - Good practice
       bnea-16    #  No separators before or after minus sign
       bnea  - 16 # Separators before and after the minus sign