Remove trailing spaces in gas
[deliverable/binutils-gdb.git] / gas / config / tc-ia64.c
index a4e702f7eb5bb850be6c7e4fada5f22249da92e4..d11570a9f1c7af0f913c8971afced2c7fdb8ee1e 100644 (file)
@@ -1,6 +1,5 @@
 /* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-   2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+   Copyright (C) 1998-2015 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
    This file is part of GAS, the GNU Assembler.
@@ -830,7 +829,7 @@ ar_is_only_in_integer_unit (int reg)
   return reg >= 64 && reg <= 111;
 }
 
-/* Determine if application register REGNUM resides only in the memory 
+/* Determine if application register REGNUM resides only in the memory
    unit (as opposed to the integer unit).  */
 static int
 ar_is_only_in_memory_unit (int reg)
@@ -2978,7 +2977,7 @@ ia64_estimate_size_before_relax (fragS *frag,
 }
 
 /* This function converts a rs_machine_dependent variant frag into a
-  normal fill frag with the unwind image from the the record list.  */
+  normal fill frag with the unwind image from the record list.  */
 void
 ia64_convert_frag (fragS *frag)
 {
@@ -3688,7 +3687,7 @@ generate_unwind_image (const segT text_seg)
 
       /* Set expression which points to start of unwind descriptor area.  */
       unwind.info = expr_build_dot ();
-      
+
       frag_var (rs_machine_dependent, size, size, 0, 0,
                (offsetT) (long) unwind.personality_routine,
                (char *) list);
@@ -4467,14 +4466,15 @@ dot_endp (int dummy ATTRIBUTE_UNUSED)
                                          symbol_get_frag (unwind.proc_pending.sym));
       else
        e.X_add_symbol = unwind.proc_pending.sym;
-      ia64_cons_fix_new (frag_now, where, bytes_per_address, &e);
+      ia64_cons_fix_new (frag_now, where, bytes_per_address, &e,
+                        BFD_RELOC_NONE);
 
       e.X_op = O_pseudo_fixup;
       e.X_op_symbol = pseudo_func[FUNC_SEG_RELATIVE].u.sym;
       e.X_add_number = 0;
       e.X_add_symbol = proc_end;
       ia64_cons_fix_new (frag_now, where + bytes_per_address,
-                        bytes_per_address, &e);
+                        bytes_per_address, &e, BFD_RELOC_NONE);
 
       if (unwind.info)
        {
@@ -4483,7 +4483,7 @@ dot_endp (int dummy ATTRIBUTE_UNUSED)
          e.X_add_number = 0;
          e.X_add_symbol = unwind.info;
          ia64_cons_fix_new (frag_now, where + (bytes_per_address * 2),
-                            bytes_per_address, &e);
+                            bytes_per_address, &e, BFD_RELOC_NONE);
        }
     }
   subseg_set (saved_seg, saved_subseg);
