[ gas/ChangeLog ]
authorChris Demetriou <cgd@google.com>
Wed, 9 Jul 2003 01:27:30 +0000 (01:27 +0000)
committerChris Demetriou <cgd@google.com>
Wed, 9 Jul 2003 01:27:30 +0000 (01:27 +0000)
2003-07-08  Chris Demetriou  <cgd@broadcom.com>

        * config/tc-mips.c (mips_validate_fix): Do not warn about branch
        target being a global symbol if not compiling SVR4 PIC code.

[ gas/testsuite/ChangeLog ]
2003-07-08  Chris Demetriou  <cgd@broadcom.com>

        * gas/testsuite/gas/mips/mips.exp: Make sure that branch-misc-2 is
        run to compile non-PIC code, and add branch-misc-2pic.
        * gas/mips/branch-misc-2.l: Adjust for change in non-PIC warnings.
        * gas/mips/branch-misc-2pic.l: New file.
        * gas/mips/branch-misc-2pic.s: New file.

gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/ChangeLog
gas/testsuite/gas/mips/branch-misc-2.l
gas/testsuite/gas/mips/branch-misc-2pic.l [new file with mode: 0644]
gas/testsuite/gas/mips/branch-misc-2pic.s [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp

index 11eb9e60c9d920758a746b15aa64eaa6e0b5c7ca..21167d84304ec57375bdf7fb2203cb398121a5b0 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-08  Chris Demetriou  <cgd@broadcom.com>
+
+       * config/tc-mips.c (mips_validate_fix): Do not warn about branch
+       target being a global symbol if not compiling SVR4 PIC code.
+
 2003-07-07  Nick Clifton  <nickc@redhat.com>
 
        * doc/c-m32r.texi (M32R-Directives): New node.  Document the
index b66aae41bfea75279db733b04835d3a0fe1d6ebc..0aef57526fe8af683f629e8ff84b228f8ec79876 100644 (file)
@@ -11059,8 +11059,9 @@ mips_validate_fix (struct fix *fixP, asection *seg)
        {
          symbolS *sym = fixP->fx_addsy;
 
-         as_warn_where (fixP->fx_file, fixP->fx_line,
-                        _("Pretending global symbol used as branch target is local."));
+         if (mips_pic == SVR4_PIC)
+           as_warn_where (fixP->fx_file, fixP->fx_line,
+                          _("Pretending global symbol used as branch target is local."));
 
          fixP->fx_addsy = symbol_create (S_GET_NAME (sym),
                                          S_GET_SEGMENT (sym),
index 2083d32abde82d8c8dc851188f508f644b005236..9502f001853a92c06a248852b610c6ea7afab610 100644 (file)
@@ -1,3 +1,11 @@
+2003-07-08  Chris Demetriou  <cgd@broadcom.com>
+
+       * gas/testsuite/gas/mips/mips.exp: Make sure that branch-misc-2 is
+       run to compile non-PIC code, and add branch-misc-2pic.
+       * gas/mips/branch-misc-2.l: Adjust for change in non-PIC warnings.
+       * gas/mips/branch-misc-2pic.l: New file.
+       * gas/mips/branch-misc-2pic.s: New file.
+
 2003-07-07  Richard Sandiford  <rsandifo@redhat.com>
 
        * gas/h8300/h8sx_disp2.[sd]: Add tests for symbolic displacements.
index 3ddc97aa22093147d8edc5264232b9ae5595d15b..a66aaa66622d079e9bfbd560f068b660444b428a 100644 (file)
@@ -1,10 +1,4 @@
 .*: Assembler messages:
-.*:21: Warning: Pretending global symbol used as branch target is local.
-.*:22: Warning: Pretending global symbol used as branch target is local.
-.*:23: Warning: Pretending global symbol used as branch target is local.
-.*:24: Warning: Pretending global symbol used as branch target is local.
-.*:25: Warning: Pretending global symbol used as branch target is local.
-.*:26: Warning: Pretending global symbol used as branch target is local.
 .*:35: Error: Cannot branch to undefined symbol.
 .*:36: Error: Cannot branch to undefined symbol.
 .*:37: Error: Cannot branch to symbol in another section.
diff --git a/gas/testsuite/gas/mips/branch-misc-2pic.l b/gas/testsuite/gas/mips/branch-misc-2pic.l
new file mode 100644 (file)
index 0000000..3ddc97a
--- /dev/null
@@ -0,0 +1,10 @@
+.*: Assembler messages:
+.*:21: Warning: Pretending global symbol used as branch target is local.
+.*:22: Warning: Pretending global symbol used as branch target is local.
+.*:23: Warning: Pretending global symbol used as branch target is local.
+.*:24: Warning: Pretending global symbol used as branch target is local.
+.*:25: Warning: Pretending global symbol used as branch target is local.
+.*:26: Warning: Pretending global symbol used as branch target is local.
+.*:35: Error: Cannot branch to undefined symbol.
+.*:36: Error: Cannot branch to undefined symbol.
+.*:37: Error: Cannot branch to symbol in another section.
diff --git a/gas/testsuite/gas/mips/branch-misc-2pic.s b/gas/testsuite/gas/mips/branch-misc-2pic.s
new file mode 100644 (file)
index 0000000..3167289
--- /dev/null
@@ -0,0 +1,43 @@
+# Source file used to test the backward branches to globals in this file.
+
+       .globl g1 .text
+       .globl g2 .text
+       .globl g3 .text
+       .globl g4 .text
+       .globl g5 .text
+       .globl g6 .text
+
+       .globl x1 .text
+
+       .text
+g1:
+       .space 20
+g2:
+       .space 20
+g3:
+       .space 20
+
+x:
+       bal     g1
+       bal     g2
+       bal     g3
+       bal     g4
+       bal     g5
+       bal     g6
+
+       .space 20
+g4:
+       .space 20
+g5:
+       .space 20
+g6:
+
+       b       x1
+       b       x2
+       b       .Ldata
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+       .space  8
+
+       .data
+.Ldata:
index 541c86fa22560a7a5ae7307d4a7ff7cada9a87d5..25cfdf667ca7688254cf6d939ad199359eeaf4c4 100644 (file)
@@ -423,7 +423,8 @@ if { [istarget mips*-*-*] } then {
     run_dump_test_arches "blt"         [mips_arch_list_matching mips2]
     run_dump_test_arches "bltu"                [mips_arch_list_matching mips2]
     run_dump_test_arches "branch-misc-1" [mips_arch_list_matching mips1]
-    run_list_test_arches "branch-misc-2" "-32" [mips_arch_list_matching mips1]
+    run_list_test_arches "branch-misc-2" "-32 -non_shared" [mips_arch_list_matching mips1]
+    run_list_test_arches "branch-misc-2pic" "-32 -call_shared" [mips_arch_list_matching mips1]
 
     if $ilocks {
        run_dump_test "div-ilocks"
This page took 0.050843 seconds and 4 git commands to generate.