aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-05-11 01:55:11 +0000
committerAlan Modra <amodra@gmail.com>2000-05-11 01:55:11 +0000
commitde950844b3c5ac2fdd06b8db35b5680e1853f15c (patch)
tree5fead9b45157167e533d98a5a44a36e7d5fa7bd0
parent426b0403963b328d6ccd7abc93f87a9c38f3e718 (diff)
downloadgdb-de950844b3c5ac2fdd06b8db35b5680e1853f15c.zip
gdb-de950844b3c5ac2fdd06b8db35b5680e1853f15c.tar.gz
gdb-de950844b3c5ac2fdd06b8db35b5680e1853f15c.tar.bz2
Ulf Carlsson's patches:
Include *-*-linux* in svr4pic tests Test weak symbol handling.
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/mips/jal-svr4pic.d11
-rw-r--r--gas/testsuite/gas/mips/jal-svr4pic.s7
-rw-r--r--gas/testsuite/gas/mips/jal-xgot.d15
-rw-r--r--gas/testsuite/gas/mips/mips.exp4
5 files changed, 34 insertions, 10 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 6ee57fa..e121ed4 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2000-05-11 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * gas/mips/mips.exp: Include *-*-linux* in svr4pic.
+
+ * gas/mips/jal-svr4pic.{s,d} gas/mips/jal-xgot.d: Add a jal to a
+ weak symbol.
+
2000-05-08 Alan Modra <alan@linuxcare.com.au>
* gas/mri/float.d: Fix for srec length change.
diff --git a/gas/testsuite/gas/mips/jal-svr4pic.d b/gas/testsuite/gas/mips/jal-svr4pic.d
index b15be76..6fe868e 100644
--- a/gas/testsuite/gas/mips/jal-svr4pic.d
+++ b/gas/testsuite/gas/mips/jal-svr4pic.d
@@ -30,10 +30,17 @@ Disassembly of section .text:
0+0040 <[^>]*> lw \$gp,0\(\$sp\)
0+0044 <[^>]*> nop
0+0048 <[^>]*> lw \$t9,0\(\$gp\)
-[ ]*48: R_MIPS_CALL16 external_text_label
+[ ]*48: R_MIPS_CALL16 weak_text_label
0+004c <[^>]*> nop
0+0050 <[^>]*> jalr \$t9
0+0054 <[^>]*> nop
0+0058 <[^>]*> lw \$gp,0\(\$sp\)
-0+005c <[^>]*> b 0+0000 <text_label>
+0+005c <[^>]*> nop
+0+0060 <[^>]*> lw \$t9,0\(\$gp\)
+[ ]*60: R_MIPS_CALL16 external_text_label
+0+0064 <[^>]*> nop
+0+0068 <[^>]*> jalr \$t9
+0+006c <[^>]*> nop
+0+0070 <[^>]*> lw \$gp,0\(\$sp\)
+0+0074 <[^>]*> b 0+0000 <text_label>
...
diff --git a/gas/testsuite/gas/mips/jal-svr4pic.s b/gas/testsuite/gas/mips/jal-svr4pic.s
index 9d89dfa..1174e94 100644
--- a/gas/testsuite/gas/mips/jal-svr4pic.s
+++ b/gas/testsuite/gas/mips/jal-svr4pic.s
@@ -1,5 +1,7 @@
# Source file used to test the jal macro with -KPIC code.
+.weak weak_text_label
+
text_label:
.set noreorder
.cpload $25
@@ -8,13 +10,12 @@ text_label:
jal $25
jal $4,$25
jal text_label
+ jal weak_text_label
jal external_text_label
-
+
# Test j as well
j text_label
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
nop
- nop
- nop
diff --git a/gas/testsuite/gas/mips/jal-xgot.d b/gas/testsuite/gas/mips/jal-xgot.d
index a26dca3..8233ecf 100644
--- a/gas/testsuite/gas/mips/jal-xgot.d
+++ b/gas/testsuite/gas/mips/jal-xgot.d
@@ -30,13 +30,22 @@ Disassembly of section .text:
0+003c <[^>]*> nop
0+0040 <[^>]*> lw \$gp,0\(\$sp\)
0+0044 <[^>]*> lui \$t9,0x0
-[ ]*44: R_MIPS_CALL_HI16 external_text_label
+[ ]*44: R_MIPS_CALL_HI16 weak_text_label
0+0048 <[^>]*> addu \$t9,\$t9,\$gp
0+004c <[^>]*> lw \$t9,0\(\$t9\)
-[ ]*4c: R_MIPS_CALL_LO16 external_text_label
+[ ]*4c: R_MIPS_CALL_LO16 weak_text_label
0+0050 <[^>]*> nop
0+0054 <[^>]*> jalr \$t9
0+0058 <[^>]*> nop
0+005c <[^>]*> lw \$gp,0\(\$sp\)
-0+0060 <[^>]*> b 0+0000 <text_label>
+0+0060 <[^>]*> lui \$t9,0x0
+[ ]*60: R_MIPS_CALL_HI16 external_text_label
+0+0064 <[^>]*> addu \$t9,\$t9,\$gp
+0+0068 <[^>]*> lw \$t9,0\(\$t9\)
+[ ]*68: R_MIPS_CALL_LO16 external_text_label
+0+006c <[^>]*> nop
+0+0070 <[^>]*> jalr \$t9
+0+0074 <[^>]*> nop
+0+0078 <[^>]*> lw \$gp,0\(\$sp\)
+0+007c <[^>]*> b 0+0000 <text_label>
...
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 6ed1c02..363c8f5 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -3,9 +3,9 @@
#
if [istarget mips*-*-*] then {
set no_mips16 0
- set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] ]
+ set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] || [istarget *-*-linux*] ]
set empic [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
- set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*] || [istarget *-*-openbsd*]]
+ set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*] || [istarget *-*-openbsd*] ]
set ilocks [istarget mipstx39*-*-*]
set gpr_ilocks [expr [istarget mipstx39*-*-*]]
set addr32 [expr [istarget mipstx39*-*-*]]