@@ -6009,10 +6009,10 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e)
       if (e->X_op == O_constant)
        {
          /* 5-bit signed scaled by 64 */
-         if ((e->X_add_number <=       ( 0xf  << 6 )) 
+         if ((e->X_add_number <=       ( 0xf  << 6 ))
               && (e->X_add_number >=  -( 0x10 << 6 )))
            {
-             
+
              /* Must be a multiple of 64 */
              if ((e->X_add_number & 0x3f) != 0)
                as_warn (_("stride must be a multiple of 64; lower 6 bits ignored"));
@@ -6028,7 +6028,7 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e)
       if (e->X_op == O_constant)
        {
          /* 6-bit unsigned biased by 1 -- count 0 is meaningless */
-         if ((e->X_add_number     <=   64) 
+         if ((e->X_add_number     <=   64)
               && (e->X_add_number > 0) )
            {
              return OPERAND_MATCH;
@@ -6143,7 +6143,7 @@ parse_operands (struct ia64_opcode *idesc)
 
   for (; ; ++i)
     {
-      if (i < NELEMS (CURR_SLOT.opnd)) 
+      if (i < NELEMS (CURR_SLOT.opnd))
        {
          sep = parse_operand_maybe_eval (CURR_SLOT.opnd + i, '=',
                                          idesc->operands[i]);
@@ -6934,15 +6934,6 @@ emit_one_bundle (void)
          md.slot[curr].unwind_record = NULL;
        }
 
-      if (required_unit == IA64_UNIT_L)
-       {
-         know (i == 1);
-         /* skip one slot for long/X-unit instructions */
-         ++i;
-       }
-      --md.num_slots_in_use;
-      last_slot = i;
-
       for (j = 0; j < md.slot[curr].num_fixups; ++j)
        {
          ifix = md.slot[curr].fixup + j;
@@ -6955,6 +6946,17 @@ emit_one_bundle (void)
 
       end_of_insn_group = md.slot[curr].end_of_insn_group;
 
+      /* This adjustment to "i" must occur after the fix, otherwise the fix
+        is assigned to the wrong slot, and the VMS linker complains.  */
+      if (required_unit == IA64_UNIT_L)
+       {
+         know (i == 1);
+         /* skip one slot for long/X-unit instructions */
+         ++i;
+       }
+      --md.num_slots_in_use;
+      last_slot = i;
+
       /* clear slot:  */
       ia64_free_opcode (md.slot[curr].idesc);
       memset (md.slot + curr, 0, sizeof (md.slot[curr]));
@@ -7009,7 +7011,7 @@ emit_one_bundle (void)
        as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
                      _("Missing '}' at end of file"));
     }
-       
+
   know (md.num_slots_in_use < NUM_SLOTS);
 
   t0 = end_of_insn_group | (template_val << 1) | (insn[0] << 5) | (insn[1] << 46);
@@ -9651,7 +9653,7 @@ update_qp_mutex (valueT mask)
                  print_prmask (qp_mutexes[i].prmask);
                  fprintf (stderr, "\n");
                }
-             
+
              /* Deal with the old mutex with more than 3+ PRs only if
                 the new mutex on the same execution path with it.
 
@@ -9664,7 +9666,7 @@ update_qp_mutex (valueT mask)
                  if (add == 0
                      && (qp_mutexes[i].prmask & mask) == mask)
                    add = 1;
-                 
+
                  qp_mutexes[i].prmask &= ~mask;
                  if (qp_mutexes[i].prmask & (qp_mutexes[i].prmask - 1))
                    {
@@ -9674,7 +9676,7 @@ update_qp_mutex (valueT mask)
                      i++;
                    }
                }
-             
+
              if (keep == 0)
                /* Remove the mutex.  */
                qp_mutexes[i] = qp_mutexes[--qp_mutexeslen];
@@ -10795,7 +10797,7 @@ md_assemble (char *str)
     {
       enum ia64_opnd opnd1, opnd2;
       int rop;
-      
+
       opnd1 = idesc->operands[0];
       opnd2 = idesc->operands[1];
       if (opnd1 == IA64_OPND_AR3)
@@ -11055,9 +11057,9 @@ ia64_dwarf2_emit_offset (symbolS *symbol, unsigned int size)
    fixup.  We pick the right reloc code depending on the byteorder
    currently in effect.  */
 void
-ia64_cons_fix_new (fragS *f, int where, int nbytes, expressionS *exp)
+ia64_cons_fix_new (fragS *f, int where, int nbytes, expressionS *exp,
+                  bfd_reloc_code_real_type code)
 {
-  bfd_reloc_code_real_type code;
   fixS *fix;
 
   switch (nbytes)
@@ -11698,7 +11700,7 @@ ia64_handle_align (fragS *fragp)
   bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
   p = fragp->fr_literal + fragp->fr_fix;
 
-  /* If no paddings are needed, we check if we need a stop bit.  */ 
+  /* If no paddings are needed, we check if we need a stop bit.  */
   if (!bytes && fragp->tc_frag_data)
     {
       if (fragp->fr_fix < 16)
@@ -11879,7 +11881,7 @@ dot_alias (int section)
   h = (struct alias *) xmalloc (sizeof (struct alias));
   as_where (&h->file, &h->line);
   h->name = name;
-  
+
   error_string = hash_jam (ahash, alias, (void *) h);
   if (error_string)
     {
@@ -11999,7 +12001,7 @@ ia64_vms_note (void)
   bname = xstrdup (lbasename (out_file_name));
   if ((p = strrchr (bname, '.')))
     *p = '\0';
-  
+
   /* VMS note header is 24 bytes long.  */
   p = frag_more (8 + 8 + 8);
   number_to_chars_littleendian (p + 0, 8, 8);
This page took 0.031001 seconds and 4 git commands to generate.