aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1997-10-07 20:29:49 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1997-10-07 20:29:49 +0000
commit8fab865a94a07462604c1dcb60fef3d698079af8 (patch)
tree279d5a667c35660da62fe30481248a61492ec71a /gas
parent4913666781961cd568d765ce5b7e272dd6a4eb8e (diff)
downloadgdb-8fab865a94a07462604c1dcb60fef3d698079af8.zip
gdb-8fab865a94a07462604c1dcb60fef3d698079af8.tar.gz
gdb-8fab865a94a07462604c1dcb60fef3d698079af8.tar.bz2
reloc64.[sd]: New testcase.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/sparc/.Sanitize2
-rw-r--r--gas/testsuite/gas/sparc/reloc64.d63
-rw-r--r--gas/testsuite/gas/sparc/reloc64.s39
3 files changed, 104 insertions, 0 deletions
diff --git a/gas/testsuite/gas/sparc/.Sanitize b/gas/testsuite/gas/sparc/.Sanitize
index 3d1562d..2f827e6 100644
--- a/gas/testsuite/gas/sparc/.Sanitize
+++ b/gas/testsuite/gas/sparc/.Sanitize
@@ -33,6 +33,8 @@ prefetch.d
prefetch.s
rdpr.d
rdpr.s
+reloc64.d
+reloc64.s
set64.d
set64.s
splet.d
diff --git a/gas/testsuite/gas/sparc/reloc64.d b/gas/testsuite/gas/sparc/reloc64.d
new file mode 100644
index 0000000..be446ac
--- /dev/null
+++ b/gas/testsuite/gas/sparc/reloc64.d
@@ -0,0 +1,63 @@
+#as: -Av9
+#objdump: -dr
+#name: sparc64 reloc64
+
+.*: +file format .*sparc.*
+
+Disassembly of section .text:
+
+0+ <foo>:
+ 0: 03 04 8d 15 sethi %hi\(0x12345400\), %g1
+ 4: 82 10 62 78 or %g1, 0x278, %g1.*
+ 8: 01 00 00 00 nop
+ c: 03 00 00 00 sethi %hi\(0x0\), %g1
+ c: R_SPARC_HH22 .text
+ 10: 82 10 60 00 mov %g1, %g1 ! 0 <foo>
+ 10: R_SPARC_HM10 .text
+ 14: 01 00 00 00 nop
+ 18: 03 00 00 00 sethi %hi\(0x0\), %g1
+ 18: R_SPARC_HH22 .text\+0x1234567800000000
+ 1c: 82 10 60 00 mov %g1, %g1 ! 0 <foo>
+ 1c: R_SPARC_HM10 .text\+0x1234567800000000
+ 20: 01 00 00 00 nop
+ 24: 03 3f b7 2e sethi %hi\(0xfedcb800\), %g1
+ 28: 82 10 62 98 or %g1, 0x298, %g1.*
+ 2c: 05 1d 95 0c sethi %hi\(0x76543000\), %g2
+ 30: 84 10 62 10 or %g1, 0x210, %g2
+ 34: 01 00 00 00 nop
+ 38: 03 00 00 00 sethi %hi\(0x0\), %g1
+ 38: R_SPARC_HH22 .text
+ 3c: 82 10 60 00 mov %g1, %g1 ! 0 <foo>
+ 3c: R_SPARC_HM10 .text
+ 40: 05 00 00 00 sethi %hi\(0x0\), %g2
+ 40: R_SPARC_LM22 .text
+ 44: 84 10 60 00 mov %g1, %g2
+ 44: R_SPARC_LO10 .text
+ 48: 01 00 00 00 nop
+ 4c: 03 00 00 00 sethi %hi\(0x0\), %g1
+ 4c: R_SPARC_HH22 .text\+0xfedcba9876543210
+ 50: 82 10 60 00 mov %g1, %g1 ! 0 <foo>
+ 50: R_SPARC_HM10 .text\+0xfedcba9876543210
+ 54: 05 00 00 00 sethi %hi\(0x0\), %g2
+ 54: R_SPARC_LM22 .text\+0xfedcba9876543210
+ 58: 84 10 60 00 mov %g1, %g2
+ 58: R_SPARC_LO10 .text\+0xfedcba9876543210
+ 5c: 01 00 00 00 nop
+ 60: 03 2a 61 d9 sethi %hi\(0xa9876400\), %g1
+ 64: 82 10 61 43 or %g1, 0x143, %g1.*
+ 68: 82 10 62 10 or %g1, 0x210, %g1
+ 6c: 01 00 00 00 nop
+ 70: 03 00 00 00 sethi %hi\(0x0\), %g1
+ 70: R_SPARC_H44 .text
+ 74: 82 10 60 00 mov %g1, %g1 ! 0 <foo>
+ 74: R_SPARC_M44 .text
+ 78: 82 10 60 00 mov %g1, %g1
+ 78: R_SPARC_L44 .text
+ 7c: 01 00 00 00 nop
+ 80: 03 00 00 00 sethi %hi\(0x0\), %g1
+ 80: R_SPARC_H44 .text\+0xa9876543210
+ 84: 82 10 60 00 mov %g1, %g1 ! 0 <foo>
+ 84: R_SPARC_M44 .text\+0xa9876543210
+ 88: 82 10 60 00 mov %g1, %g1
+ 88: R_SPARC_L44 .text\+0xa9876543210
+ 8c: 01 00 00 00 nop
diff --git a/gas/testsuite/gas/sparc/reloc64.s b/gas/testsuite/gas/sparc/reloc64.s
new file mode 100644
index 0000000..f949d2d
--- /dev/null
+++ b/gas/testsuite/gas/sparc/reloc64.s
@@ -0,0 +1,39 @@
+# sparc64 special relocs
+
+foo:
+ sethi %uhi(0x1234567800000000),%g1
+ or %g1,%ulo(0x1234567800000000),%g1
+ nop
+ sethi %uhi(foo),%g1
+ or %g1,%ulo(foo),%g1
+ nop
+ sethi %uhi(foo+0x1234567800000000),%g1
+ or %g1,%ulo(foo+0x1234567800000000),%g1
+ nop
+ sethi %hh(0xfedcba9876543210),%g1
+ or %g1,%hm(0xfedcba9876543210),%g1
+ sethi %lm(0xfedcba9876543210),%g2
+ or %g1,%lo(0xfedcba9876543210),%g2
+ nop
+ sethi %hh(foo),%g1
+ or %g1,%hm(foo),%g1
+ sethi %lm(foo),%g2
+ or %g1,%lo(foo),%g2
+ nop
+ sethi %hh(foo+0xfedcba9876543210),%g1
+ or %g1,%hm(foo+0xfedcba9876543210),%g1
+ sethi %lm(foo+0xfedcba9876543210),%g2
+ or %g1,%lo(foo+0xfedcba9876543210),%g2
+ nop
+ sethi %h44(0xa9876543210),%g1
+ or %g1,%m44(0xa9876543210),%g1
+ or %g1,%l44(0xa9876543210),%g1
+ nop
+ sethi %h44(foo),%g1
+ or %g1,%m44(foo),%g1
+ or %g1,%l44(foo),%g1
+ nop
+ sethi %h44(foo+0xa9876543210),%g1
+ or %g1,%m44(foo+0xa9876543210),%g1
+ or %g1,%l44(foo+0xa9876543210),%g1
+ nop