summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2007-09-26 06:54:00 +0000
committerJan Beulich <jbeulich@novell.com>2007-09-26 06:54:00 +0000
commit5478018f5bc979d006a862f1fb9e1233575bbd06 (patch)
tree5adedff4a4936bf1d8c5a7dff27935de6b8db5cf
parente6ed6cdde78a9dd2f00194f361587f463c35030c (diff)
downloadbinutils-redhat-5478018f5bc979d006a862f1fb9e1233575bbd06.tar.gz
gas/
2007-09-26 Jan Beulich <jbeulich@novell.com> * as.c (itbl_parse): Remove #define. (struct itbl_file_list): Move down and ... (itbl_files): .. conditionalize upon HAVE_ITBL_CPU. (show_usage): Conditionalize printing of --itbl option upon HAVE_ITBL_CPU. (parse_args): Conditionalize handling of -t/--itbl options upon HAVE_ITBL_CPU. Remove OPTION_INSTTBL and replace its use with 't'.
-rw-r--r--gas/ChangeLog11
-rw-r--r--gas/as.c28
2 files changed, 28 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 57f08fb704..9990ee160f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,14 @@
+2007-09-26 Jan Beulich <jbeulich@novell.com>
+
+ * as.c (itbl_parse): Remove #define.
+ (struct itbl_file_list): Move down and ...
+ (itbl_files): .. conditionalize upon HAVE_ITBL_CPU.
+ (show_usage): Conditionalize printing of --itbl option upon
+ HAVE_ITBL_CPU.
+ (parse_args): Conditionalize handling of -t/--itbl options upon
+ HAVE_ITBL_CPU. Remove OPTION_INSTTBL and replace its use with
+ 't'.
+
2007-09-25 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (output_insn): Use i.tm.opcode_length to
diff --git a/gas/as.c b/gas/as.c
index 5abdbf46cf..200a4d10e3 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -45,7 +45,6 @@
#ifdef HAVE_ITBL_CPU
#include "itbl-ops.h"
#else
-#define itbl_parse(itbl_file) 1
#define itbl_init()
#endif
@@ -60,13 +59,6 @@ extern PTR sbrk ();
extern void gas_cgen_begin (void);
#endif
-/* Keep a record of the itbl files we read in. */
-struct itbl_file_list
-{
- struct itbl_file_list *next;
- char *name;
-};
-
/* We build a list of defsyms as we read the options, and then define
them after we have initialized everything. */
struct defsym_list
@@ -117,7 +109,15 @@ static char *listing_filename = NULL;
static struct defsym_list *defsyms;
+#ifdef HAVE_ITBL_CPU
+/* Keep a record of the itbl files we read in. */
+struct itbl_file_list
+{
+ struct itbl_file_list *next;
+ char *name;
+};
static struct itbl_file_list *itbl_files;
+#endif
static long start_time;
@@ -323,9 +323,11 @@ Options:\n\
--warn don't suppress warnings\n"));
fprintf (stream, _("\
--fatal-warnings treat warnings as errors\n"));
+#ifdef HAVE_ITBL_CPU
fprintf (stream, _("\
--itbl INSTTBL extend instruction set to include instructions\n\
matching the specifications defined in file INSTTBL\n"));
+#endif
fprintf (stream, _("\
-w ignored\n"));
fprintf (stream, _("\
@@ -392,8 +394,10 @@ parse_args (int * pargc, char *** pargv)
'v',
#endif
'w', 'X',
+#ifdef HAVE_ITBL_CPU
/* New option for extending instruction set (see also --itbl below). */
't', ':',
+#endif
'\0'
};
struct option *longopts;
@@ -411,7 +415,6 @@ parse_args (int * pargc, char *** pargv)
OPTION_EMULATION,
OPTION_DEBUG_PREFIX_MAP,
OPTION_DEFSYM,
- OPTION_INSTTBL,
OPTION_LISTING_LHS_WIDTH,
OPTION_LISTING_LHS_WIDTH2,
OPTION_LISTING_RHS_WIDTH,
@@ -466,13 +469,15 @@ parse_args (int * pargc, char *** pargv)
,{"gstabs+", no_argument, NULL, OPTION_GSTABS_PLUS}
,{"hash-size", required_argument, NULL, OPTION_HASH_TABLE_SIZE}
,{"help", no_argument, NULL, OPTION_HELP}
+#ifdef HAVE_ITBL_CPU
/* New option for extending instruction set (see also -t above).
The "-t file" or "--itbl file" option extends the basic set of
valid instructions by reading "file", a text file containing a
list of instruction formats. The additional opcodes and their
formats are added to the built-in set of instructions, and
mnemonics for new registers may also be defined. */
- ,{"itbl", required_argument, NULL, OPTION_INSTTBL}
+ ,{"itbl", required_argument, NULL, 't'}
+#endif
/* getopt allows abbreviations, so we do this to stop it from
treating -k as an abbreviation for --keep-locals. Some
ports use -k to enable PIC assembly. */
@@ -648,7 +653,7 @@ This program has absolutely no warranty.\n"));
}
break;
- case OPTION_INSTTBL:
+#ifdef HAVE_ITBL_CPU
case 't':
{
/* optarg is the name of the file containing the instruction
@@ -676,6 +681,7 @@ This program has absolutely no warranty.\n"));
itbl_files->name);
}
break;
+#endif
case OPTION_DEPFILE:
start_dependencies (optarg);