return TRUE;
case BFD_RELOC_HI16_S:
+ case BFD_RELOC_HI16_S_PCREL:
case BFD_RELOC_MICROMIPS_HI16_S:
case BFD_RELOC_MIPS16_HI16_S:
*result = ((operand + 0x8000) >> 16) & 0xffff;
return TRUE;
case BFD_RELOC_LO16:
+ case BFD_RELOC_LO16_PCREL:
case BFD_RELOC_MICROMIPS_LO16:
case BFD_RELOC_MIPS16_LO16:
*result = operand & 0xffff;
case BFD_RELOC_MIPS_GOT_LO16:
case BFD_RELOC_MIPS_CALL_HI16:
case BFD_RELOC_MIPS_CALL_LO16:
+ case BFD_RELOC_HI16_S_PCREL:
+ case BFD_RELOC_LO16_PCREL:
case BFD_RELOC_MIPS16_GPREL:
case BFD_RELOC_MIPS16_GOT16:
case BFD_RELOC_MIPS16_CALL16:
break;
case BFD_RELOC_MIPS_21_PCREL_S2:
+ if ((*valP & 0x3) != 0)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch to misaligned address (%lx)"), (long) *valP);
+ if (!fixP->fx_done)
+ break;
+
+ if (*valP + 0x400000 <= 0x7fffff)
+ {
+ insn = read_insn (buf);
+ insn |= (*valP >> 2) & 0x1fffff;
+ write_insn (buf, insn);
+ }
+ else
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch out of range"));
+ break;
+
case BFD_RELOC_MIPS_26_PCREL_S2:
if ((*valP & 0x3) != 0)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("branch to misaligned address (%lx)"), (long) *valP);
+ if (!fixP->fx_done)
+ break;
- gas_assert (!fixP->fx_done);
+ if (*valP + 0x8000000 <= 0xfffffff)
+ {
+ insn = read_insn (buf);
+ insn |= (*valP >> 2) & 0x3ffffff;
+ write_insn (buf, insn);
+ }
+ else
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch out of range"));
break;
case BFD_RELOC_MIPS_18_PCREL_S3:
as_bad_where (fixP->fx_file, fixP->fx_line,
_("PC-relative access using misaligned offset (%lx)"),
(long) fixP->fx_offset);
+ if (!fixP->fx_done)
+ break;
- gas_assert (!fixP->fx_done);
+ if (*valP + 0x100000 <= 0x1fffff)
+ {
+ insn = read_insn (buf);
+ insn |= (*valP >> 3) & 0x3ffff;
+ write_insn (buf, insn);
+ }
+ else
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("PC-relative access out of range"));
break;
case BFD_RELOC_MIPS_19_PCREL_S2:
as_bad_where (fixP->fx_file, fixP->fx_line,
_("PC-relative access to misaligned address (%lx)"),
(long) *valP);
+ if (!fixP->fx_done)
+ break;
- gas_assert (!fixP->fx_done);
- break;
-
- case BFD_RELOC_HI16_S_PCREL:
- case BFD_RELOC_LO16_PCREL:
- gas_assert (!fixP->fx_done);
+ if (*valP + 0x100000 <= 0x1fffff)
+ {
+ insn = read_insn (buf);
+ insn |= (*valP >> 2) & 0x7ffff;
+ write_insn (buf, insn);
+ }
+ else
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("PC-relative access out of range"));
break;
case BFD_RELOC_16_PCREL_S2:
run_dump_test "pcrel-reloc-2-r6"
run_dump_test "pcrel-reloc-3"
run_dump_test "pcrel-reloc-3-r6"
+ run_dump_test "pcrel-reloc-4"
+ run_dump_test "pcrel-reloc-4-r6"
+ run_dump_test "pcrel-reloc-5"
+ run_dump_test "pcrel-reloc-5-r6"
+ run_dump_test "pcrel-reloc-6"
+ run_list_test "pcrel-reloc-6" "-32 --defsym offset=4" \
+ "MIPS local PC-relative relocations 6b"
run_dump_test_arches "attr-gnu-4-0" "-32" \
[mips_arch_list_matching mips1]
--- /dev/null
+#objdump: -dr --prefix-addresses --show-raw-insn -mmips:isa64r6
+#name: MIPS local PC-relative relocations 4
+#as: -32 -mips32r6
+#source: pcrel-reloc-4.s
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 1000ffff b 00000000 <foo>
+[ ]*[0-9a-f]+: R_MIPS_PC16 bar
+[0-9a-f]+ <[^>]*> 1000ffff b 00000004 <foo\+0x4>
+[ ]*[0-9a-f]+: R_MIPS_PC16 bar
+[0-9a-f]+ <[^>]*> 1000ffff b 00000008 <foo\+0x8>
+[ ]*[0-9a-f]+: R_MIPS_PC16 bar
+[0-9a-f]+ <[^>]*> 1000ffff b 0000000c <foo\+0xc>
+[ ]*[0-9a-f]+: R_MIPS_PC16 bar
+[0-9a-f]+ <[^>]*> cbffffff bc 00000010 <foo\+0x10>
+[ ]*[0-9a-f]+: R_MIPS_PC26_S2 bar
+[0-9a-f]+ <[^>]*> cbffffff bc 00000014 <foo\+0x14>
+[ ]*[0-9a-f]+: R_MIPS_PC26_S2 bar
+[0-9a-f]+ <[^>]*> cbffffff bc 00000018 <foo\+0x18>
+[ ]*[0-9a-f]+: R_MIPS_PC26_S2 bar
+[0-9a-f]+ <[^>]*> cbffffff bc 0000001c <foo\+0x1c>
+[ ]*[0-9a-f]+: R_MIPS_PC26_S2 bar
+[0-9a-f]+ <[^>]*> d85fffff beqzc v0,00000020 <foo\+0x20>
+[ ]*[0-9a-f]+: R_MIPS_PC21_S2 bar
+[0-9a-f]+ <[^>]*> d85fffff beqzc v0,00000024 <foo\+0x24>
+[ ]*[0-9a-f]+: R_MIPS_PC21_S2 bar
+[0-9a-f]+ <[^>]*> d85fffff beqzc v0,00000028 <foo\+0x28>
+[ ]*[0-9a-f]+: R_MIPS_PC21_S2 bar
+[0-9a-f]+ <[^>]*> d85fffff beqzc v0,0000002c <foo\+0x2c>
+[ ]*[0-9a-f]+: R_MIPS_PC21_S2 bar
+[0-9a-f]+ <[^>]*> ec480000 lwpc v0,00000030 <foo\+0x30>
+[ ]*[0-9a-f]+: R_MIPS_PC19_S2 bar
+[0-9a-f]+ <[^>]*> ec480000 lwpc v0,00000034 <foo\+0x34>
+[ ]*[0-9a-f]+: R_MIPS_PC19_S2 bar
+[0-9a-f]+ <[^>]*> ec480000 lwpc v0,00000038 <foo\+0x38>
+[ ]*[0-9a-f]+: R_MIPS_PC19_S2 bar
+[0-9a-f]+ <[^>]*> ec480000 lwpc v0,0000003c <foo\+0x3c>
+[ ]*[0-9a-f]+: R_MIPS_PC19_S2 bar
+[0-9a-f]+ <[^>]*> ec580000 ldpc v0,00000040 <foo\+0x40>
+[ ]*[0-9a-f]+: R_MIPS_PC18_S3 bar
+[0-9a-f]+ <[^>]*> ec580000 ldpc v0,00000040 <foo\+0x40>
+[ ]*[0-9a-f]+: R_MIPS_PC18_S3 bar
+[0-9a-f]+ <[^>]*> ec580000 ldpc v0,00000048 <foo\+0x48>
+[ ]*[0-9a-f]+: R_MIPS_PC18_S3 bar
+[0-9a-f]+ <[^>]*> ec580000 ldpc v0,00000048 <foo\+0x48>
+[ ]*[0-9a-f]+: R_MIPS_PC18_S3 bar
+[0-9a-f]+ <[^>]*> ec5e0001 auipc v0,0x1
+[ ]*[0-9a-f]+: R_MIPS_PCHI16 \.text
+[0-9a-f]+ <[^>]*> 24420014 addiu v0,v0,20
+[ ]*[0-9a-f]+: R_MIPS_PCLO16 \.text
+[0-9a-f]+ <[^>]*> ec5e0001 auipc v0,0x1
+[ ]*[0-9a-f]+: R_MIPS_PCHI16 \.text
+[0-9a-f]+ <[^>]*> 24420014 addiu v0,v0,20
+[ ]*[0-9a-f]+: R_MIPS_PCLO16 \.text
+[0-9a-f]+ <[^>]*> ec5e0001 auipc v0,0x1
+[ ]*[0-9a-f]+: R_MIPS_PCHI16 \.text
+[0-9a-f]+ <[^>]*> 24420014 addiu v0,v0,20
+[ ]*[0-9a-f]+: R_MIPS_PCLO16 \.text
+[0-9a-f]+ <[^>]*> ec5e0001 auipc v0,0x1
+[ ]*[0-9a-f]+: R_MIPS_PCHI16 \.text
+[0-9a-f]+ <[^>]*> 24420014 addiu v0,v0,20
+[ ]*[0-9a-f]+: R_MIPS_PCLO16 \.text
+ \.\.\.
+[0-9a-f]+ <[^>]*> 03e00009 jr ra
+[0-9a-f]+ <[^>]*> 00000000 nop
+ \.\.\.
+[0-9a-f]+ <[^>]*> 03e00009 jr ra
+[0-9a-f]+ <[^>]*> 00000000 nop
+ \.\.\.
--- /dev/null
+#objdump: -dr --prefix-addresses --show-raw-insn -mmips:isa64r6
+#name: MIPS local PC-relative relocations 4
+#as: -32
+#source: pcrel-reloc-4.s
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 1000001f b 00000080 <bar>
+[0-9a-f]+ <[^>]*> 1000001e b 00000080 <bar>
+[0-9a-f]+ <[^>]*> 1000001d b 00000080 <bar>
+[0-9a-f]+ <[^>]*> 1000001c b 00000080 <bar>
+[0-9a-f]+ <[^>]*> c800001b bc 00000080 <bar>
+[0-9a-f]+ <[^>]*> c800001a bc 00000080 <bar>
+[0-9a-f]+ <[^>]*> c8000019 bc 00000080 <bar>
+[0-9a-f]+ <[^>]*> c8000018 bc 00000080 <bar>
+[0-9a-f]+ <[^>]*> d8400017 beqzc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> d8400016 beqzc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> d8400015 beqzc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> d8400014 beqzc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> ec480014 lwpc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> ec480013 lwpc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> ec480012 lwpc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> ec480011 lwpc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> ec580008 ldpc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> ec580008 ldpc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> ec580007 ldpc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> ec580007 ldpc v0,00000080 <bar>
+[0-9a-f]+ <[^>]*> ec5e0001 auipc v0,0x1
+[0-9a-f]+ <[^>]*> 2442ffc0 addiu v0,v0,-64
+[0-9a-f]+ <[^>]*> ec5e0001 auipc v0,0x1
+[0-9a-f]+ <[^>]*> 2442ffb8 addiu v0,v0,-72
+[0-9a-f]+ <[^>]*> ec5e0001 auipc v0,0x1
+[0-9a-f]+ <[^>]*> 2442ffb0 addiu v0,v0,-80
+[0-9a-f]+ <[^>]*> ec5e0001 auipc v0,0x1
+[0-9a-f]+ <[^>]*> 2442ffa8 addiu v0,v0,-88
+ \.\.\.
+[0-9a-f]+ <[^>]*> 03e00009 jr ra
+[0-9a-f]+ <[^>]*> 00000000 nop
+ \.\.\.
+[0-9a-f]+ <[^>]*> 03e00009 jr ra
+[0-9a-f]+ <[^>]*> 00000000 nop
+ \.\.\.
--- /dev/null
+ .text
+
+ .ifdef reverse
+ .ent baz
+baz:
+ jalr $0, $ra
+ .end baz
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 16, 0
+ .space 16
+
+ .ent bar
+bar:
+ jalr $0, $ra
+ .end bar
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16
+ .endif
+
+ .align 4, 0
+ .globl foo
+ .ent foo
+ .set noreorder
+foo:
+ b bar
+ b bar
+ b bar
+ b bar
+ .set mips64r6
+ bc bar
+ bc bar
+ bc bar
+ bc bar
+ beqzc $2, bar
+ beqzc $2, bar
+ beqzc $2, bar
+ beqzc $2, bar
+ lwpc $2, bar
+ lwpc $2, bar
+ lwpc $2, bar
+ lwpc $2, bar
+ ldpc $2, bar
+ ldpc $2, bar
+ ldpc $2, bar
+ ldpc $2, bar
+ auipc $2, %pcrel_hi(baz)
+ addiu $2, %pcrel_lo(baz + 4)
+ auipc $2, %pcrel_hi(baz)
+ addiu $2, %pcrel_lo(baz + 4)
+ auipc $2, %pcrel_hi(baz)
+ addiu $2, %pcrel_lo(baz + 4)
+ auipc $2, %pcrel_hi(baz)
+ addiu $2, %pcrel_lo(baz + 4)
+ .set mips0
+ .set reorder
+ .end foo
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16
+
+ .ifndef reverse
+ .ent bar
+bar:
+ jalr $0, $ra
+ .end bar
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 16, 0
+ .space 16
+
+ .ent baz
+baz:
+ jalr $0, $ra
+ .end baz
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16
+ .endif
--- /dev/null
+#objdump: -dr --prefix-addresses --show-raw-insn -mmips:isa64r6
+#name: MIPS local PC-relative relocations 5
+#as: -32 -mips32r6 --defsym reverse=1
+#source: pcrel-reloc-4.s
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 03e00009 jr ra
+[0-9a-f]+ <[^>]*> 00000000 nop
+ \.\.\.
+[0-9a-f]+ <[^>]*> 03e00009 jr ra
+[0-9a-f]+ <[^>]*> 00000000 nop
+ \.\.\.
+[0-9a-f]+ <[^>]*> 1000ffff b 00010030 <foo>
+[ ]*[0-9a-f]+: R_MIPS_PC16 bar
+[0-9a-f]+ <[^>]*> 1000ffff b 00010034 <foo\+0x4>
+[ ]*[0-9a-f]+: R_MIPS_PC16 bar
+[0-9a-f]+ <[^>]*> 1000ffff b 00010038 <foo\+0x8>
+[ ]*[0-9a-f]+: R_MIPS_PC16 bar
+[0-9a-f]+ <[^>]*> 1000ffff b 0001003c <foo\+0xc>
+[ ]*[0-9a-f]+: R_MIPS_PC16 bar
+[0-9a-f]+ <[^>]*> cbffffff bc 00010040 <foo\+0x10>
+[ ]*[0-9a-f]+: R_MIPS_PC26_S2 bar
+[0-9a-f]+ <[^>]*> cbffffff bc 00010044 <foo\+0x14>
+[ ]*[0-9a-f]+: R_MIPS_PC26_S2 bar
+[0-9a-f]+ <[^>]*> cbffffff bc 00010048 <foo\+0x18>
+[ ]*[0-9a-f]+: R_MIPS_PC26_S2 bar
+[0-9a-f]+ <[^>]*> cbffffff bc 0001004c <foo\+0x1c>
+[ ]*[0-9a-f]+: R_MIPS_PC26_S2 bar
+[0-9a-f]+ <[^>]*> d85fffff beqzc v0,00010050 <foo\+0x20>
+[ ]*[0-9a-f]+: R_MIPS_PC21_S2 bar
+[0-9a-f]+ <[^>]*> d85fffff beqzc v0,00010054 <foo\+0x24>
+[ ]*[0-9a-f]+: R_MIPS_PC21_S2 bar
+[0-9a-f]+ <[^>]*> d85fffff beqzc v0,00010058 <foo\+0x28>
+[ ]*[0-9a-f]+: R_MIPS_PC21_S2 bar
+[0-9a-f]+ <[^>]*> d85fffff beqzc v0,0001005c <foo\+0x2c>
+[ ]*[0-9a-f]+: R_MIPS_PC21_S2 bar
+[0-9a-f]+ <[^>]*> ec480000 lwpc v0,00010060 <foo\+0x30>
+[ ]*[0-9a-f]+: R_MIPS_PC19_S2 bar
+[0-9a-f]+ <[^>]*> ec480000 lwpc v0,00010064 <foo\+0x34>
+[ ]*[0-9a-f]+: R_MIPS_PC19_S2 bar
+[0-9a-f]+ <[^>]*> ec480000 lwpc v0,00010068 <foo\+0x38>
+[ ]*[0-9a-f]+: R_MIPS_PC19_S2 bar
+[0-9a-f]+ <[^>]*> ec480000 lwpc v0,0001006c <foo\+0x3c>
+[ ]*[0-9a-f]+: R_MIPS_PC19_S2 bar
+[0-9a-f]+ <[^>]*> ec580000 ldpc v0,00010070 <foo\+0x40>
+[ ]*[0-9a-f]+: R_MIPS_PC18_S3 bar
+[0-9a-f]+ <[^>]*> ec580000 ldpc v0,00010070 <foo\+0x40>
+[ ]*[0-9a-f]+: R_MIPS_PC18_S3 bar
+[0-9a-f]+ <[^>]*> ec580000 ldpc v0,00010078 <foo\+0x48>
+[ ]*[0-9a-f]+: R_MIPS_PC18_S3 bar
+[0-9a-f]+ <[^>]*> ec580000 ldpc v0,00010078 <foo\+0x48>
+[ ]*[0-9a-f]+: R_MIPS_PC18_S3 bar
+[0-9a-f]+ <[^>]*> ec5e0000 auipc v0,0x0
+[ ]*[0-9a-f]+: R_MIPS_PCHI16 \.text
+[0-9a-f]+ <[^>]*> 24420004 addiu v0,v0,4
+[ ]*[0-9a-f]+: R_MIPS_PCLO16 \.text
+[0-9a-f]+ <[^>]*> ec5e0000 auipc v0,0x0
+[ ]*[0-9a-f]+: R_MIPS_PCHI16 \.text
+[0-9a-f]+ <[^>]*> 24420004 addiu v0,v0,4
+[ ]*[0-9a-f]+: R_MIPS_PCLO16 \.text
+[0-9a-f]+ <[^>]*> ec5e0000 auipc v0,0x0
+[ ]*[0-9a-f]+: R_MIPS_PCHI16 \.text
+[0-9a-f]+ <[^>]*> 24420004 addiu v0,v0,4
+[ ]*[0-9a-f]+: R_MIPS_PCLO16 \.text
+[0-9a-f]+ <[^>]*> ec5e0000 auipc v0,0x0
+[ ]*[0-9a-f]+: R_MIPS_PCHI16 \.text
+[0-9a-f]+ <[^>]*> 24420004 addiu v0,v0,4
+[ ]*[0-9a-f]+: R_MIPS_PCLO16 \.text
+ \.\.\.
--- /dev/null
+#objdump: -dr --prefix-addresses --show-raw-insn -mmips:isa64r6
+#name: MIPS local PC-relative relocations 5
+#as: -32 --defsym reverse=1
+#source: pcrel-reloc-4.s
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 03e00009 jr ra
+[0-9a-f]+ <[^>]*> 00000000 nop
+ \.\.\.
+[0-9a-f]+ <[^>]*> 03e00009 jr ra
+[0-9a-f]+ <[^>]*> 00000000 nop
+ \.\.\.
+[0-9a-f]+ <[^>]*> 1000fff7 b 00010010 <bar>
+[0-9a-f]+ <[^>]*> 1000fff6 b 00010010 <bar>
+[0-9a-f]+ <[^>]*> 1000fff5 b 00010010 <bar>
+[0-9a-f]+ <[^>]*> 1000fff4 b 00010010 <bar>
+[0-9a-f]+ <[^>]*> cbfffff3 bc 00010010 <bar>
+[0-9a-f]+ <[^>]*> cbfffff2 bc 00010010 <bar>
+[0-9a-f]+ <[^>]*> cbfffff1 bc 00010010 <bar>
+[0-9a-f]+ <[^>]*> cbfffff0 bc 00010010 <bar>
+[0-9a-f]+ <[^>]*> d85fffef beqzc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> d85fffee beqzc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> d85fffed beqzc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> d85fffec beqzc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> ec4fffec lwpc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> ec4fffeb lwpc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> ec4fffea lwpc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> ec4fffe9 lwpc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> ec5bfff4 ldpc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> ec5bfff4 ldpc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> ec5bfff3 ldpc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> ec5bfff3 ldpc v0,00010010 <bar>
+[0-9a-f]+ <[^>]*> ec5effff auipc v0,0xffff
+[0-9a-f]+ <[^>]*> 2442ff80 addiu v0,v0,-128
+[0-9a-f]+ <[^>]*> ec5effff auipc v0,0xffff
+[0-9a-f]+ <[^>]*> 2442ff78 addiu v0,v0,-136
+[0-9a-f]+ <[^>]*> ec5effff auipc v0,0xffff
+[0-9a-f]+ <[^>]*> 2442ff70 addiu v0,v0,-144
+[0-9a-f]+ <[^>]*> ec5effff auipc v0,0xffff
+[0-9a-f]+ <[^>]*> 2442ff68 addiu v0,v0,-152
+ \.\.\.
--- /dev/null
+#objdump: -dr --prefix-addresses --show-raw-insn -mmips:isa64r6
+#name: MIPS local PC-relative relocations 6a
+#as: -32 --defsym offset=0
+#source: pcrel-reloc-6.s
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 10008000 b fffe0004 <foo\+0xfffe0004>
+[0-9a-f]+ <[^>]*> 10007fff b 00020004 <foo\+0x20004>
+[0-9a-f]+ <[^>]*> ca000000 bc f800000c <foo\+0xf800000c>
+[0-9a-f]+ <[^>]*> c9ffffff bc 0800000c <foo\+0x800000c>
+[0-9a-f]+ <[^>]*> d8500000 beqzc v0,ffc00014 <foo\+0xffc00014>
+[0-9a-f]+ <[^>]*> d84fffff beqzc v0,00400014 <foo\+0x400014>
+[0-9a-f]+ <[^>]*> ec4c0000 lwpc v0,fff00018 <foo\+0xfff00018>
+[0-9a-f]+ <[^>]*> ec4bffff lwpc v0,00100018 <foo\+0x100018>
+[0-9a-f]+ <[^>]*> ec5a0000 ldpc v0,fff00020 <foo\+0xfff00020>
+[0-9a-f]+ <[^>]*> ec59ffff ldpc v0,00100018 <foo\+0x100018>
+ \.\.\.
--- /dev/null
+.*: Assembler messages:
+.*:9: Error: branch out of range
+.*:10: Error: branch out of range
+.*:11: Error: branch out of range
+.*:12: Error: branch out of range
+.*:13: Error: branch out of range
+.*:14: Error: branch out of range
+.*:15: Error: PC-relative access out of range
+.*:16: Error: PC-relative access out of range
+.*:17: Error: PC-relative access out of range
+.*:18: Error: PC-relative access out of range
--- /dev/null
+ .text
+ .abicalls
+ .align 4, 0
+ .globl foo
+ .ent foo
+ .set noreorder
+ .set mips64r6
+foo:
+ b (. + 4) - (0x20000 + offset)
+ b (. + 4) + (0x1fffc + offset)
+ bc (. + 4) - (0x8000000 + offset)
+ bc (. + 4) + (0x7fffffc + offset)
+ beqzc $2, (. + 4) - (0x400000 + offset)
+ beqzc $2, (. + 4) + (0x3ffffc + offset)
+ lwpc $2, . - (0x100000 + offset)
+ lwpc $2, . + (0xffffc + offset)
+ ldpc $2, . - (0x100000 + (offset << 1))
+ ldpc $2, (. - 4) + (0xffff8 + (offset << 1))
+ .set mips0
+ .set reorder
+ .end foo
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16