blt $7, $8, local_label
# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
# CHECK: bnez $1, local_label # encoding: [0x14,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
blt $7, $8, global_label
# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
# CHECK: bnez $1, global_label # encoding: [0x14,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: global_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop
blt $7, $0, local_label
# CHECK: bltz $7, local_label # encoding: [0x04,0xe0,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
blt $0, $8, local_label
# CHECK: bgtz $8, local_label # encoding: [0x1d,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
blt $0, $0, local_label
# CHECK: bltz $zero, local_label # encoding: [0x04,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bltu $7, $8, local_label
# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
# CHECK: bnez $1, local_label # encoding: [0x14,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bltu $7, $8, global_label
# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
# CHECK: bnez $1, global_label # encoding: [0x14,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: global_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bltu $7, $0, local_label
# CHECK: nop
bltu $0, $8, local_label
# CHECK: bnez $8, local_label # encoding: [0x15,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bltu $0, $0, local_label
# CHECK: nop
ble $7, $8, local_label
# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
# CHECK: beqz $1, local_label # encoding: [0x10,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
ble $7, $8, global_label
# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
# CHECK: beqz $1, global_label # encoding: [0x10,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: global_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop
ble $7, $0, local_label
# CHECK: blez $7, local_label # encoding: [0x18,0xe0,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
ble $0, $8, local_label
# CHECK: bgez $8, local_label # encoding: [0x05,0x01,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
ble $0, $0, local_label
# WARNING: :[[@LINE-1]]:3: warning: branch is always taken
# CHECK: blez $zero, local_label # encoding: [0x18,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bleu $7, $8, local_label
# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
# CHECK: beqz $1, local_label # encoding: [0x10,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bleu $7, $8, global_label
# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
# CHECK: beqz $1, global_label # encoding: [0x10,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: global_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bleu $7, $0, local_label
# CHECK: beqz $7, local_label # encoding: [0x10,0xe0,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bleu $0, $8, local_label
# WARNING: :[[@LINE-1]]:3: warning: branch is always taken
# CHECK: b local_label # encoding: [0x10,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bleu $0, $0, local_label
# WARNING: :[[@LINE-1]]:3: warning: branch is always taken
# CHECK: b local_label # encoding: [0x10,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bge $7, $8, local_label
# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
# CHECK: beqz $1, local_label # encoding: [0x10,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bge $7, $8, global_label
# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
# CHECK: beqz $1, global_label # encoding: [0x10,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: global_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bge $7, $0, local_label
# CHECK: bgez $7, local_label # encoding: [0x04,0xe1,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bge $0, $8, local_label
# CHECK: blez $8, local_label # encoding: [0x19,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bge $0, $0, local_label
# WARNING: :[[@LINE-1]]:3: warning: branch is always taken
# CHECK: bgez $zero, local_label # encoding: [0x04,0x01,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgeu $7, $8, local_label
# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
# CHECK: beqz $1, local_label # encoding: [0x10,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgeu $7, $8, global_label
# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
# CHECK: beqz $1, global_label # encoding: [0x10,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: global_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgeu $7, $0, local_label
# WARNING: :[[@LINE-1]]:3: warning: branch is always taken
# CHECK: b local_label # encoding: [0x10,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgeu $0, $8, local_label
# CHECK: beqz $8, local_label # encoding: [0x11,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgeu $0, $0, local_label
# WARNING: :[[@LINE-1]]:3: warning: branch is always taken
# CHECK: b local_label # encoding: [0x10,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgt $7, $8, local_label
# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
# CHECK: bnez $1, local_label # encoding: [0x14,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgt $7, $8, global_label
# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
# CHECK: bnez $1, global_label # encoding: [0x14,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: global_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgt $7, $0, local_label
# CHECK: bgtz $7, local_label # encoding: [0x1c,0xe0,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgt $0, $8, local_label
# CHECK: bltz $8, local_label # encoding: [0x05,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgt $0, $0, local_label
# CHECK: bgtz $zero, local_label # encoding: [0x1c,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgtu $7, $8, local_label
# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
# CHECK: bnez $1, local_label # encoding: [0x14,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgtu $7, $8, global_label
# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
# CHECK: bnez $1, global_label # encoding: [0x14,0x20,A,A]
-# CHECK: # fixup A - offset: 0, value: global_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgtu $7, $0, local_label
# CHECK: bnez $7, local_label # encoding: [0x14,0xe0,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
bgtu $0, $8, local_label
# CHECK: nop
bgtu $0, $0, local_label
# CHECK: bnez $zero, local_label # encoding: [0x14,0x00,A,A]
-# CHECK: # fixup A - offset: 0, value: local_label, kind: fixup_Mips_PC16
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
-# RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips64r6 \
+# RUN: llvm-mc %s -triple=mips64-unknown-linux -show-encoding -mcpu=mips64r6 \
# RUN: | FileCheck %s -check-prefix=CHECK-FIXUP
-# RUN: llvm-mc %s -filetype=obj -triple=mips-unknown-linux -mcpu=mips64r6 \
+# RUN: llvm-mc %s -filetype=obj -triple=mips64-unknown-linux -mcpu=mips64r6 \
# RUN: | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-ELF
#------------------------------------------------------------------------------
# Check that the assembler can handle the documented syntax for fixups.
# CHECK-FIXUP: value: bar, kind: fixup_MIPS_PC19_S2
# CHECK-FIXUP: beqc $5, $6, bar # encoding: [0x20,0xa6,A,A]
# CHECK-FIXUP: # fixup A - offset: 0,
-# CHECK-FIXUP: value: bar, kind: fixup_Mips_PC16
+# CHECK-FIXUP: value: bar-4, kind: fixup_Mips_PC16
# CHECK-FIXUP: bnec $5, $6, bar # encoding: [0x60,0xa6,A,A]
# CHECK-FIXUP: # fixup A - offset: 0,
-# CHECK-FIXUP: value: bar, kind: fixup_Mips_PC16
+# CHECK-FIXUP: value: bar-4, kind: fixup_Mips_PC16
# CHECK-FIXUP: beqzc $9, bar # encoding: [0xd9,0b001AAAAA,A,A]
# CHECK-FIXUP: # fixup A - offset: 0,
-# CHECK-FIXUP: value: bar, kind: fixup_MIPS_PC21_S2
+# CHECK-FIXUP: value: bar-4, kind: fixup_MIPS_PC21_S2
# CHECK-FIXUP: bnezc $9, bar # encoding: [0xf9,0b001AAAAA,A,A]
# CHECK-FIXUP: # fixup A - offset: 0,
-# CHECK-FIXUP: value: bar, kind: fixup_MIPS_PC21_S2
+# CHECK-FIXUP: value: bar-4, kind: fixup_MIPS_PC21_S2
# CHECK-FIXUP: balc bar # encoding: [0b111010AA,A,A,A]
# CHECK-FIXUP: # fixup A - offset: 0,
-# CHECK-FIXUP: value: bar, kind: fixup_MIPS_PC26_S2
+# CHECK-FIXUP: value: bar-4, kind: fixup_MIPS_PC26_S2
# CHECK-FIXUP: bc bar # encoding: [0b110010AA,A,A,A]
# CHECK-FIXUP: # fixup A - offset: 0,
-# CHECK-FIXUP: value: bar, kind: fixup_MIPS_PC26_S2
+# CHECK-FIXUP: value: bar-4, kind: fixup_MIPS_PC26_S2
# CHECK-FIXUP: aluipc $2, %pcrel_hi(bar) # encoding: [0xec,0x5f,A,A]
# CHECK-FIXUP: # fixup A - offset: 0,
# CHECK-FIXUP: value: bar@PCREL_HI16,
# Check that the appropriate relocations were created.
#------------------------------------------------------------------------------
# CHECK-ELF: Relocations [
-# CHECK-ELF: 0x0 R_MIPS_PC19_S2 bar 0x0
-# CHECK-ELF: 0x4 R_MIPS_PC16 bar 0x0
-# CHECK-ELF: 0x8 R_MIPS_PC16 bar 0x0
-# CHECK-ELF: 0xC R_MIPS_PC21_S2 bar 0x0
-# CHECK-ELF: 0x10 R_MIPS_PC21_S2 bar 0x0
-# CHECK-ELF: 0x14 R_MIPS_PC26_S2 bar 0x0
-# CHECK-ELF: 0x18 R_MIPS_PC26_S2 bar 0x0
-# CHECK-ELF: 0x1C R_MIPS_PCHI16 bar 0x0
-# CHECK-ELF: 0x20 R_MIPS_PCLO16 bar 0x0
-# CHECK-ELF: 0x24 R_MIPS_PC18_S3 bar 0x0
-# CHECK-ELF: 0x28 R_MIPS_PC19_S2 bar 0x0
-# CHECK-ELF: 0x2C R_MIPS_PC19_S2 bar 0x0
+# CHECK-ELF: 0x0 R_MIPS_PC19_S2/R_MIPS_NONE/R_MIPS_NONE bar 0x0
+# CHECK-ELF: 0x4 R_MIPS_PC16/R_MIPS_NONE/R_MIPS_NONE bar 0xFFFFFFFFFFFFFFFC
+# CHECK-ELF: 0x8 R_MIPS_PC16/R_MIPS_NONE/R_MIPS_NONE bar 0xFFFFFFFFFFFFFFFC
+# CHECK-ELF: 0xC R_MIPS_PC21_S2/R_MIPS_NONE/R_MIPS_NONE bar 0xFFFFFFFFFFFFFFFC
+# CHECK-ELF: 0x10 R_MIPS_PC21_S2/R_MIPS_NONE/R_MIPS_NONE bar 0xFFFFFFFFFFFFFFFC
+# CHECK-ELF: 0x14 R_MIPS_PC26_S2/R_MIPS_NONE/R_MIPS_NONE bar 0xFFFFFFFFFFFFFFFC
+# CHECK-ELF: 0x18 R_MIPS_PC26_S2/R_MIPS_NONE/R_MIPS_NONE bar 0xFFFFFFFFFFFFFFFC
+# CHECK-ELF: 0x1C R_MIPS_PCHI16/R_MIPS_NONE/R_MIPS_NONE bar 0x0
+# CHECK-ELF: 0x20 R_MIPS_PCLO16/R_MIPS_NONE/R_MIPS_NONE bar 0x0
+# CHECK-ELF: 0x24 R_MIPS_PC18_S3/R_MIPS_NONE/R_MIPS_NONE bar 0x0
+# CHECK-ELF: 0x28 R_MIPS_PC19_S2/R_MIPS_NONE/R_MIPS_NONE bar 0x0
+# CHECK-ELF: 0x2C R_MIPS_PC19_S2/R_MIPS_NONE/R_MIPS_NONE bar 0x0
# CHECK-ELF: ]
addiupc $2,bar