Improve documentation on local labels and add documenation about dollar labels.
[deliverable/binutils-gdb.git] / gas / itbl-ops.c
index b7c3686829f3c58fc6d86e713187764588e4ee46..729ee9837421cc6c7f11d56913c5ef456c73889b 100644 (file)
@@ -1,5 +1,5 @@
 /* itbl-ops.c
-   Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -183,17 +183,18 @@ itbl_parse (char *insntbl)
 {
   extern FILE *yyin;
   extern int yyparse (void);
-  yyin = fopen (insntbl, "r");
+
+  yyin = fopen (insntbl, FOPEN_RT);
   if (yyin == 0)
     {
       printf ("Can't open processor instruction specification file \"%s\"\n",
              insntbl);
       return 1;
     }
-  else
-    {
-      while (yyparse ());
-    }
+
+  while (yyparse ())
+    ;
+
   fclose (yyin);
   itbl_have_entries = 1;
   return 0;
@@ -500,7 +501,7 @@ unsigned long
 itbl_assemble (char *name, char *s)
 {
   unsigned long opcode;
-  struct itbl_entry *e;
+  struct itbl_entry *e = NULL;
   struct itbl_field *f;
   char *n;
   int processor;
@@ -516,7 +517,7 @@ itbl_assemble (char *name, char *s)
        break;
     }
   if (!e)
-    return 0;                  /* opcode not in table; invalid instrustion */
+    return 0;                  /* opcode not in table; invalid instruction */
   opcode = build_opcode (e);
 
   /* parse opcode's args (if any) */
@@ -606,7 +607,7 @@ itbl_disassemble (char *s, unsigned long insn)
   /* find entry in list */
   e = find_entry_byval (processor, e_insn, insn, 0);
   if (!e)
-    return 0;                  /* opcode not in table; invalid instrustion */
+    return 0;                  /* opcode not in table; invalid instruction */
   strcpy (s, e->name);
 
   /* Parse insn's args (if any).  */
This page took 0.023472 seconds and 4 git commands to generate.