Remove trailing spaces in gas
[deliverable/binutils-gdb.git] / gas / config / tc-tic4x.c
index b1ed451ba40134a129795d641c8e694e6939a785..c27c8d1172aab9e6157ffd9aed73b725dc09a7af 100644 (file)
 
    You should have received a copy of the GNU General Public License
    along with GAS; see the file COPYING.  If not, write to
-   the Free Software Foundation, 51 Franklin Street - Fifth Floor, 
+   the Free Software Foundation, 51 Franklin Street - Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 /*
   TODOs:
   ------
-  
+
   o .align cannot handle fill-data-width larger than 0xFF/8-bits. It
     should be possible to define a 32-bits pattern.
 
@@ -195,10 +195,10 @@ const char comment_chars[] = ";";
 
 /* This array holds the chars that only start a comment at the beginning of
    a line.  If the line seems to have the form '# 123 filename'
-   .line and .file directives will appear in the pre-processed output. 
+   .line and .file directives will appear in the pre-processed output.
    Note that input_file.c hand checks for '#' at the beginning of the
    first line of the input file.  This is because the compiler outputs
-   #NO_APP at the beginning of its output. 
+   #NO_APP at the beginning of its output.
    Also note that comments like this one will always work.  */
 const char line_comment_chars[] = "#*";
 
@@ -250,7 +250,7 @@ tic4x_gen_to_words (FLONUM_TYPE flonum, LITTLENUM_TYPE *words, int precision)
      The code in this function is altered slightly to support floats
      with 31-bits mantissas, thus the documentation below may be a
      little bit inaccurate.
-     
+
      By Michael P. Hayes <m.hayes@elec.canterbury.ac.nz>
      Here is how a generic floating point number is stored using
      flonums (an extension of bignums) where p is a pointer to an
@@ -398,7 +398,7 @@ tic4x_gen_to_words (FLONUM_TYPE flonum, LITTLENUM_TYPE *words, int precision)
       /* +INF:  Replace with maximum float.  */
       if (precision == S_PRECISION)
        words[0] = 0x77ff;
-      else 
+      else
        {
          words[0] = 0x7f7f;
          words[1] = 0xffff;
@@ -415,7 +415,7 @@ tic4x_gen_to_words (FLONUM_TYPE flonum, LITTLENUM_TYPE *words, int precision)
       /* -INF:  Replace with maximum float.  */
       if (precision == S_PRECISION)
        words[0] = 0x7800;
-      else 
+      else
         words[0] = 0x7f80;
       if (precision == E_PRECISION)
         words[2] = 0x8000;
@@ -617,7 +617,7 @@ tic4x_atof (char *str, char what_kind, LITTLENUM_TYPE *words)
   return return_value;
 }
 
-static void 
+static void
 tic4x_insert_reg (char *regname, int regnum)
 {
   char buf[32];
@@ -633,7 +633,7 @@ tic4x_insert_reg (char *regname, int regnum)
                                   &zero_address_frag));
 }
 
-static void 
+static void
 tic4x_insert_sym (char *symname, int value)
 {
   symbolS *symbolP;
@@ -672,7 +672,7 @@ tic4x_expression_abs (char *str, offsetT *value)
   return s;
 }
 
-static void 
+static void
 tic4x_emit_char (char c, int b)
 {
   expressionS exp;
@@ -682,7 +682,7 @@ tic4x_emit_char (char c, int b)
   emit_expr (&exp, b);
 }
 
