diff options
author | Dmitry Diky <diwil@spec.ru> | 2005-09-09 08:46:19 +0000 |
---|---|---|
committer | Dmitry Diky <diwil@spec.ru> | 2005-09-09 08:46:19 +0000 |
commit | 3e470ab5cd99c1faf078f5a8ac607deb1f97f8da (patch) | |
tree | b43d8878096381edb76416aefbced10babda3723 | |
parent | e04bcc6d6515854c03525b439a8ed67c3fb76cd2 (diff) | |
download | gdb-3e470ab5cd99c1faf078f5a8ac607deb1f97f8da.zip gdb-3e470ab5cd99c1faf078f5a8ac607deb1f97f8da.tar.gz gdb-3e470ab5cd99c1faf078f5a8ac607deb1f97f8da.tar.bz2 |
2005-09-09 Dmitry Diky <diwil@spec.ru>
* config/tc-msp430.c (msp430_operands): Undo last changes. Instead...
(msp430_relax_frag): add a guard check to ensure that final fr_subtype
has been reached.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-msp430.c | 19 |
2 files changed, 16 insertions, 9 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 8ec8162..a560e4a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2005-09-09 Dmitry Diky <diwil@spec.ru> + + * config/tc-msp430.c (msp430_operands): Undo last changes. Instead... + (msp430_relax_frag): add a guard check to ensure that final fr_subtype + has been reached. + 2005-09-08 Chao-ying Fu <fu@mips.com> * doc/as.texinfo: Document -mdsp and -mno-dsp options. diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c index e3a20cb..6978b85 100644 --- a/gas/config/tc-msp430.c +++ b/gas/config/tc-msp430.c @@ -1778,14 +1778,14 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) of the insn from the fix piece of instruction that was emitted. Since next fragments may have variable size we tie debug info to the beginning of the instruction. */ - frag = frag_more (0); + frag = frag_more (8); dwarf2_emit_insn (0); - frag = frag_var/*iant*/ (rs_machine_dependent, 8, 2, + bfd_putl16 ((bfd_vma) rc.sop, frag); + frag = frag_variant (rs_machine_dependent, 8, 2, ENCODE_RELAX (rc.lpos, STATE_BITS10), /* Wild guess. */ exp.X_add_symbol, 0, /* Offset is zero if jump dist less than 1K. */ (char *) frag); - bfd_putl16 ((bfd_vma) rc.sop, frag); break; } } @@ -1815,15 +1815,16 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) /* Relaxation required. */ struct hcodes_s hc = msp430_hcodes[opcode->insn_opnumb]; - frag = frag_more (0); + frag = frag_more (8); dwarf2_emit_insn (0); - frag = frag_var/*iant*/ (rs_machine_dependent, 8, 2, + bfd_putl16 ((bfd_vma) hc.op0, frag); + bfd_putl16 ((bfd_vma) hc.op1, frag+2); + + frag = frag_variant (rs_machine_dependent, 8, 2, ENCODE_RELAX (STATE_EMUL_BRANCH, STATE_BITS10), /* Wild guess. */ exp.X_add_symbol, 0, /* Offset is zero if jump dist less than 1K. */ (char *) frag); - bfd_putl16 ((bfd_vma) hc.op0, frag); - bfd_putl16 ((bfd_vma) hc.op1, frag+2); break; } } @@ -2305,7 +2306,7 @@ msp430_relax_frag (segT seg ATTRIBUTE_UNUSED, fragS * fragP, { /* Look backwards. */ for (next_state = this_type->rlx_more; next_state;) - if (aim >= this_type->rlx_backward) + if (aim >= this_type->rlx_backward || !this_type->rlx_backward) next_state = 0; else { @@ -2319,7 +2320,7 @@ msp430_relax_frag (segT seg ATTRIBUTE_UNUSED, fragS * fragP, { /* Look forwards. */ for (next_state = this_type->rlx_more; next_state;) - if (aim <= this_type->rlx_forward) + if (aim <= this_type->rlx_forward || !this_type->rlx_forward) next_state = 0; else { |