This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch] config/tc-m68hc11.c: Fix formatting.


Hi,

Attached is to fix formatting of gas/config/tc-m68hc11.c.

Thanks,

Kazu Hirata

===File ~/gnu/binutils/ChangeLog-tc-m68hc11=================
2000-07-15  Kazu Hirata  <kazu@hxi.com>

	* config/tc-m68hc11.c: Fix formatting.

============================================================

===File ~/gnu/binutils/tc-m68hc11.patch=====================
Index: tc-m68hc11.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68hc11.c,v
retrieving revision 1.2
diff -u -r1.2 tc-m68hc11.c
--- tc-m68hc11.c	2000/07/07 16:58:24	1.2
+++ tc-m68hc11.c	2000/07/15 19:47:08
@@ -61,12 +61,12 @@
    How far Forward this mode will reach:
    How far Backward this mode will reach:
    How many bytes this mode will add to the size of the frag
-   Which mode to go to if the offset won't fit in this one    */
+   Which mode to go to if the offset won't fit in this one  */
 
 relax_typeS md_relax_table[] = {
-  {1, 1, 0, 0},			/* First entries aren't used */
-  {1, 1, 0, 0},			/* For no good reason except */
-  {1, 1, 0, 0},			/* that the VAX doesn't either */
+  {1, 1, 0, 0},			/* First entries aren't used.  */
+  {1, 1, 0, 0},			/* For no good reason except.  */
+  {1, 1, 0, 0},			/* that the VAX doesn't either.  */
   {1, 1, 0, 0},
 
   /* Relax for bcc <L>.
@@ -154,7 +154,7 @@
   {0, 0}
 };
 
-/* local functions */
+/* Local functions.  */
 static register_id reg_name_search PARAMS ((char *name));
 static register_id register_name PARAMS (());
 static int check_range PARAMS ((long num, int mode));
@@ -176,7 +176,7 @@
 	 int optimize));
 
 static void build_insn PARAMS ((struct m68hc11_opcode * opcode,
-			       operand operands[], int nb_operands));
+				operand operands[], int nb_operands));
 
 /* Controls whether relative branches can be turned into long branches.
    When the relative offset is too large, the insn are changed:
@@ -186,7 +186,7 @@
            jmp L
     dbcc -> db!cc +3
             jmp L
- 
+
   Setting the flag forbidds this.  */
 static short flag_fixed_branchs = 0;
 
@@ -245,7 +245,6 @@
 
   {0, 0, 0}
 };
-
 
 /* Options and initialization.  */
 
@@ -303,7 +302,6 @@
   return 0;
 }
 
-
 void
 md_show_usage (stream)
      FILE *stream;
@@ -436,7 +434,7 @@
   return 0;
 }
 
-/* Equal to MAX_PRECISION in atof-ieee.c */
+/* Equal to MAX_PRECISION in atof-ieee.c.  */
 #define MAX_LITTLENUMS 6
 
 /* Turn a string in input_line_pointer into a floating point constant
@@ -507,7 +505,6 @@
   return ((addr + (1 << align) - 1) & (-1 << align));
 }
 
-
 static int
 cmp_opcode (op1, op2)
      struct m68hc11_opcode *op1;
@@ -620,7 +617,6 @@
 m68hc11_init_after_args ()
 {
 }
-
 
 /* Builtin help.  */
 
@@ -783,7 +779,6 @@
   printf ("\n");
 }
 
-
 /* Print the instruction format.  This operation is called when some
    instruction is not correct.  Instruction format is printed as an
    error message.  */
@@ -816,7 +811,6 @@
     }
   while (strcmp (opcode->name, name) == 0);
 }
-
 
 /* Analysis of 68HC11 and 68HC12 operands.  */
 
@@ -906,7 +900,6 @@
    A,r B,r D,r          M6811_OP_REG    M6812_OP_REG  O_register   O_register
    [D,r]                M6811_OP_IDX_2  M6812_OP_REG  O_register   O_register
    [n,r]                M6811_OP_IDX_1  M6812_OP_REG  O_constant   O_register
-
 */
 
 static int
