]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* config/tc-mips.c (md_begin): Add $fcc registers to the symbol
authorAlexandre Oliva <aoliva@redhat.com>
Sat, 19 Oct 2002 00:37:50 +0000 (00:37 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Sat, 19 Oct 2002 00:37:50 +0000 (00:37 +0000)
table as register names.

gas/ChangeLog
gas/config/tc-mips.c

index f3cb90de6bb6445eacc4de237bef3f766461f88d..1c9ee5bab1cd49524ae1c2b076bd2ad77d7ca6d9 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-18  Alexandre Oliva  <aoliva@redhat.com>
+
+       * config/tc-mips.c (md_begin): Add $fcc registers to the symbol
+       table as register names.
+
 2002-10-18  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/tc-s390.c (md_parse_option): Set s390_arch_size to 32
index 5a30e51ab1afbcc7ebdda57589be9eef3af12f4b..de49657b3f60fb5be8f9595f8f936a1ced73f7e5 100644 (file)
@@ -1223,6 +1223,20 @@ md_begin ()
   symbol_table_insert (symbol_new ("$pc", reg_section, -1,
                                   &zero_address_frag));
 
+  /* If we don't add these register names to the symbol table, they
+     may end up being added as regular symbols by operand(), and then
+     make it to the object file as undefined in case they're not
+     regarded as local symbols.  They're local in o32, since `$' is a
+     local symbol prefix, but not in n32 or n64.  */
+  for (i = 0; i < 8; i++)
+    {
+      char buf[6];
+
+      sprintf (buf, "$fcc%i", i);
+      symbol_table_insert (symbol_new (buf, reg_section, -1,
+                                      &zero_address_frag));
+    }
+
   mips_no_prev_insn (false);
 
   mips_gprmask = 0;