From d4f4f3fb2b6ee551c8a1255e1d3af7fcf8160487 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 8 Sep 2009 10:36:39 +0000 Subject: [PATCH] * read.c (emit_expr_fix): Handle size 3. * config/tc-avr.c (md_assemble): Call dwarf2_emit_insn. * config/tc-d30v.c (write_long, write_1_short, write_2_short, md_assemble): Likewise. * config/tc-dlx.c (md_assemble): Likewise. * config/tc-i860.c (md_assemble): Likewise. * config/tc-mn10200.c (md_assemble): Likewise. * config/tc-pj.c (md_assemble): Likewise. * config/tc-vax.c (md_assemble): Likewise. --- gas/ChangeLog | 12 ++++++++++++ gas/config/tc-avr.c | 2 ++ gas/config/tc-d30v.c | 5 +++++ gas/config/tc-dlx.c | 2 ++ gas/config/tc-i860.c | 1 + gas/config/tc-mn10200.c | 3 ++- gas/config/tc-pj.c | 1 + gas/config/tc-vax.c | 1 + gas/read.c | 3 +++ 9 files changed, 29 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index dbb2227505c..d9c2113f538 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,15 @@ +2009-09-08 Alan Modra + + * read.c (emit_expr_fix): Handle size 3. + * config/tc-avr.c (md_assemble): Call dwarf2_emit_insn. + * config/tc-d30v.c (write_long, write_1_short, + write_2_short, md_assemble): Likewise. + * config/tc-dlx.c (md_assemble): Likewise. + * config/tc-i860.c (md_assemble): Likewise. + * config/tc-mn10200.c (md_assemble): Likewise. + * config/tc-pj.c (md_assemble): Likewise. + * config/tc-vax.c (md_assemble): Likewise. + 2009-09-07 Daniel Gutson * config/tc-arm.c (arm_cpus): cortex-r4f CPU added. diff --git a/gas/config/tc-avr.c b/gas/config/tc-avr.c index 5f243b43cb5..9d14f6418ea 100644 --- a/gas/config/tc-avr.c +++ b/gas/config/tc-avr.c @@ -1366,6 +1366,8 @@ md_assemble (char *str) if (!avr_opt.all_opcodes && (opcode->isa & avr_mcu->isa) != opcode->isa) as_bad (_("illegal opcode %s for mcu %s"), opcode->name, avr_mcu->name); + dwarf2_emit_insn (0); + /* We used to set input_line_pointer to the result of get_operands, but that is wrong. Our caller assumes we don't change it. */ { diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c index 5e3e96efb9a..3e95375626d 100644 --- a/gas/config/tc-d30v.c +++ b/gas/config/tc-d30v.c @@ -23,6 +23,7 @@ #include "safe-ctype.h" #include "subsegs.h" #include "opcode/d30v.h" +#include "dwarf2dbg.h" const char comment_chars[] = ";"; const char line_comment_chars[] = "#"; @@ -593,6 +594,7 @@ write_long (struct d30v_insn *opcode ATTRIBUTE_UNUSED, int i, where; char *f = frag_more (8); + dwarf2_emit_insn (8); insn |= FM11; d30v_number_to_chars (f, insn, 8); @@ -620,6 +622,7 @@ write_1_short (struct d30v_insn *opcode, char *f = frag_more (8); int i, where; + dwarf2_emit_insn (8); if (warn_nops == NOP_ALL) as_warn (_("%s NOP inserted"), use_sequential ? _("sequential") : _("parallel")); @@ -1087,6 +1090,7 @@ write_2_short (struct d30v_insn *opcode1, } f = frag_more (8); + dwarf2_emit_insn (8); d30v_number_to_chars (f, insn, 8); /* If the previous instruction was a 32-bit multiply but it is put into a @@ -1684,6 +1688,7 @@ md_assemble (char *str) else { f = frag_more (8); + dwarf2_emit_insn (8); d30v_number_to_chars (f, NOP2, 8); if (warn_nops == NOP_ALL || warn_nops == NOP_MULTIPLY) diff --git a/gas/config/tc-dlx.c b/gas/config/tc-dlx.c index 65e4b552f33..6cf1fcd1a49 100644 --- a/gas/config/tc-dlx.c +++ b/gas/config/tc-dlx.c @@ -909,6 +909,8 @@ md_assemble (char *str) know (str); machine_ip (str); toP = frag_more (4); + dwarf2_emit_insn (4); + /* Put out the opcode. */ md_number_to_chars (toP, the_insn.opcode, 4); diff --git a/gas/config/tc-i860.c b/gas/config/tc-i860.c index ec9bda8a33e..32aed0fc7a9 100644 --- a/gas/config/tc-i860.c +++ b/gas/config/tc-i860.c @@ -408,6 +408,7 @@ md_assemble (char *str) as_warn (_("An instruction was expanded (%s)"), str); } + dwarf2_emit_insn (0); i = 0; do { diff --git a/gas/config/tc-mn10200.c b/gas/config/tc-mn10200.c index fa78d53da30..4f7cccb51e5 100644 --- a/gas/config/tc-mn10200.c +++ b/gas/config/tc-mn10200.c @@ -1,6 +1,6 @@ /* tc-mn10200.c -- Assembler code for the Matsushita 10200 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007 Free Software Foundation, Inc. + 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -1156,6 +1156,7 @@ keep_going: abort (); /* Write out the instruction. */ + dwarf2_emit_insn (0); if (relaxable && fc > 0) { /* On a 64-bit host the size of an 'int' is not the same diff --git a/gas/config/tc-pj.c b/gas/config/tc-pj.c index 1c8471f575d..8f49e8f70ae 100644 --- a/gas/config/tc-pj.c +++ b/gas/config/tc-pj.c @@ -261,6 +261,7 @@ md_assemble (char *str) return; } + dwarf2_emit_insn (0); if (opcode->opcode == -1) { /* It's a fake opcode. Dig out the args and pretend that was diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c index 7db0991035c..33353dab4b0 100644 --- a/gas/config/tc-vax.c +++ b/gas/config/tc-vax.c @@ -2713,6 +2713,7 @@ md_assemble (char *instruction_string) if (need_pass_2 || goofed) return; + dwarf2_emit_insn (0); /* Emit op-code. */ /* Remember where it is, in case we want to modify the op-code later. */ opcode_low_byteP = frag_more (v.vit_opcode_nbytes); diff --git a/gas/read.c b/gas/read.c index 9c38bc86252..5a384a655d2 100644 --- a/gas/read.c +++ b/gas/read.c @@ -4265,6 +4265,9 @@ emit_expr_fix (expressionS *exp, unsigned int nbytes, fragS *frag, char *p) case 2: r = BFD_RELOC_16; break; + case 3: + r = BFD_RELOC_24; + break; case 4: r = BFD_RELOC_32; break; -- 2.30.2