diff options
author | Ian Lance Taylor <ian@airs.com> | 1993-09-24 17:47:04 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1993-09-24 17:47:04 +0000 |
commit | 97f99d1196db7d2fe1a2fe2f57eb82aafa4afe8c (patch) | |
tree | b06e9bb18eca72700e011194c49fc7531874d88e /gas | |
parent | 0a275421385dc2fd331bf94bca8d33d17b2d7d4b (diff) | |
download | gdb-97f99d1196db7d2fe1a2fe2f57eb82aafa4afe8c.zip gdb-97f99d1196db7d2fe1a2fe2f57eb82aafa4afe8c.tar.gz gdb-97f99d1196db7d2fe1a2fe2f57eb82aafa4afe8c.tar.bz2 |
* config/tc-mips.c (md_begin): Set BFD architecture and machine
based on MIPS ISA level.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/config/tc-mips.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 30ef6c4..31899ea 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -286,6 +286,7 @@ static bfd_reloc_code_real_type offset_reloc; void md_begin () { + boolean ok; register const char *retval = NULL; register unsigned int i = 0; @@ -304,6 +305,21 @@ md_begin () mips_isa = 1; } + switch (mips_isa) + { + case 1: + ok = bfd_set_arch_mach (stdoutput, bfd_arch_mips, 3000); + break; + case 2: + ok = bfd_set_arch_mach (stdoutput, bfd_arch_mips, 6000); + break; + case 3: + ok = bfd_set_arch_mach (stdoutput, bfd_arch_mips, 4000); + break; + } + if (! ok) + as_warn ("Could not set architecture and machine"); + if ((op_hash = hash_new ()) == NULL) { as_fatal ("Virtual memory exhausted"); @@ -726,6 +742,9 @@ append_insn (ip, address_expr, reloc_type) & (INSN_UNCOND_BRANCH_DELAY | INSN_COND_BRANCH_DELAY | INSN_COND_BRANCH_LIKELY)) + /* We can not swap with a trap instruction, since it + might change the PC. */ + || (prev_insn.insn_mo->pinfo & INSN_TRAP) /* If the branch reads a register that the previous instruction sets, we can not swap. */ || ((prev_insn.insn_mo->pinfo & INSN_WRITE_GPR_T) |