reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
# RUN: llvm-mc %s -arch=mips -mcpu=mips32r2 -show-encoding 2>&1 | \
# RUN:     FileCheck %s --check-prefix=ALL

    .text
foo:
    beql $a2, 0x1ffff, foo # ALL: lui $1, 1
                           # ALL: ori $1, $1, 65535
                           # ALL: beql  $6, $1, foo
                           # ALL:  #   fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
                           # ALL: nop
    beql $a2, -4096, foo   # ALL: addiu $1, $zero, -4096
                           # ALL: beql  $6, $1, foo
                           # ALL: #   fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    beql $a2, -0x10000, foo # ALL: lui $1, 65535
                            # ALL: beql  $6, $1, foo
                            # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    beql $a2, 16, foo     # ALL: addiu   $1, $zero, 16
                          # ALL: beql    $6, $1, foo
                          # ALL:  # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
                          # ALL: nop
    bnel $a2, 0x1ffff, foo # ALL: lui $1, 1
                           # ALL: ori $1, $1, 65535
                           # ALL: bnel  $6, $1, foo
                           # ALL:  #   fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
                           # ALL: nop
    bnel $a2, -4096, foo   # ALL: addiu $1, $zero, -4096
                           # ALL: bnel  $6, $1, foo
                           # ALL: #   fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bnel $a2, -0x10000, foo # ALL: lui $1, 65535
                            # ALL: bnel  $6, $1, foo
                            # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bnel $a2, 16, foo     # ALL: addiu   $1, $zero, 16
                          # ALL: bnel    $6, $1, foo
                          # ALL: #   fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
                          # ALL: nop
    beql $a2, 32767, foo  # ALL: addiu   $1, $zero, 32767
                          # ALL: beql    $6, $1, foo
                          # ALL: #   fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
                          # ALL: nop
    bnel $a2, 32768, foo  # ALL: ori     $1, $zero, 32768
                          # ALL: bnel    $6, $1, foo
                          # ALL: #   fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
                          # ALL: nop
    blt $a2, 16, foo      # ALL: addiu $1, $zero, 16
                          # ALL: slt   $1, $6, $1
                          # ALL: bnez  $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    ble $a2, 16, foo      # ALL: addiu $1, $zero, 16
                          # ALL: slt   $1, $1, $6
                          # ALL: beqz  $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bge $a2, 32767, foo   # ALL: addiu $1, $zero, 32767
                          # ALL: slt   $1, $6, $1
                          # ALL: beqz  $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bgt $a2, 32768, foo   # ALL: ori   $1, $zero, 32768
                          # ALL: slt   $1, $1, $6
                          # ALL: bnez  $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bltu $a2, 16, foo     # ALL: addiu $1, $zero, 16
                          # ALL: sltu  $1, $6, $1
                          # ALL: bnez  $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bleu $a2, 16, foo     # ALL: addiu $1, $zero, 16
                          # ALL: sltu  $1, $1, $6
                          # ALL: beqz  $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bgeu $a2, 32767, foo  # ALL: addiu $1, $zero, 32767
                          # ALL: sltu  $1, $6, $1
                          # ALL: beqz  $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bgtu $a2, 32768, foo  # ALL: ori   $1, $zero, 32768
                          # ALL: sltu  $1, $1, $6
                          # ALL: bnez  $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bltl $a2, 16, foo     # ALL: addiu $1, $zero, 16
                          # ALL: slt   $1, $6, $1
                          # ALL: bnezl $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    blel $a2, 16, foo     # ALL: addiu $1, $zero, 16
                          # ALL: slt   $1, $1, $6
                          # ALL: beqzl $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bgel $a2, 32767, foo  # ALL: addiu $1, $zero, 32767
                          # ALL: slt   $1, $6, $1
                          # ALL: beqzl $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bgtl $a2, 32768, foo  # ALL: ori   $1, $zero, 32768
                          # ALL: slt   $1, $1, $6
                          # ALL: bnezl $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bltul $a2, 16, foo    # ALL: addiu $1, $zero, 16
                          # ALL: sltu  $1, $6, $1
                          # ALL: bnezl $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bleul $a2, 16, foo    # ALL: addiu $1, $zero, 16
                          # ALL: sltu  $1, $1, $6
                          # ALL: beqzl $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bgeul $a2, 32767, foo # ALL: addiu $1, $zero, 32767
                          # ALL: sltu  $1, $6, $1
                          # ALL: beqzl $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
    bgtul $a2, 65536, foo # ALL: lui   $1, 1
                          # ALL: sltu  $1, $1, $6
                          # ALL: bnezl $1, foo
                          # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16