Ulf Carlsson's patches:

Include *-*-linux* in svr4pic tests
Test weak symbol handling.
This commit is contained in:
Alan Modra 2000-05-11 01:55:11 +00:00
parent 426b040396
commit de950844b3
5 changed files with 34 additions and 10 deletions

View File

@ -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.

View File

@ -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>
...

View File

@ -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

View File

@ -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>
...

View File

@ -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*-*-*]]