aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-powerpc/addpcis.d20
-rw-r--r--ld/testsuite/ld-powerpc/addpcis.s12
-rw-r--r--ld/testsuite/ld-powerpc/powerpc.exp1
4 files changed, 40 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 47a6253..adb696f 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2015-11-11 Alan Modra <amodra@gmail.com>
+ Peter Bergner <bergner@vnet.ibm.com>
+
+ * ld-powerpc/addpcis.d: New test.
+ * ld-powerpc/addpcis.s: New test.
+ * ld-powerpc/powerpc.exp: Run it.
+
2015-11-03 Renlin Li <renlin.li@arm.com>
* ld-aarch64/aarch64-elf.exp: Run newly added test cases.
diff --git a/ld/testsuite/ld-powerpc/addpcis.d b/ld/testsuite/ld-powerpc/addpcis.d
new file mode 100644
index 0000000..c0e2679
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/addpcis.d
@@ -0,0 +1,20 @@
+#source: addpcis.s
+#as: -a64 -mpower9
+#ld: -melf64ppc -Ttext=0x10000000 --defsym ext1=0 --defsym ext2=0x8fff0000
+#objdump: -d -Mpower9
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+10000000 <_start>:
+ 10000000: (4c 60 f0 04|04 f0 60 4c) addpcis r3,-4096
+ 10000004: (38 63 ff fc|fc ff 63 38) addi r3,r3,-4
+ 10000008: (4c 9f 7f c5|c5 7f 9f 4c) addpcis r4,32767
+ 1000000c: (38 84 ff f4|f4 ff 84 38) addi r4,r4,-12
+ 10000010: (4c a0 00 05|05 00 a0 4c) addpcis r5,1
+ 10000014: (38 a5 80 00|00 80 a5 38) addi r5,r5,-32768
+ \.\.\.
+
+0+10008014 <forw>:
+ 10008014: (60 00 00 00|00 00 00 60) nop
diff --git a/ld/testsuite/ld-powerpc/addpcis.s b/ld/testsuite/ld-powerpc/addpcis.s
new file mode 100644
index 0000000..d535e63
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/addpcis.s
@@ -0,0 +1,12 @@
+ .text
+ .global _start
+_start:
+ addpcis 3,(ext1-0f)@ha
+0: addi 3,3,(ext1-0b)@l
+ addpcis 4,(ext2-0f)@ha
+0: addi 4,4,(ext2-0b)@l
+ addpcis 5,(forw-0f)@ha
+0: addi 5,5,(forw-0b)@l
+ .space 32764
+forw:
+ nop
diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp
index 4211063..efb4026 100644
--- a/ld/testsuite/ld-powerpc/powerpc.exp
+++ b/ld/testsuite/ld-powerpc/powerpc.exp
@@ -288,6 +288,7 @@ if [ supports_ppc64 ] then {
run_dump_test "tocnovar"
run_dump_test "tlsld"
run_dump_test "relocsort"
+ run_dump_test "addpcis"
}
run_dump_test "tlsld32"