remove some duplicate #include's.
[deliverable/binutils-gdb.git] / gas / config / tc-msp430.c
index e3a20cb453213395b381513bb7bfc1455b74fc85..72c73da2f4a73c7b87ca803377c8133a53ffa3fe 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-msp430.c -- Assembler code for the Texas Instruments MSP430
 
-  Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+  Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
   Contributed by Dmitry Diky <diwil@mail.ru>
 
   This file is part of GAS, the GNU Assembler.
@@ -20,9 +20,6 @@
   the Free Software Foundation, 51 Franklin Street - Fifth Floor,
   Boston, MA 02110-1301, USA.  */
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
 #include <limits.h>
 
 #define PUSH_1X_WORKAROUND
@@ -34,7 +31,7 @@
 
 /*
    We will disable polymorphs by default because it is dangerous.
-   The potencial problem here is the following: assume we got the
+   The potential problem here is the following: assume we got the
    following code:
 
        jump .l1
@@ -168,7 +165,7 @@ static struct hcodes_s msp430_hcodes[] =
 
 const char comment_chars[] = ";";
 const char line_comment_chars[] = "#";
-const char line_separator_chars[] = "";
+const char line_separator_chars[] = "|";
 const char EXP_CHARS[] = "eE";
 const char FLT_CHARS[] = "dD";
 
@@ -487,7 +484,7 @@ skip_space (char * s)
   return s;
 }
 
-/* Extract one word from FROM and copy it to TO. Delimeters are ",;\n"  */
+/* Extract one word from FROM and copy it to TO. Delimiters are ",;\n"  */
 
 static char *
 extract_operand (char * from, char * to, int limit)
@@ -1778,14 +1775,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 +1812,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 +2303,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 +2317,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
          {
This page took 0.024827 seconds and 4 git commands to generate.