@@ -942,7 +935,7 @@
       if (!(opmode & (M6811_OP_IMM8 | M6811_OP_IMM16 | M6811_OP_BITMASK)))
 	{
 	  as_bad (_("Immediate operand is not allowed for operand %d."),
-                  which);
+		  which);
 	  return -1;
 	}
 
@@ -1115,7 +1108,7 @@
 	  input_line_pointer = p;
 	  reg = register_name ();
 
-	  /* Backtrack... */
+	  /* Backtrack.  */
 	  if (which == 0 && opmode & M6812_OP_IDX_P2
 	      && reg != REG_X && reg != REG_Y
 	      && reg != REG_PC && reg != REG_SP)
@@ -1255,7 +1248,6 @@
       return 0;
     }
 }
-
 
 /* Gas fixup generation.  */
 
@@ -1342,7 +1334,7 @@
       if (!check_range (oper->X_add_number, mode))
 	{
 	  as_bad (_("Operand out of 16-bit range: `%ld'."),
-                  oper->X_add_number);
+		  oper->X_add_number);
 	}
       number_to_chars_bigendian (f, oper->X_add_number & 0x0FFFF, 2);
     }
@@ -1365,7 +1357,6 @@
       as_fatal (_("Operand `%x' not recognized in fixup16."), oper->X_op);
     }
 }
-
 
 /* 68HC11 and 68HC12 code generation.  */
 
@@ -1389,11 +1380,11 @@
 
 /* Start a new insn that contains at least 'size' bytes.  Record the
    line information of that insn in the dwarf2 debug sections.  */
-static char*
+static char *
 m68hc11_new_insn (size)
      int size;
 {
-  char* f;
+  char *f;
 
   f = frag_more (size);
 
@@ -1401,7 +1392,7 @@
   if (debug_type == DEBUG_DWARF2)
     {
       bfd_vma addr;
-          
+
       dwarf2_where (&debug_line);
       addr = frag_now->fr_address + frag_now_fix () - size;
       dwarf2_gen_line_info (addr, &debug_line);
@@ -1666,7 +1657,7 @@
 	  if (!check_range (val, mode))
 	    {
 	      as_bad (_("Increment/decrement value is out of range: `%ld'."),
-                      val);
+		      val);
 	    }
 	  if (mode & (M6812_POST_INC | M6812_PRE_INC))
 	    byte |= (val - 1) & 0x07;
@@ -1772,9 +1763,10 @@
 	}
       f = frag_more (1);
       number_to_chars_bigendian (f, byte, 1);
-      /*
-         fix_new_exp (frag_now, f - frag_now->fr_literal, 2,
-         &op->exp, false, BFD_RELOC_16); */
+#if 0
+      fix_new_exp (frag_now, f - frag_now->fr_literal, 2,
+		   &op->exp, false, BFD_RELOC_16);
+#endif
       frag_var (rs_machine_dependent, 2, 2,
 		ENCODE_RELAX (STATE_INDEXED_OFFSET, STATE_UNDF),
 		op->exp.X_add_symbol, val, f);
@@ -1988,7 +1980,6 @@
       fixup16 (&operands[1].exp, M6811_OP_IND16, operands[1].mode);
     }
 }
-
 
 /* Opcode identification and operand analysis.  */
 
@@ -2144,7 +2135,6 @@
   return opcode;
 }
 
-
 /* Find the real opcode and its associated operands.  We use a progressive
    approach here.  On entry, 'opc' points to the first opcode in the
    table that matches the opcode name in the source line.  We try to
@@ -2208,7 +2198,6 @@
 #define M6812_XBCC_MARKER (M6812_OP_TBCC_MARKER \
                            | M6812_OP_DBCC_MARKER \
                            | M6812_OP_IBCC_MARKER)
-
 
 /* Gas line assembler entry point.  */
 
@@ -2231,7 +2220,7 @@
   int branch_optimize = 0;
   int alias_id = -1;
 
-  /* Drop leading whitespace */
+  /* Drop leading whitespace.  */
   while (*str == ' ')
     str++;
 