-static void 
+static void
 tic4x_seg_alloc (char *name ATTRIBUTE_UNUSED,
                 segT seg ATTRIBUTE_UNUSED,
                 int size,
@@ -707,7 +707,7 @@ tic4x_seg_alloc (char *name ATTRIBUTE_UNUSED,
 }
 
 /* .asg ["]character-string["], symbol */
-static void 
+static void
 tic4x_asg (int x ATTRIBUTE_UNUSED)
 {
   char c;
@@ -744,7 +744,7 @@ tic4x_asg (int x ATTRIBUTE_UNUSED)
 }
 
 /* .bss symbol, size  */
-static void 
+static void
 tic4x_bss (int x ATTRIBUTE_UNUSED)
 {
   char c;
@@ -828,7 +828,7 @@ tic4x_globl (int ignore ATTRIBUTE_UNUSED)
 }
 
 /* Handle .byte, .word. .int, .long */
-static void 
+static void
 tic4x_cons (int bytes)
 {
   unsigned int c;
@@ -871,7 +871,7 @@ tic4x_cons (int bytes)
 }
 
 /* Handle .ascii, .asciz, .string */
-static void 
+static void
 tic4x_stringer (int append_zero)
 {
   int bytes;
@@ -924,7 +924,7 @@ tic4x_stringer (int append_zero)
 }
 
 /* .eval expression, symbol */
-static void 
+static void
 tic4x_eval (int x ATTRIBUTE_UNUSED)
 {
   char c;
@@ -947,7 +947,7 @@ tic4x_eval (int x ATTRIBUTE_UNUSED)
 }
 
 /* Reset local labels.  */
-static void 
+static void
 tic4x_newblock (int x ATTRIBUTE_UNUSED)
 {
   dollar_label_clear ();
@@ -955,7 +955,7 @@ tic4x_newblock (int x ATTRIBUTE_UNUSED)
 
 /* .sect "section-name" [, value] */
 /* .sect ["]section-name[:subsection-name]["] [, value] */
-static void 
+static void
 tic4x_sect (int x ATTRIBUTE_UNUSED)
 {
   char c;
@@ -1026,7 +1026,7 @@ tic4x_sect (int x ATTRIBUTE_UNUSED)
 }
 
 /* symbol[:] .set value  or  .set symbol, value */
-static void 
+static void
 tic4x_set (int x ATTRIBUTE_UNUSED)
 {
   symbolS *symbolP;
@@ -1056,7 +1056,7 @@ tic4x_set (int x ATTRIBUTE_UNUSED)
 }
 
 /* [symbol] .usect ["]section-name["], size-in-words [, alignment-flag] */
-static void 
+static void
 tic4x_usect (int x ATTRIBUTE_UNUSED)
 {
   char c;
@@ -1122,7 +1122,7 @@ tic4x_usect (int x ATTRIBUTE_UNUSED)
 }
 
 /* .version cpu-version.  */
-static void 
+static void
 tic4x_version (int x ATTRIBUTE_UNUSED)
 {
   offsetT temp;
@@ -1139,7 +1139,7 @@ tic4x_version (int x ATTRIBUTE_UNUSED)
   demand_empty_rest_of_line ();
 }
 
-static void 
+static void
 tic4x_init_regtable (void)
 {
   unsigned int i;
@@ -1157,7 +1157,7 @@ tic4x_init_regtable (void)
     }
 }
 
-static void 
+static void
 tic4x_init_symbols (void)
 {
   /* The TI tools accept case insensitive versions of these symbols,
@@ -1188,7 +1188,7 @@ tic4x_init_symbols (void)
      Source: TI: TMS320C3x/C4x Assembly Language Tools User's Guide,
      1997, SPRU035C, p. 3-17/3-18.  */
   tic4x_insert_sym (".REGPARM", tic4x_reg_args);
-  tic4x_insert_sym (".MEMPARM", !tic4x_reg_args);      
+  tic4x_insert_sym (".MEMPARM", !tic4x_reg_args);
   tic4x_insert_sym (".BIGMODEL", tic4x_big_model);
   tic4x_insert_sym (".C30INTERRUPT", 0);
   tic4x_insert_sym (".TMS320xx", tic4x_cpu == 0 ? 40 : tic4x_cpu);
@@ -1214,7 +1214,7 @@ tic4x_init_symbols (void)
 }
 
 /* Insert a new instruction template into hash table.  */
-static int 
+static int
 tic4x_inst_insert (const tic4x_inst_t *inst)
 {
   static char prev_name[16];
@@ -1264,7 +1264,7 @@ tic4x_inst_make (char *name, unsigned long opcode, char *args)
 }
 
 /* Add instruction template, creating dynamic templates as required.  */
-static int 
+static int
 tic4x_inst_add (const tic4x_inst_t *insts)
 {
   char *s = insts->name;
@@ -1335,7 +1335,7 @@ tic4x_inst_add (const tic4x_inst_t *insts)
 /* This function is called once, at assembler startup time.  It should
    set up all the tables, etc., that the MD part of the assembler will
    need.  */
-void 
+void
 md_begin (void)
 {
   int ok = 1;
@@ -1392,14 +1392,14 @@ md_begin (void)
   tic4x_init_symbols ();
 }
 
-void 
+void
 tic4x_end (void)
 {
-  bfd_set_arch_mach (stdoutput, bfd_arch_tic4x, 
+  bfd_set_arch_mach (stdoutput, bfd_arch_tic4x,
                     IS_CPU_TIC4X (tic4x_cpu) ? bfd_mach_tic4x : bfd_mach_tic3x);
 }
 
-static int 
+static int
 tic4x_indirect_parse (tic4x_operand_t *operand,
                      const tic4x_indirect_t *indirect)
 {
@@ -1662,7 +1662,7 @@ tic4x_operand_parse (char *s, tic4x_operand_t *operand)
   return new_pointer;
 }
 
-static int 
+static int
 tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check)
 {
   const char *args = inst->args;
@@ -1824,7 +1824,7 @@ tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check)
           if (!(operand->mode == M_REGISTER))
             break;
          reg = exp->X_add_number;
-         if ( (reg >= REG_R0 && reg <= REG_R7) 
+         if ( (reg >= REG_R0 && reg <= REG_R7)
                || (IS_CPU_TIC4X (tic4x_cpu) && reg >= REG_R8 && reg <= REG_R11) )
            INSERTU (opcode, reg, 7, 0);
          else
@@ -1864,7 +1864,7 @@ tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check)
          if (operand->mode != M_REGISTER)
            break;
          reg = exp->X_add_number;
-         if ( (reg >= REG_R0 && reg <= REG_R7) 
+         if ( (reg >= REG_R0 && reg <= REG_R7)
                || (IS_CPU_TIC4X (tic4x_cpu) && reg >= REG_R8 && reg <= REG_R11) )
            INSERTU (opcode, reg, 15, 8);
          else
@@ -2055,7 +2055,7 @@ tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check)
          if (operand->mode != M_REGISTER)
            break;
          reg = exp->X_add_number;
-         if ( (reg >= REG_R0 && reg <= REG_R7) 
+         if ( (reg >= REG_R0 && reg <= REG_R7)
                || (IS_CPU_TIC4X (tic4x_cpu) && reg >= REG_R8 && reg <= REG_R11) )
            INSERTU (opcode, reg, 15, 0);
          else
@@ -2077,7 +2077,7 @@ tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check)
          if (operand->mode != M_REGISTER)
            break;
          reg = exp->X_add_number;
-         if ( (reg >= REG_R0 && reg <= REG_R7) 
+         if ( (reg >= REG_R0 && reg <= REG_R7)
                || (IS_CPU_TIC4X (tic4x_cpu) && reg >= REG_R8 && reg <= REG_R11) )
            INSERTU (opcode, reg, 20, 16);
          else
@@ -2336,7 +2336,7 @@ tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check)
 static void
 tic4x_insn_check (tic4x_insn_t *tinsn)
 {
-  
+
   if (!strcmp (tinsn->name, "lda"))
     {
       if (tinsn->num_operands < 2 || tinsn->num_operands > 2)
@@ -2356,7 +2356,7 @@ tic4x_insn_check (tic4x_insn_t *tinsn)
     {
       if (tinsn->num_operands < 4 || tinsn->num_operands > 5)
         as_fatal ("Illegal internal %s insn definition", tinsn->name);
-      
+
       if (tinsn->operands[1].mode == M_REGISTER
          && tinsn->operands[tinsn->num_operands-1].mode == M_REGISTER
          && tinsn->operands[1].expr.X_add_number == tinsn->operands[tinsn->num_operands-1].expr.X_add_number )
@@ -2364,7 +2364,7 @@ tic4x_insn_check (tic4x_insn_t *tinsn)
     }
 }
 
-static void 
+static void
 tic4x_insn_output (tic4x_insn_t *tinsn)
 {
   char *dst;
@@ -2389,7 +2389,7 @@ tic4x_insn_output (tic4x_insn_t *tinsn)
 }
 
 /* Parse the operands.  */
-static int 
+static int
 tic4x_operands_parse (char *s, tic4x_operand_t *operands, int num_operands)
 {
   if (!*s)
@@ -2410,7 +2410,7 @@ tic4x_operands_parse (char *s, tic4x_operand_t *operands, int num_operands)
 /* Assemble a single instruction.  Its label has already been handled
    by the generic front end.  We just parse mnemonic and operands, and
    produce the bytes of data and relocation.  */
-void 
+void
 md_assemble (char *str)
 {
   int ok = 0;
@@ -2427,7 +2427,7 @@ md_assemble (char *str)
       s = str;
       while (*s && *s != '|')
         s++;
-      
+
       if (*s && s[1]=='|')
         {
           if(insn->parallel)
@@ -2437,7 +2437,7 @@ md_assemble (char *str)
               insn->in_use = 0;
               return;
             }
-          
+
           /* Lets take care of the first part of the parallel insn */
           *s++ = 0;
           md_assemble(str);
@@ -2446,7 +2446,7 @@ md_assemble (char *str)
           /* .. and let the second run though here */
         }
     }
-  
+
   if (str && insn->parallel)
     {
       /* Find mnemonic (second part of parallel instruction).  */
@@ -2622,7 +2622,7 @@ md_atof (int type, char *litP, int *sizeP)
   return NULL;
 }
 
-void 
+void
 md_apply_fix (fixS *fixP, valueT *value, segT seg ATTRIBUTE_UNUSED)
 {
   char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
@@ -2666,7 +2666,7 @@ md_apply_fix (fixS *fixP, valueT *value, segT seg ATTRIBUTE_UNUSED)
 }
 
 /* Should never be called for tic4x.  */
-void 
+void
 md_convert_frag (bfd *headers ATTRIBUTE_UNUSED,
                 segT sec ATTRIBUTE_UNUSED,
                 fragS *fragP ATTRIBUTE_UNUSED)
@@ -2735,7 +2735,7 @@ md_parse_option (int c, char *arg)
       tic4x_reg_args = 0;
       break;
 
-    case 'r':                  
+    case 'r':
       as_warn (_("Option -r is depreciated, please use -mregparm"));
     case OPTION_REGPARM:        /* register args */
       tic4x_reg_args = 1;
@@ -2794,7 +2794,7 @@ md_show_usage (FILE *stream)
 /* This is called when a line is unrecognized.  This is used to handle
    definitions of TI C3x tools style local labels $n where n is a single
    decimal digit.  */
-int 
+int
 tic4x_unrecognized_line (int c)
 {
   int lab;
@@ -2871,7 +2871,7 @@ md_section_align (segT segment ATTRIBUTE_UNUSED, valueT size)
   return size;                 /* Byte (i.e., 32-bit) alignment is fine?  */
 }
 
-static int 
+static int
 tic4x_pc_offset (unsigned int op)
 {
   /* Determine the PC offset for a C[34]x instruction.
@@ -2948,7 +2948,7 @@ md_pcrel_from (fixS *fixP)
 
 /* Fill the alignment area with NOP's on .text, unless fill-data
    was specified. */
-int 
+int
 tic4x_do_align (int alignment,
                const char *fill,
                int len,
@@ -2956,7 +2956,7 @@ tic4x_do_align (int alignment,
 {
   /* Because we are talking lwords, not bytes, adjust alignment to do words */
   alignment += 2;
-  
+
   if (alignment != 0 && !need_pass_2)
     {
       if (fill == NULL)
@@ -2976,13 +2976,13 @@ tic4x_do_align (int alignment,
       else
        frag_align_pattern (alignment, fill, len, max);
     }
-  
+
   /* Return 1 to skip the default alignment function */
   return 1;
 }
 
 /* Look for and remove parallel instruction operator ||.  */
-void 
+void
 tic4x_start_line (void)
 {
   char *s = input_line_pointer;
This page took 0.030229 seconds and 4 git commands to generate.