aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@imgtec.com>2017-05-15 13:52:04 +0100
committerMaciej W. Rozycki <macro@imgtec.com>2017-05-15 14:00:50 +0100
commitb32465c97c12cc6049cefcde1beb3e2bfbfa232c (patch)
tree34664d752ac15ca3c7a7b91b45492e666f3e86c4 /ld
parent3f3467ffc4b0a397a7017b8ab729e4c0060b25f0 (diff)
downloadfsf-binutils-gdb-b32465c97c12cc6049cefcde1beb3e2bfbfa232c.zip
fsf-binutils-gdb-b32465c97c12cc6049cefcde1beb3e2bfbfa232c.tar.gz
fsf-binutils-gdb-b32465c97c12cc6049cefcde1beb3e2bfbfa232c.tar.bz2
MIPS16e2: Add new MIPS16e2 relaxation GAS and LD tests
Verify MIPS16 PC-relative instruction relaxation using the MIPS16e2 LUI instruction rather than an LI/SLL instruction pair. gas/ * testsuite/gas/mips/mips16-pcrel-1.d: Remove `-mips3' from `as' flags. * testsuite/gas/mips/mips16-pcrel-pic-1.d: Likewise. * testsuite/gas/mips/mips16-pcrel-n32-0.d: Likewise. * testsuite/gas/mips/mips16-pcrel-n32-1.d: Likewise. * testsuite/gas/mips/mips16-pcrel-n64-0.d: Likewise. * testsuite/gas/mips/mips16-pcrel-n64-1.d: Likewise. * testsuite/gas/mips/mips16-pcrel-n64-sym32-0.d: Likewise. * testsuite/gas/mips/mips16-pcrel-n64-sym32-1.d: Likewise. * testsuite/gas/mips/mips16-pcrel-reloc-4.d: Likewise. * testsuite/gas/mips/mips16-pcrel-reloc-5.d: Likewise. * testsuite/gas/mips/mips16-pcrel-reloc-6.d: Likewise. * testsuite/gas/mips/mips16-pcrel-reloc-7.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-4.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-5.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-6.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-7.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-9.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-pic-9.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-n32-8.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-n32-9.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-n64-sym32-8.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-n64-sym32-9.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-n64-8.d: Likewise. * testsuite/gas/mips/mips16-pcrel-addend-n64-9.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-2.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-3.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-6.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-7.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-pic-6.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-n32-4.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-n32-6.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-n64-4.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-n64-6.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-n64-sym32-4.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-n64-sym32-6.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-pic-n32-4.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-pic-n32-6.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-pic-n64-4.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-pic-n64-6.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-pic-n64-sym32-4.d: Likewise. * testsuite/gas/mips/mips16-pcrel-absolute-pic-n64-sym32-6.d: Likewise. * testsuite/gas/mips/mips16e2@mips16-pcrel-0.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-1.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-2.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-n32-0.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-n32-1.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-n64-sym32-0.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-n64-sym32-1.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-delay-0.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-delay-1.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-reloc-2.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-reloc-3.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-reloc-6.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-reloc-7.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-addend-2.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-addend-3.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-addend-6.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-addend-7.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-addend-8.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-addend-9.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-addend-n32-8.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-addend-n32-9.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-addend-n64-sym32-8.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-addend-n64-sym32-9.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-1.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-2.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-3.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-4.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-5.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-6.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-7.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-pic-4.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-pic-6.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-n32-4.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-n32-6.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-n64-sym32-4.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-n64-sym32-6.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-pic-n32-4.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-pic-n32-6.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-pic-n64-sym32-4.d: New test. * testsuite/gas/mips/mips16e2@mips16-pcrel-absolute-pic-n64-sym32-6.d: New test. * testsuite/gas/mips/mips16-pcrel-1.l: Adjust line numbers. * testsuite/gas/mips/mips16-pcrel-1.s: Adjust for alignment preservation between MIPS16 and MIPS16e2 code. * testsuite/gas/mips/mips.exp: Run MIPS16 relaxation tests over all MIPS16 architectures. ld/ * testsuite/ld-mips-elf/mips16e2-pcrel-0.d: New test. * testsuite/ld-mips-elf/mips16e2-pcrel-1.d: New test. * testsuite/ld-mips-elf/mips16e2-pcrel-addend-2.d: New test. * testsuite/ld-mips-elf/mips16e2-pcrel-addend-6.d: New test. * testsuite/ld-mips-elf/mips16e2-pcrel-n32-0.d: New test. * testsuite/ld-mips-elf/mips16e2-pcrel-n32-1.d: New test. * testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-0.d: New test. * testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-1.d: New test. * testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog12
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp10
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-pcrel-0.d37
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-pcrel-1.d45
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-pcrel-addend-2.d17
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-pcrel-addend-6.d17
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-pcrel-n32-0.d6
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-pcrel-n32-1.d6
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-0.d6
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-1.d6
10 files changed, 162 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 8e31ca8..a8dad5c 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,15 @@
+2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
+
+ * testsuite/ld-mips-elf/mips16e2-pcrel-0.d: New test.
+ * testsuite/ld-mips-elf/mips16e2-pcrel-1.d: New test.
+ * testsuite/ld-mips-elf/mips16e2-pcrel-addend-2.d: New test.
+ * testsuite/ld-mips-elf/mips16e2-pcrel-addend-6.d: New test.
+ * testsuite/ld-mips-elf/mips16e2-pcrel-n32-0.d: New test.
+ * testsuite/ld-mips-elf/mips16e2-pcrel-n32-1.d: New test.
+ * testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-0.d: New test.
+ * testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-1.d: New test.
+ * testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
+
2017-05-15 Nick Clifton <nickc@redhat.com>
PR ld/21459
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 13d962b..e24c32c 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -156,13 +156,23 @@ if $has_newabi {
run_dump_test "mips16-pcrel-0" [list [list ld $abi_ldflags(o32)]]
run_dump_test "mips16-pcrel-1" [list [list ld $abi_ldflags(o32)]]
+run_dump_test "mips16e2-pcrel-0" [list [list ld $abi_ldflags(o32)]]
+run_dump_test "mips16e2-pcrel-1" [list [list ld $abi_ldflags(o32)]]
run_dump_test "mips16-pcrel-addend-2" [list [list ld $abi_ldflags(o32)]]
run_dump_test "mips16-pcrel-addend-6" [list [list ld $abi_ldflags(o32)]]
+run_dump_test "mips16e2-pcrel-addend-2" [list [list ld $abi_ldflags(o32)]]
+run_dump_test "mips16e2-pcrel-addend-6" [list [list ld $abi_ldflags(o32)]]
if $has_newabi {
run_dump_test "mips16-pcrel-n32-0" [list [list ld $abi_ldflags(n32)]]
run_dump_test "mips16-pcrel-n32-1" [list [list ld $abi_ldflags(n32)]]
run_dump_test "mips16-pcrel-n64-sym32-0" [list [list ld $abi_ldflags(n64)]]
run_dump_test "mips16-pcrel-n64-sym32-1" [list [list ld $abi_ldflags(n64)]]
+ run_dump_test "mips16e2-pcrel-n32-0" [list [list ld $abi_ldflags(n32)]]
+ run_dump_test "mips16e2-pcrel-n32-1" [list [list ld $abi_ldflags(n32)]]
+ run_dump_test "mips16e2-pcrel-n64-sym32-0" \
+ [list [list ld $abi_ldflags(n64)]]
+ run_dump_test "mips16e2-pcrel-n64-sym32-1" \
+ [list [list ld $abi_ldflags(n64)]]
}
run_dump_test "mips16-branch-2" [list [list ld $abi_ldflags(o32)]]
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-pcrel-0.d b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-0.d
new file mode 100644
index 0000000..a6add47
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-0.d
@@ -0,0 +1,37 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS16e2 link PC-relative operations 0
+#source: ../../../gas/testsuite/gas/mips/mips16-pcrel-0.s
+#as: -EB -32 -mips32r2 -mmips16e2
+#ld: -EB -Ttext 0 -e 0
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+ \.\.\.
+[0-9a-f]+ <[^>]*> 0a00 la v0,0+010000 <.*>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> b200 lw v0,0+010004 <.*>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> 0aff la v0,0+010404 <.*>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> b2ff lw v0,0+010408 <.*>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f400 0a00 la v0,0+010410 <.*>
+[0-9a-f]+ <[^>]*> f400 b200 lw v0,0+010414 <.*>
+[0-9a-f]+ <[^>]*> f7ff 0a1c la v0,0+010014 <.*>
+[0-9a-f]+ <[^>]*> f7ff b21c lw v0,0+010018 <.*>
+[0-9a-f]+ <[^>]*> f7ef 0a1f la v0,0+01801f <.*>
+[0-9a-f]+ <[^>]*> f7ef b21f lw v0,0+018023 <.*>
+[0-9a-f]+ <[^>]*> f010 0a00 la v0,0+008028 <.*>
+[0-9a-f]+ <[^>]*> f010 b200 lw v0,0+00802c <.*>
+[0-9a-f]+ <[^>]*> f000 6a22 lui v0,0x2
+[0-9a-f]+ <[^>]*> f030 4a10 addiu v0,-32720
+[0-9a-f]+ <[^>]*> f000 6a22 lui v0,0x2
+[0-9a-f]+ <[^>]*> f030 9a58 lw v0,-32712\(v0\)
+[0-9a-f]+ <[^>]*> f000 6a21 lui v0,0x1
+[0-9a-f]+ <[^>]*> f030 4a1f addiu v0,-32705
+[0-9a-f]+ <[^>]*> f000 6a21 lui v0,0x1
+[0-9a-f]+ <[^>]*> f050 9a47 lw v0,-32697\(v0\)
+[0-9a-f]+ <[^>]*> 6500 nop
+ \.\.\.
+ \.\.\.
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-pcrel-1.d b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-1.d
new file mode 100644
index 0000000..487ce16
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-1.d
@@ -0,0 +1,45 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS16e2 link PC-relative operations 1
+#source: ../../../gas/testsuite/gas/mips/mips16-pcrel-1.s
+#as: -EB -32 -mips64r2 -mmips16e2
+#ld: -EB -Ttext 0 -e 0
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+ \.\.\.
+[0-9a-f]+ <[^>]*> fe40 dla v0,0+010000 <.*>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> fc40 ld v0,0+010000 <.*>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> fe5f dla v0,0+010084 <.*>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> fc5f ld v0,0+010100 <.*>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f080 fe40 dla v0,0+010090 <.*>
+[0-9a-f]+ <[^>]*> f100 fc40 ld v0,0+010110 <.*>
+[0-9a-f]+ <[^>]*> f7ff fe5c dla v0,0+010014 <.*>
+[0-9a-f]+ <[^>]*> f7ff fc5c ld v0,0+010014 <.*>
+[0-9a-f]+ <[^>]*> f7ef fe5f dla v0,0+01801f <.*>
+[0-9a-f]+ <[^>]*> f7ef fc5f ld v0,0+01801f <.*>
+[0-9a-f]+ <[^>]*> f010 fe40 dla v0,0+008028 <.*>
+[0-9a-f]+ <[^>]*> f010 fc40 ld v0,0+008028 <.*>
+[0-9a-f]+ <[^>]*> f000 6a22 lui v0,0x2
+[0-9a-f]+ <[^>]*> f030 fd50 daddiu v0,-32720
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f000 6a22 lui v0,0x2
+[0-9a-f]+ <[^>]*> f030 3a58 ld v0,-32712\(v0\)
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f000 6a21 lui v0,0x1
+[0-9a-f]+ <[^>]*> f050 fd47 daddiu v0,-32697
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f000 6a21 lui v0,0x1
+[0-9a-f]+ <[^>]*> f050 3a4f ld v0,-32689\(v0\)
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> 6500 nop
+ \.\.\.
+ \.\.\.
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-pcrel-addend-2.d b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-addend-2.d
new file mode 100644
index 0000000..1b0cb37
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-addend-2.d
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS16e2 link PC-relative relocation with addend 2
+#source: ../../../gas/testsuite/gas/mips/mips16-pcrel-addend-2.s
+#as: -EB -32 -mips32r2 -mmips16e2
+#ld: -EB -Ttext 0x43210000 -e 0
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+ \.\.\.
+[0-9a-f]+ <[^>]*> f328 6a21 lui v0,0x4321
+[0-9a-f]+ <[^>]*> f264 4a04 addiu v0,8804
+[0-9a-f]+ <[^>]*> f328 6a21 lui v0,0x4321
+[0-9a-f]+ <[^>]*> f264 9a44 lw v0,8804\(v0\)
+[0-9a-f]+ <[^>]*> 6500 nop
+ \.\.\.
+ \.\.\.
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-pcrel-addend-6.d b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-addend-6.d
new file mode 100644
index 0000000..b680a5f
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-addend-6.d
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS16e2 link PC-relative relocation with addend 6
+#source: ../../../gas/testsuite/gas/mips/mips16-pcrel-addend-6.s
+#as: -EB -32 -mips64r2 -mmips16e2
+#ld: -EB -Ttext 0x43210000 -e 0
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+ \.\.\.
+[0-9a-f]+ <[^>]*> f328 6a21 lui v0,0x4321
+[0-9a-f]+ <[^>]*> f264 fd44 daddiu v0,8804
+[0-9a-f]+ <[^>]*> f328 6a21 lui v0,0x4321
+[0-9a-f]+ <[^>]*> f264 3a44 ld v0,8804\(v0\)
+[0-9a-f]+ <[^>]*> 6500 nop
+ \.\.\.
+ \.\.\.
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n32-0.d b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n32-0.d
new file mode 100644
index 0000000..d7d5e9d
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n32-0.d
@@ -0,0 +1,6 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS16e2 link PC-relative operations 0 (n32)
+#source: ../../../gas/testsuite/gas/mips/mips16-pcrel-0.s
+#as: -EB -n32 -mips64r2 -mmips16e2
+#ld: -EB -Ttext 0 -e 0
+#dump: mips16e2-pcrel-0.d
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n32-1.d b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n32-1.d
new file mode 100644
index 0000000..92bd3ba
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n32-1.d
@@ -0,0 +1,6 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS16e2 link PC-relative operations 1 (n32)
+#source: ../../../gas/testsuite/gas/mips/mips16-pcrel-1.s
+#as: -EB -n32 -mips64r2 -mmips16e2
+#ld: -EB -Ttext 0 -e 0
+#dump: mips16e2-pcrel-1.d
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-0.d b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-0.d
new file mode 100644
index 0000000..5ad2001
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-0.d
@@ -0,0 +1,6 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS16e2 link PC-relative operations 0 (n64, sym32)
+#source: ../../../gas/testsuite/gas/mips/mips16-pcrel-0.s
+#as: -EB -64 -msym32 -mips64r2 -mmips16e2
+#ld: -EB -Ttext 0 -e 0
+#dump: mips16e2-pcrel-0.d
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-1.d b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-1.d
new file mode 100644
index 0000000..ea33b8e
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-1.d
@@ -0,0 +1,6 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS16e2 link PC-relative operations 1 (n64, sym32)
+#source: ../../../gas/testsuite/gas/mips/mips16-pcrel-1.s
+#as: -EB -64 -msym32 -mips64r2 -mmips16e2
+#ld: -EB -Ttext 0 -e 0
+#dump: mips16e2-pcrel-1.d