@@ -2343,7 +2332,7 @@
   if (alias_id >= 0)
     {
       char *f = m68hc11_new_insn (m68hc12_alias[alias_id].size);
-      
+
       number_to_chars_bigendian (f, m68hc12_alias[alias_id].code1, 1);
       if (m68hc12_alias[alias_id].size > 1)
 	number_to_chars_bigendian (f + 1, m68hc12_alias[alias_id].code2, 1);
@@ -2378,7 +2367,6 @@
   else
     build_insn (opcode, operands, nb_operands);
 }
-
 
 /* Relocation, relaxation and frag conversions.  */
 
@@ -2390,7 +2378,7 @@
   int adjust;
   if (fixp->fx_addsy != (symbolS *) NULL
       && (!S_IS_DEFINED (fixp->fx_addsy)
-          || (S_GET_SEGMENT (fixp->fx_addsy) != sec)))
+	  || (S_GET_SEGMENT (fixp->fx_addsy) != sec)))
     return 0;
 
   adjust = fixp->fx_pcrel_adjust;
@@ -2480,7 +2468,7 @@
     case ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_WORD):
       /* Invert branch.  */
       fragP->fr_opcode[0] ^= 1;
-      fragP->fr_opcode[1] = 3;	/* Branch offset */
+      fragP->fr_opcode[1] = 3;	/* Branch offset.  */
       buffer_address[0] = M6811_JMP;
       fix_new (fragP, fragP->fr_fix + 1, 2,
 	       fragP->fr_symbol, fragP->fr_offset, 0, BFD_RELOC_16);
@@ -2597,8 +2585,8 @@
 	}
       else
 	{
-	  fragP->fr_opcode[0] ^= 1;	/* Reverse sense of branch. */
-	  fragP->fr_opcode[1] = 3;	/* Skip next jmp insn (3 bytes) */
+	  fragP->fr_opcode[0] ^= 1;	/* Reverse sense of branch.  */
+	  fragP->fr_opcode[1] = 3;	/* Skip next jmp insn (3 bytes).  */
 
 	  /* Don't use fr_opcode[2] because this may be
              in a different frag.  */
@@ -2643,7 +2631,7 @@
 	}
       else
 	{
-	  fragP->fr_opcode[0] ^= 0x20;	/* Reverse sense of branch. */
+	  fragP->fr_opcode[0] ^= 0x20;	/* Reverse sense of branch.  */
 	  fragP->fr_opcode[1] = 3;	/* Skip next jmp insn (3 bytes).  */
 
 	  /* Don't use fr_opcode[2] because this may be
@@ -2751,16 +2739,20 @@
 
     case BFD_RELOC_M68HC11_HI8:
       value = value >> 8;
-      /* Fall through */
+      /* Fall through.  */
 
     case BFD_RELOC_M68HC11_LO8:
     case BFD_RELOC_8:
-      /*bfd_putb8 ((bfd_vma) value, (unsigned char *) where); */
+#if 0
+      bfd_putb8 ((bfd_vma) value, (unsigned char *) where);
+#endif
       ((bfd_byte *) where)[0] = (bfd_byte) value;
       break;
 
     case BFD_RELOC_8_PCREL:
-      /*bfd_putb8 ((bfd_vma) value, (unsigned char *) where); */
+#if 0
+      bfd_putb8 ((bfd_vma) value, (unsigned char *) where);
+#endif
       ((bfd_byte *) where)[0] = (bfd_byte) value;
 
       if (value < -128 || value > 127)
@@ -2801,12 +2793,12 @@
   segT saved_seg;
   subsegT saved_subseg;
   segT debug_info;
-  char* p;
+  char *p;
   long total_size = 0;
-  
+
   if (debug_type != DEBUG_DWARF2)
     return;
-  
+
   dwarf2_finish ();
 
   saved_seg = now_seg;
@@ -2817,7 +2809,7 @@
   subseg_set (debug_info, 0);
   p = frag_more (10);
   total_size = 12;
-  
+
 # define STUFF(val,size)	md_number_to_chars (p, val, size); p += size;
   STUFF (total_size, 4); /* Length of compilation unit.  */
   STUFF (2, 2); /* Dwarf version */
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]