diff options
author | Alan Modra <amodra@gmail.com> | 2001-05-16 01:08:21 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-05-16 01:08:21 +0000 |
commit | 9fcc94b61152a17eb617087ed0d689d5f426883d (patch) | |
tree | 8f72671cdfc8c6dbb493b646523e73b5d545aa88 /gas/config/tc-v850.c | |
parent | 84fd0d38aef23f365fe9e1ef3dac9ed4f4ae3b4b (diff) | |
download | gdb-9fcc94b61152a17eb617087ed0d689d5f426883d.zip gdb-9fcc94b61152a17eb617087ed0d689d5f426883d.tar.gz gdb-9fcc94b61152a17eb617087ed0d689d5f426883d.tar.bz2 |
Fix dwarf2_emit_insn calls when frag_var breaks things.
Put back an old entry in ChangeLog-9899, deleted when ChangeLog split.
Diffstat (limited to 'gas/config/tc-v850.c')
-rw-r--r-- | gas/config/tc-v850.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index 89f4b98..ef22afe 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -1699,7 +1699,6 @@ md_assemble (str) int relaxable = 0; unsigned long insn; unsigned long insn_size; - unsigned long total_insn_size = 0; char *f; int i; int match; @@ -2150,6 +2149,11 @@ md_assemble (str) input_line_pointer = str; + /* Tie dwarf2 debug info to the address at the start of the insn. + We can't do this after the insn has been output as the current + frag may have been closed off. eg. by frag_var. */ + dwarf2_emit_insn (0); + /* Write out the instruction. */ if (relaxable && fc > 0) @@ -2175,7 +2179,6 @@ md_assemble (str) md_number_to_chars (f, insn, insn_size); md_number_to_chars (f + 2, 0, 4); } - total_insn_size = insn_size; } else { @@ -2190,15 +2193,11 @@ md_assemble (str) insn_size = 2; f = frag_more (insn_size); - total_insn_size = insn_size; - md_number_to_chars (f, insn, insn_size); if (extra_data_after_insn) { f = frag_more (extra_data_len); - total_insn_size += extra_data_len; - md_number_to_chars (f, extra_data, extra_data_len); extra_data_after_insn = false; @@ -2271,8 +2270,6 @@ md_assemble (str) } input_line_pointer = saved_input_line_pointer; - - dwarf2_emit_insn (total_insn_size); } /* If while processing a fixup, a reloc really needs to be created |