diff options
author | Jeff Law <law@redhat.com> | 1996-10-03 16:42:22 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1996-10-03 16:42:22 +0000 |
commit | ae1b99e42dbce238cd7eb5efd38672b8306f1148 (patch) | |
tree | 62cc3acea6d14f13f329d7ea5e4813255f126d27 /gas | |
parent | feede9b69925572e68d3859b2fcb610bddd2e713 (diff) | |
download | gdb-ae1b99e42dbce238cd7eb5efd38672b8306f1148.zip gdb-ae1b99e42dbce238cd7eb5efd38672b8306f1148.tar.gz gdb-ae1b99e42dbce238cd7eb5efd38672b8306f1148.tar.bz2 |
Grrr. The mn10200 and mn10300 are _not_ similar enough to easily support
with a single generic configuration. So break them up into two different
configurations. See the individual ChangeLogs for additional detail.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/config/.Sanitize | 6 | ||||
-rw-r--r-- | gas/config/tc-mn10300.c (renamed from gas/config/tc-mn10x00.c) | 66 | ||||
-rw-r--r-- | gas/config/tc-mn10x00.h | 48 | ||||
-rwxr-xr-x | gas/configure | 3 | ||||
-rw-r--r-- | gas/configure.in | 3 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/.Sanitize | 3 |
7 files changed, 46 insertions, 88 deletions
diff --git a/gas/config/.Sanitize b/gas/config/.Sanitize index da1092a..97641cb 100644 --- a/gas/config/.Sanitize +++ b/gas/config/.Sanitize @@ -120,8 +120,10 @@ tc-m88k.c tc-m88k.h tc-mips.c tc-mips.h -tc-mn10x00.c -tc-mn10x00.h +tc-mn10200.c +tc-mn10200.h +tc-mn10300.c +tc-mn10300.h tc-ns32k.c tc-ns32k.h tc-ppc.c diff --git a/gas/config/tc-mn10x00.c b/gas/config/tc-mn10300.c index db3a386..c928a86 100644 --- a/gas/config/tc-mn10x00.c +++ b/gas/config/tc-mn10300.c @@ -1,4 +1,4 @@ -/* tc-mn10x00.c -- Assembler code for the Matsushita 10x00 +/* tc-mn10300.c -- Assembler code for the Matsushita 10300 Copyright (C) 1996 Free Software Foundation. @@ -23,7 +23,7 @@ #include <ctype.h> #include "as.h" #include "subsegs.h" -#include "opcode/mn10x00.h" +#include "opcode/mn10300.h" /* Structure to hold information about predefined registers. */ struct reg_name @@ -54,25 +54,25 @@ const char FLT_CHARS[] = "dD"; /* local functions */ -static unsigned long mn10x00 - PARAMS ((unsigned long insn, const struct mn10x00_operand *operand, +static unsigned long mn10300 + PARAMS ((unsigned long insn, const struct mn10300_operand *operand, offsetT val, char *file, unsigned int line)); static int reg_name_search PARAMS ((const struct reg_name *, int, const char *)); static boolean register_name PARAMS ((expressionS *expressionP)); static boolean system_register_name PARAMS ((expressionS *expressionP)); static boolean cc_name PARAMS ((expressionS *expressionP)); -static bfd_reloc_code_real_type mn10x00_reloc_prefix PARAMS ((void)); +static bfd_reloc_code_real_type mn10300_reloc_prefix PARAMS ((void)); /* fixups */ #define MAX_INSN_FIXUPS (5) -struct mn10x00_fixup +struct mn10300_fixup { expressionS exp; int opindex; bfd_reloc_code_real_type reloc; }; -struct mn10x00_fixup fixups[MAX_INSN_FIXUPS]; +struct mn10300_fixup fixups[MAX_INSN_FIXUPS]; static int fc; const char *md_shortopts = ""; @@ -88,7 +88,7 @@ const pseudo_typeS md_pseudo_table[] = }; /* Opcode hash table. */ -static struct hash_control *mn10x00_hash; +static struct hash_control *mn10300_hash; /* This table is sorted. Suitable for searching by a binary search. */ static const struct reg_name pre_defined_registers[] = @@ -345,7 +345,7 @@ void md_show_usage (stream) FILE *stream; { - fprintf(stream, "MN10x00 options:\n\ + fprintf(stream, "MN10300 options:\n\ none yet\n"); } @@ -429,29 +429,29 @@ void md_begin () { char *prev_name = ""; - register const struct mn10x00_opcode *op; + register const struct mn10300_opcode *op; - mn10x00_hash = hash_new(); + mn10300_hash = hash_new(); - /* Insert unique names into hash table. The MN10x00 instruction set + /* Insert unique names into hash table. The MN10300 instruction set has many identical opcode names that have different opcodes based on the operands. This hash table then provides a quick index to the first opcode with a particular name in the opcode table. */ - op = mn10x00_opcodes; + op = mn10300_opcodes; while (op->name) { if (strcmp (prev_name, op->name)) { prev_name = (char *) op->name; - hash_insert (mn10x00_hash, op->name, (char *) op); + hash_insert (mn10300_hash, op->name, (char *) op); } op++; } } static bfd_reloc_code_real_type -mn10x00_reloc_prefix() +mn10300_reloc_prefix() { if (strncmp(input_line_pointer, "hi0(", 4) == 0) { @@ -479,8 +479,8 @@ md_assemble (str) char *str; { char *s; - struct mn10x00_opcode *opcode; - struct mn10x00_opcode *next_opcode; + struct mn10300_opcode *opcode; + struct mn10300_opcode *next_opcode; const unsigned char *opindex_ptr; int next_opindex; unsigned long insn, size; @@ -496,7 +496,7 @@ md_assemble (str) *s++ = '\0'; /* find the first opcode with the proper name */ - opcode = (struct mn10x00_opcode *)hash_find (mn10x00_hash, str); + opcode = (struct mn10300_opcode *)hash_find (mn10300_hash, str); if (opcode == NULL) { as_bad ("Unrecognized opcode: `%s'", str); @@ -519,17 +519,17 @@ md_assemble (str) insn = opcode->opcode; for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr++) { - const struct mn10x00_operand *operand; + const struct mn10300_operand *operand; char *hold; expressionS ex; if (next_opindex == 0) { - operand = &mn10x00_operands[*opindex_ptr]; + operand = &mn10300_operands[*opindex_ptr]; } else { - operand = &mn10x00_operands[next_opindex]; + operand = &mn10300_operands[next_opindex]; next_opindex = 0; } @@ -544,7 +544,7 @@ md_assemble (str) /* lo(), hi(), hi0(), etc... */ - if ((reloc = mn10x00_reloc_prefix()) != BFD_RELOC_UNUSED) + if ((reloc = mn10300_reloc_prefix()) != BFD_RELOC_UNUSED) { expression(&ex); @@ -575,7 +575,7 @@ md_assemble (str) break; } - insn = mn10x00_insert_operand (insn, operand, ex.X_add_number, + insn = mn10300_insert_operand (insn, operand, ex.X_add_number, (char *) NULL, 0); } else @@ -601,12 +601,12 @@ md_assemble (str) goto error; case O_register: - insn = mn10x00_insert_operand (insn, operand, ex.X_add_number, + insn = mn10300_insert_operand (insn, operand, ex.X_add_number, (char *) NULL, 0); break; case O_constant: - insn = mn10x00_insert_operand (insn, operand, ex.X_add_number, + insn = mn10300_insert_operand (insn, operand, ex.X_add_number, (char *) NULL, 0); break; @@ -673,9 +673,9 @@ md_assemble (str) md_apply_fix. */ for (i = 0; i < fc; i++) { - const struct mn10x00_operand *operand; + const struct mn10300_operand *operand; - operand = &mn10x00_operands[fixups[i].opindex]; + operand = &mn10300_operands[fixups[i].opindex]; if (fixups[i].reloc != BFD_RELOC_UNUSED) { reloc_howto_type *reloc_howto = bfd_reloc_type_lookup (stdoutput, fixups[i].reloc); @@ -701,7 +701,7 @@ md_assemble (str) { fix_new_exp (frag_now, f - frag_now->fr_literal, 4, &fixups[i].exp, - 1 /* FIXME: MN10x00_OPERAND_RELATIVE ??? */, + 1 /* FIXME: MN10300_OPERAND_RELATIVE ??? */, ((bfd_reloc_code_real_type) (fixups[i].opindex + (int) BFD_RELOC_UNUSED))); } @@ -790,12 +790,12 @@ md_apply_fix3 (fixp, valuep, seg) if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED) { int opindex; - const struct mn10x00_operand *operand; + const struct mn10300_operand *operand; char *where; unsigned long insn; opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED; - operand = &mn10x00_operands[opindex]; + operand = &mn10300_operands[opindex]; /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. @@ -805,7 +805,7 @@ md_apply_fix3 (fixp, valuep, seg) where = fixp->fx_frag->fr_literal + fixp->fx_where; insn = bfd_getl32((unsigned char *) where); - insn = mn10x00_insert_operand (insn, operand, (offsetT) value, + insn = mn10300_insert_operand (insn, operand, (offsetT) value, fixp->fx_file, fixp->fx_line); bfd_putl32((bfd_vma) insn, (unsigned char *) where); @@ -845,9 +845,9 @@ md_apply_fix3 (fixp, valuep, seg) /* Insert an operand value into an instruction. */ static unsigned long -mn10x00_insert_operand (insn, operand, val, file, line) +mn10300_insert_operand (insn, operand, val, file, line) unsigned long insn; - const struct mn10x00_operand *operand; + const struct mn10300_operand *operand; offsetT val; char *file; unsigned int line; diff --git a/gas/config/tc-mn10x00.h b/gas/config/tc-mn10x00.h deleted file mode 100644 index c5b2add..0000000 --- a/gas/config/tc-mn10x00.h +++ /dev/null @@ -1,48 +0,0 @@ -/* tc-mn10x00.h -- Header file for tc-mn10x00.c. - Copyright (C) 1996 Free Software Foundation, Inc. - - This file is part of GAS, the GNU Assembler. - - GAS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GAS is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#define TC_MN10x00 - -#ifndef BFD_ASSEMBLER - #error MN10x00 support requires BFD_ASSEMBLER -#endif - -/* The target BFD architecture. */ -#define TARGET_ARCH bfd_arch_mn10x00 - -#define TARGET_FORMAT "elf32-mn10x00" - -#define MD_APPLY_FIX3 -#define md_operand(x) - -/* Permit temporary numeric labels. */ -#define LOCAL_LABELS_FB 1 - -#define LOCAL_LABEL(name) ((name[0] == '.' \ - && (name[1] == 'L' || name[1] == '.')) \ - || (name[0] == '_' && name[1] == '.' && name[2] == 'L' \ - && name[3] == '_')) - -#define FAKE_LABEL_NAME ".L0\001" -#define DIFF_EXPR_OK /* .-foo gets turned into PC relative relocs */ - -/* We don't need to handle .word strangely. */ -#define WORKING_DOT_WORD - -#define md_number_to_chars number_to_chars_littleendian diff --git a/gas/configure b/gas/configure index b53b1e2..6791818 100755 --- a/gas/configure +++ b/gas/configure @@ -876,7 +876,8 @@ for this_target in $target $canon_targets ; do *) targ=mips-lit ;; esac ;; - mn10x00-*-*) fmt=elf bfd_gas=yes ;; + mn10200-*-*) fmt=elf bfd_gas=yes ;; + mn10300-*-*) fmt=elf bfd_gas=yes ;; ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*) fmt=coff em=pe case "$endian" in diff --git a/gas/configure.in b/gas/configure.in index 3735f4b..8325e03 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -230,7 +230,8 @@ changequote([,])dnl *) targ=mips-lit ;; esac ;; - mn10x00-*-*) fmt=elf bfd_gas=yes ;; + mn10200-*-*) fmt=elf bfd_gas=yes ;; + mn10300-*-*) fmt=elf bfd_gas=yes ;; ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*) fmt=coff em=pe case "$endian" in diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 397cfd3..02d0a5c 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,6 +1,7 @@ -Thu Oct 3 00:14:04 1996 Jeffrey A Law (law@cygnus.com) +Thu Oct 3 09:57:03 1996 Jeffrey A Law (law@cygnus.com) - * gas/mn10x00: New directory for Matsushita 10x00 tests. + * gas/mn10200, gas/mn10300: New directorys for Matsushita + mn10200 and mn10300 tests. Tue Oct 1 15:38:28 1996 Ian Lance Taylor <ian@cygnus.com> diff --git a/gas/testsuite/gas/.Sanitize b/gas/testsuite/gas/.Sanitize index 2dc9ec2..9be0821a 100644 --- a/gas/testsuite/gas/.Sanitize +++ b/gas/testsuite/gas/.Sanitize @@ -48,7 +48,8 @@ m68k m68k-coff macros mips -mn10x00 +mn10200 +mn10300 mri sh sparc |