From: Alan Modra Date: Thu, 11 May 2000 01:55:11 +0000 (+0000) Subject: Ulf Carlsson's patches: X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8dabd82ff1279aa1d73db13631b08952ef58b750;p=pf3gnuchains%2Fpf3gnuchains3x.git Ulf Carlsson's patches: Include *-*-linux* in svr4pic tests Test weak symbol handling. --- diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 6ee57fa499..e121ed4e8e 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2000-05-11 Ulf Carlsson + + * 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 * 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 b15be76248..6fe868e4f5 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 +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 ... diff --git a/gas/testsuite/gas/mips/jal-svr4pic.s b/gas/testsuite/gas/mips/jal-svr4pic.s index 9d89dfa50f..1174e94817 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 a26dca38b2..8233ecf8de 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 +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 ... diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 6ed1c021fe..363c8f54f5 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*-*-*]]