1# RUN: llvm-mc %s -arch=mips -mcpu=mips32r2 -show-encoding 2>&1 | \ 2# RUN: FileCheck %s --check-prefix=ALL 3 4 .text 5foo: 6 beql $a2, 0x1ffff, foo # ALL: lui $1, 1 7 # ALL: ori $1, $1, 65535 8 # ALL: beql $6, $1, foo 9 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 10 # ALL: nop 11 beql $a2, -4096, foo # ALL: addiu $1, $zero, -4096 12 # ALL: beql $6, $1, foo 13 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 14 beql $a2, -0x10000, foo # ALL: lui $1, 65535 15 # ALL: beql $6, $1, foo 16 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 17 beql $a2, 16, foo # ALL: addiu $1, $zero, 16 18 # ALL: beql $6, $1, foo 19 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 20 # ALL: nop 21 bnel $a2, 0x1ffff, foo # ALL: lui $1, 1 22 # ALL: ori $1, $1, 65535 23 # ALL: bnel $6, $1, foo 24 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 25 # ALL: nop 26 bnel $a2, -4096, foo # ALL: addiu $1, $zero, -4096 27 # ALL: bnel $6, $1, foo 28 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 29 bnel $a2, -0x10000, foo # ALL: lui $1, 65535 30 # ALL: bnel $6, $1, foo 31 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 32 bnel $a2, 16, foo # ALL: addiu $1, $zero, 16 33 # ALL: bnel $6, $1, foo 34 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 35 # ALL: nop 36 beql $a2, 32767, foo # ALL: addiu $1, $zero, 32767 37 # ALL: beql $6, $1, foo 38 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 39 # ALL: nop 40 bnel $a2, 32768, foo # ALL: ori $1, $zero, 32768 41 # ALL: bnel $6, $1, foo 42 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 43 # ALL: nop 44 blt $a2, 16, foo # ALL: addiu $1, $zero, 16 45 # ALL: slt $1, $6, $1 46 # ALL: bnez $1, foo 47 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 48 ble $a2, 16, foo # ALL: addiu $1, $zero, 16 49 # ALL: slt $1, $1, $6 50 # ALL: beqz $1, foo 51 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 52 bge $a2, 32767, foo # ALL: addiu $1, $zero, 32767 53 # ALL: slt $1, $6, $1 54 # ALL: beqz $1, foo 55 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 56 bgt $a2, 32768, foo # ALL: ori $1, $zero, 32768 57 # ALL: slt $1, $1, $6 58 # ALL: bnez $1, foo 59 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 60 bltu $a2, 16, foo # ALL: addiu $1, $zero, 16 61 # ALL: sltu $1, $6, $1 62 # ALL: bnez $1, foo 63 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 64 bleu $a2, 16, foo # ALL: addiu $1, $zero, 16 65 # ALL: sltu $1, $1, $6 66 # ALL: beqz $1, foo 67 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 68 bgeu $a2, 32767, foo # ALL: addiu $1, $zero, 32767 69 # ALL: sltu $1, $6, $1 70 # ALL: beqz $1, foo 71 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 72 bgtu $a2, 32768, foo # ALL: ori $1, $zero, 32768 73 # ALL: sltu $1, $1, $6 74 # ALL: bnez $1, foo 75 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 76 bltl $a2, 16, foo # ALL: addiu $1, $zero, 16 77 # ALL: slt $1, $6, $1 78 # ALL: bnel $1, $zero, foo 79 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 80 blel $a2, 16, foo # ALL: addiu $1, $zero, 16 81 # ALL: slt $1, $1, $6 82 # ALL: beql $1, $zero, foo 83 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 84 bgel $a2, 32767, foo # ALL: addiu $1, $zero, 32767 85 # ALL: slt $1, $6, $1 86 # ALL: beql $1, $zero, foo 87 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 88 bgtl $a2, 32768, foo # ALL: ori $1, $zero, 32768 89 # ALL: slt $1, $1, $6 90 # ALL: bnel $1, $zero, foo 91 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 92 bltul $a2, 16, foo # ALL: addiu $1, $zero, 16 93 # ALL: sltu $1, $6, $1 94 # ALL: bnel $1, $zero, foo 95 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 96 bleul $a2, 16, foo # ALL: addiu $1, $zero, 16 97 # ALL: sltu $1, $1, $6 98 # ALL: beql $1, $zero, foo 99 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 100 bgeul $a2, 32767, foo # ALL: addiu $1, $zero, 32767 101 # ALL: sltu $1, $6, $1 102 # ALL: beql $1, $zero, foo 103 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 104 bgtul $a2, 65536, foo # ALL: lui $1, 1 105 # ALL: sltu $1, $1, $6 106 # ALL: bnel $1, $zero, foo 107 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16 108