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]
Other format: [Raw text]

[patch] tc-mips.c, tc-s390.[ch]: Fix formatting.


Hi,

Attached is a patch to fix formatting.  OK to apply?

Kazu Hirata

2002-05-04  Kazu Hirata  <kazu@cs.umass.edu>

	* config/tc-mips.c: Fix formatting.
	* config/tc-s390.c: Likewise.
	* config/tc-s390.h: Likewise.

Index: tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.118
diff -u -r1.118 tc-mips.c
--- tc-mips.c	24 Apr 2002 21:52:47 -0000	1.118
+++ tc-mips.c	4 May 2002 15:54:05 -0000
@@ -1,5 +1,5 @@
 /* tc-mips.c -- assemble code for a MIPS chip.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Contributed by the OSF and Ralph Campbell.
    Written by Keith Knowles and Ralph Campbell, working independently.
@@ -2121,21 +2121,21 @@
 	         4 octets for 64bit assembly.  */
 	      if (HAVE_64BIT_GPRS &&
 		  (*reloc_type == BFD_RELOC_16
-		  || *reloc_type == BFD_RELOC_32
-		  || *reloc_type == BFD_RELOC_MIPS_JMP
-		  || *reloc_type == BFD_RELOC_HI16_S
-		  || *reloc_type == BFD_RELOC_LO16
-		  || *reloc_type == BFD_RELOC_GPREL16
-		  || *reloc_type == BFD_RELOC_MIPS_LITERAL
-		  || *reloc_type == BFD_RELOC_GPREL32
-		  || *reloc_type == BFD_RELOC_64
-		  || *reloc_type == BFD_RELOC_CTOR
-		  || *reloc_type == BFD_RELOC_MIPS_SUB
-		  || *reloc_type == BFD_RELOC_MIPS_HIGHEST
-		  || *reloc_type == BFD_RELOC_MIPS_HIGHER
-		  || *reloc_type == BFD_RELOC_MIPS_SCN_DISP
-		  || *reloc_type == BFD_RELOC_MIPS_REL16
-		  || *reloc_type == BFD_RELOC_MIPS_RELGOT))
+		   || *reloc_type == BFD_RELOC_32
+		   || *reloc_type == BFD_RELOC_MIPS_JMP
+		   || *reloc_type == BFD_RELOC_HI16_S
+		   || *reloc_type == BFD_RELOC_LO16
+		   || *reloc_type == BFD_RELOC_GPREL16
+		   || *reloc_type == BFD_RELOC_MIPS_LITERAL
+		   || *reloc_type == BFD_RELOC_GPREL32
+		   || *reloc_type == BFD_RELOC_64
+		   || *reloc_type == BFD_RELOC_CTOR
+		   || *reloc_type == BFD_RELOC_MIPS_SUB
+		   || *reloc_type == BFD_RELOC_MIPS_HIGHEST
+		   || *reloc_type == BFD_RELOC_MIPS_HIGHER
+		   || *reloc_type == BFD_RELOC_MIPS_SCN_DISP
+		   || *reloc_type == BFD_RELOC_MIPS_REL16
+		   || *reloc_type == BFD_RELOC_MIPS_RELGOT))
 		fixp[0]->fx_no_overflow = 1;
 
 	      if (unmatched_hi)
@@ -2182,7 +2182,7 @@
 		       || *reloc_type == BFD_RELOC_MIPS_SCN_DISP
 		       || *reloc_type == BFD_RELOC_MIPS_REL16
 		       || *reloc_type == BFD_RELOC_MIPS_RELGOT))
-		     fixp[1]->fx_no_overflow = 1;
+		    fixp[1]->fx_no_overflow = 1;
 
 		  if (reloc_type[2] != BFD_RELOC_UNUSED)
 		    {
@@ -2214,7 +2214,7 @@
 			   || *reloc_type == BFD_RELOC_MIPS_SCN_DISP
 			   || *reloc_type == BFD_RELOC_MIPS_REL16
 			   || *reloc_type == BFD_RELOC_MIPS_RELGOT))
-		       fixp[2]->fx_no_overflow = 1;
+			fixp[2]->fx_no_overflow = 1;
 		    }
 		}
 	    }
@@ -2913,7 +2913,7 @@
   /* Search until we get a match for NAME.  */
   while (1)
     {
-      /* It is assumed here that macros will never generate 
+      /* It is assumed here that macros will never generate
          MIPS-3D instructions.  */
       if (strcmp (fmt, insn.insn_mo->args) == 0
 	  && insn.insn_mo->pinfo != INSN_MACRO
@@ -4704,57 +4704,57 @@
 	      /* We don't do GP optimization for now because RELAX_ENCODE can't
 		 hold the data for such large chunks.  */
 
-	    if (used_at == 0)
-	      {
-		macro_build (p, &icnt, &offset_expr, "lui", "t,u",
-			     tempreg, (int) BFD_RELOC_MIPS_HIGHEST);
-		macro_build (p, &icnt, &offset_expr, "lui", "t,u",
-			     AT, (int) BFD_RELOC_HI16_S);
-		macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
-			     tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
-		macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
-			     AT, AT, (int) BFD_RELOC_LO16);
-		macro_build (p, &icnt, (expressionS *) NULL, "dsll32",
-			     "d,w,<", tempreg, tempreg, 0);
-		macro_build (p, &icnt, (expressionS *) NULL, "dadd", "d,v,t",
-			     tempreg, tempreg, AT);
-		used_at = 1;
-	      }
-	    else
-	      {
-		macro_build (p, &icnt, &offset_expr, "lui", "t,u",
-			     tempreg, (int) BFD_RELOC_MIPS_HIGHEST);
-		macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
-			     tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
-		macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<",
-			     tempreg, tempreg, 16);
-		macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
-			     tempreg, tempreg, (int) BFD_RELOC_HI16_S);
-		macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<",
-			     tempreg, tempreg, 16);
-		macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
-			     tempreg, tempreg, (int) BFD_RELOC_LO16);
-	      }
-	  }
-	else
-	  {
-	    if ((valueT) offset_expr.X_add_number <= MAX_GPREL_OFFSET
-		&& ! nopic_need_relax (offset_expr.X_add_symbol, 1))
-	      {
-		frag_grow (20);
-		macro_build ((char *) NULL, &icnt, &offset_expr, "addiu",
-			     "t,r,j", tempreg, GP, (int) BFD_RELOC_GPREL16);
-		p = frag_var (rs_machine_dependent, 8, 0,
-			      RELAX_ENCODE (4, 8, 0, 4, 0,
-					    mips_opts.warn_about_macros),
-			      offset_expr.X_add_symbol, 0, NULL);
-	      }
-	    macro_build_lui (p, &icnt, &offset_expr, tempreg);
-	    if (p != NULL)
-	      p += 4;
-	    macro_build (p, &icnt, &offset_expr, "addiu",
-			 "t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
-	  }
+	      if (used_at == 0)
+		{
+		  macro_build (p, &icnt, &offset_expr, "lui", "t,u",
+			       tempreg, (int) BFD_RELOC_MIPS_HIGHEST);
+		  macro_build (p, &icnt, &offset_expr, "lui", "t,u",
+			       AT, (int) BFD_RELOC_HI16_S);
+		  macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
+			       tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
+		  macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
+			       AT, AT, (int) BFD_RELOC_LO16);
+		  macro_build (p, &icnt, (expressionS *) NULL, "dsll32",
+			       "d,w,<", tempreg, tempreg, 0);
+		  macro_build (p, &icnt, (expressionS *) NULL, "dadd", "d,v,t",
+			       tempreg, tempreg, AT);
+		  used_at = 1;
+		}
+	      else
+		{
+		  macro_build (p, &icnt, &offset_expr, "lui", "t,u",
+			       tempreg, (int) BFD_RELOC_MIPS_HIGHEST);
+		  macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
+			       tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
+		  macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<",
+			       tempreg, tempreg, 16);
+		  macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
+			       tempreg, tempreg, (int) BFD_RELOC_HI16_S);
+		  macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<",
+			       tempreg, tempreg, 16);
+		  macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
+			       tempreg, tempreg, (int) BFD_RELOC_LO16);
+		}
+	    }
+	  else
+	    {
+	      if ((valueT) offset_expr.X_add_number <= MAX_GPREL_OFFSET
+		  && ! nopic_need_relax (offset_expr.X_add_symbol, 1))
+		{
+		  frag_grow (20);
+		  macro_build ((char *) NULL, &icnt, &offset_expr, "addiu",
+			       "t,r,j", tempreg, GP, (int) BFD_RELOC_GPREL16);
+		  p = frag_var (rs_machine_dependent, 8, 0,
+				RELAX_ENCODE (4, 8, 0, 4, 0,
+					      mips_opts.warn_about_macros),
+				offset_expr.X_add_symbol, 0, NULL);
+		}
+	      macro_build_lui (p, &icnt, &offset_expr, tempreg);
+	      if (p != NULL)
+		p += 4;
+	      macro_build (p, &icnt, &offset_expr, "addiu",
+			   "t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
+	    }
 	}
       else if (mips_pic == SVR4_PIC && ! mips_big_got)
 	{
@@ -5291,7 +5291,7 @@
 		    }
 		  if (mips_opts.noreorder)
 		    macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
-			     "nop", "");
+				 "nop", "");
 		  expr1.X_add_number = mips_cprestore_offset;
 		  macro_build ((char *) NULL, &icnt, &expr1,
 			       HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)",
@@ -7373,8 +7373,8 @@
 		   xreg, yreg);
       expr1.X_add_number = 2;
       macro_build ((char *) NULL, &icnt, &expr1, "bnez", "x,p", yreg);
-	macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
-		     "6", 7);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
+		   "6", 7);
       --mips_opts.noreorder;
       macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "x", zreg);
       break;
@@ -7529,7 +7529,7 @@
 
     case M_ABS:
       expr1.X_add_number = 0;
-      macro_build ((char *) NULL, &icnt, &expr1, "slti", "x,8",  yreg);
+      macro_build ((char *) NULL, &icnt, &expr1, "slti", "x,8", yreg);
       if (xreg != yreg)
 	move_register (&icnt, xreg, yreg);
       expr1.X_add_number = 2;
@@ -7701,7 +7701,7 @@
 
       if (OPCODE_IS_MEMBER (insn,
 			    (mips_opts.isa
-	      		     | (mips_opts.ase_mips3d ? INSN_MIPS3D : 0)),
+			     | (mips_opts.ase_mips3d ? INSN_MIPS3D : 0)),
 			    mips_arch))
 	ok = true;
       else
@@ -7882,14 +7882,14 @@
 	      s = expr_end;
 	      continue;
 
-            case 'C':           /* Coprocessor code */
+	    case 'C':           /* Coprocessor code */
 	      my_getExpression (&imm_expr, s);
 	      check_absolute_expr (ip, &imm_expr);
-	      if ((unsigned long) imm_expr.X_add_number >= (1<<25))
+	      if ((unsigned long) imm_expr.X_add_number >= (1 << 25))
 		{
 		  as_warn (_("Coproccesor code > 25 bits (%ld)"),
 			   (long) imm_expr.X_add_number);
-		  imm_expr.X_add_number &= ((1<<25) - 1);
+		  imm_expr.X_add_number &= ((1 << 25) - 1);
 		}
 	      ip->insn_opcode |= imm_expr.X_add_number;
 	      imm_expr.X_op = O_absent;
@@ -8404,9 +8404,9 @@
 			  (imm_expr.X_add_number >> 16) & 0xffff;
 #ifdef OBJ_ELF
 		      else if (c == S_EX_HIGHEST)
-			  *imm_reloc = BFD_RELOC_MIPS_HIGHEST;
+			*imm_reloc = BFD_RELOC_MIPS_HIGHEST;
 		      else if (c == S_EX_HIGHER)
-			  *imm_reloc = BFD_RELOC_MIPS_HIGHER;
+			*imm_reloc = BFD_RELOC_MIPS_HIGHER;
 		      else if (c == S_EX_GP_REL)
 			{
 			  /* This occurs in NewABI only.  */
@@ -8542,7 +8542,7 @@
 			}
 #ifdef OBJ_ELF
 		      else if (c == S_EX_HIGHEST)
-			  *imm_reloc = BFD_RELOC_MIPS_HIGHEST;
+			*imm_reloc = BFD_RELOC_MIPS_HIGHEST;
 		      else if (c == S_EX_GP_REL)
 			{
 			  /* This occurs in NewABI only.  */
@@ -9415,18 +9415,18 @@
 	      && (e = b + strcspn (b, ") \t"))
 	      && e - b > 1 && e - b < 4)
 	    {
-	       if ((e - b == 3
-		    && ((b[1] == 'f' && b[2] == 'p')
-			|| (b[1] == 's' && b[2] == 'p')
-			|| (b[1] == 'g' && b[2] == 'p')
-			|| (b[1] == 'a' && b[2] == 't')
-			|| (ISDIGIT (b[1])
-			    && ISDIGIT (b[2]))))
-		   || (ISDIGIT (b[1])))
-		 {
-		   *len = strcspn (*str, ")") + 1;
-		   return S_EX_REGISTER;
-		 }
+	      if ((e - b == 3
+		   && ((b[1] == 'f' && b[2] == 'p')
+		       || (b[1] == 's' && b[2] == 'p')
+		       || (b[1] == 'g' && b[2] == 'p')
+		       || (b[1] == 'a' && b[2] == 't')
+		       || (ISDIGIT (b[1])
+			   && ISDIGIT (b[2]))))
+		  || (ISDIGIT (b[1])))
+		{
+		  *len = strcspn (*str, ")") + 1;
+		  return S_EX_REGISTER;
+		}
 	    }
 	}
       /* Check for percent_op (in parentheses).  */
@@ -9477,7 +9477,7 @@
   while (i < (sizeof (percent_op) / sizeof (struct percent_op_match)))
     {
       if (strncmp (*str, percent_op[i].str, strlen (percent_op[i].str)))
-	  i++;
+	i++;
       else
 	{
 	  int type = percent_op[i].type;
@@ -9571,7 +9571,7 @@
     }
   else
     {
-      as_fatal(_("internal error"));
+      as_fatal (_("internal error"));
     }
 
   if (nestlevel <= 0)
@@ -9906,27 +9906,27 @@
 		  }
 	      }
 	    else
-		cpu = ci->cpu;
+	      cpu = ci->cpu;
 	  }
 
 	switch (c)
 	  {
 	  case OPTION_MTUNE:
 	    if (mips_tune != CPU_UNKNOWN && mips_tune != cpu)
-	      as_warn(_("A different -mtune= was already specified, is now "
-			"-mtune=%s"), arg);
+	      as_warn (_("A different -mtune= was already specified, is now "
+			 "-mtune=%s"), arg);
 	    mips_tune = cpu;
 	    break;
 	  case OPTION_MARCH:
 	    if (mips_arch != CPU_UNKNOWN && mips_arch != cpu)
-	      as_warn(_("A different -march= was already specified, is now "
-			"-march=%s"), arg);
+	      as_warn (_("A different -march= was already specified, is now "
+			 "-march=%s"), arg);
 	    mips_arch = cpu;
 	    break;
 	  case OPTION_MCPU:
 	    if (mips_cpu != CPU_UNKNOWN && mips_cpu != cpu)
-	      as_warn(_("A different -mcpu= was already specified, is now "
-			"-mcpu=%s"), arg);
+	      as_warn (_("A different -mcpu= was already specified, is now "
+			 "-mcpu=%s"), arg);
 	    mips_cpu = cpu;
 	  }
       }
@@ -9935,8 +9935,8 @@
     case OPTION_M4650:
       if ((mips_arch != CPU_UNKNOWN && mips_arch != CPU_R4650)
 	  || (mips_tune != CPU_UNKNOWN && mips_tune != CPU_R4650))
-        as_warn(_("A different -march= or -mtune= was already specified, "
-		  "is now -m4650"));
+	as_warn (_("A different -march= or -mtune= was already specified, "
+		   "is now -m4650"));
       mips_arch = CPU_R4650;
       mips_tune = CPU_R4650;
       break;
@@ -9947,8 +9947,8 @@
     case OPTION_M4010:
       if ((mips_arch != CPU_UNKNOWN && mips_arch != CPU_R4010)
 	  || (mips_tune != CPU_UNKNOWN && mips_tune != CPU_R4010))
-        as_warn(_("A different -march= or -mtune= was already specified, "
-		  "is now -m4010"));
+	as_warn (_("A different -march= or -mtune= was already specified, "
+		   "is now -m4010"));
       mips_arch = CPU_R4010;
       mips_tune = CPU_R4010;
       break;
@@ -9959,8 +9959,8 @@
     case OPTION_M4100:
       if ((mips_arch != CPU_UNKNOWN && mips_arch != CPU_VR4100)
 	  || (mips_tune != CPU_UNKNOWN && mips_tune != CPU_VR4100))
-        as_warn(_("A different -march= or -mtune= was already specified, "
-		  "is now -m4100"));
+	as_warn (_("A different -march= or -mtune= was already specified, "
+		   "is now -m4100"));
       mips_arch = CPU_VR4100;
       mips_tune = CPU_VR4100;
       break;
@@ -9971,8 +9971,8 @@
     case OPTION_M3900:
       if ((mips_arch != CPU_UNKNOWN && mips_arch != CPU_R3900)
 	  || (mips_tune != CPU_UNKNOWN && mips_tune != CPU_R3900))
-        as_warn(_("A different -march= or -mtune= was already specified, "
-		  "is now -m3900"));
+	as_warn (_("A different -march= or -mtune= was already specified, "
+		   "is now -m3900"));
       mips_arch = CPU_R3900;
       mips_tune = CPU_R3900;
       break;
@@ -10488,7 +10488,7 @@
 void
 md_apply_fix3 (fixP, valP, seg)
      fixS *fixP;
-     valueT * valP;
+     valueT *valP;
      segT seg ATTRIBUTE_UNUSED;
 {
   bfd_byte *buf;
@@ -10515,7 +10515,7 @@
 	  || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
 	  || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY);
 
-  value = * valP;
+  value = *valP;
 
   /* If we aren't adjusting this fixup to be against the section
      symbol, we need to adjust the value.  */
@@ -11331,45 +11331,45 @@
 	 say, misuse can cause serious problems.  */
       isa = atoi (name + 4);
       switch (isa)
-      {
-      case  0:
-	mips_opts.gp32 = file_mips_gp32;
-	mips_opts.fp32 = file_mips_fp32;
-	mips_opts.abi = file_mips_abi;
-	break;
-      case  1:
-      case  2:
-      case 32:
-	mips_opts.gp32 = 1;
-	mips_opts.fp32 = 1;
-	break;
-      case  3:
-      case  4:
-      case  5:
-      case 64:
-	/* Loosen ABI register width restriction.  */
-	if (mips_opts.abi == O32_ABI)
-	  mips_opts.abi = NO_ABI;
-	mips_opts.gp32 = 0;
-	mips_opts.fp32 = 0;
-	break;
-      default:
-	as_bad (_("unknown ISA level %s"), name + 4);
-	break;
-      }
+	{
+	case  0:
+	  mips_opts.gp32 = file_mips_gp32;
+	  mips_opts.fp32 = file_mips_fp32;
+	  mips_opts.abi = file_mips_abi;
+	  break;
+	case  1:
+	case  2:
+	case 32:
+	  mips_opts.gp32 = 1;
+	  mips_opts.fp32 = 1;
+	  break;
+	case  3:
+	case  4:
+	case  5:
+	case 64:
+	  /* Loosen ABI register width restriction.  */
+	  if (mips_opts.abi == O32_ABI)
+	    mips_opts.abi = NO_ABI;
+	  mips_opts.gp32 = 0;
+	  mips_opts.fp32 = 0;
+	  break;
+	default:
+	  as_bad (_("unknown ISA level %s"), name + 4);
+	  break;
+	}
 
       switch (isa)
-      {
-      case  0: mips_opts.isa = file_mips_isa;   break;
-      case  1: mips_opts.isa = ISA_MIPS1;       break;
-      case  2: mips_opts.isa = ISA_MIPS2;       break;
-      case  3: mips_opts.isa = ISA_MIPS3;       break;
-      case  4: mips_opts.isa = ISA_MIPS4;       break;
-      case  5: mips_opts.isa = ISA_MIPS5;       break;
-      case 32: mips_opts.isa = ISA_MIPS32;      break;
-      case 64: mips_opts.isa = ISA_MIPS64;      break;
-      default: as_bad (_("unknown ISA level %s"), name + 4); break;
-      }
+	{
+	case  0: mips_opts.isa = file_mips_isa;   break;
+	case  1: mips_opts.isa = ISA_MIPS1;       break;
+	case  2: mips_opts.isa = ISA_MIPS2;       break;
+	case  3: mips_opts.isa = ISA_MIPS3;       break;
+	case  4: mips_opts.isa = ISA_MIPS4;       break;
+	case  5: mips_opts.isa = ISA_MIPS5;       break;
+	case 32: mips_opts.isa = ISA_MIPS32;      break;
+	case 64: mips_opts.isa = ISA_MIPS64;      break;
+	default: as_bad (_("unknown ISA level %s"), name + 4); break;
+	}
     }
   else if (strcmp (name, "autoextend") == 0)
     mips_opts.noautoextend = 0;
@@ -11833,7 +11833,7 @@
       if (exp.X_op != O_symbol)
 	{
 	  as_bad ("bad .weakext directive");
-	  ignore_rest_of_line();
+	  ignore_rest_of_line ();
 	  return;
 	}
       symbol_set_value_expression (symbolP, &exp);
@@ -12802,7 +12802,7 @@
   if (mips_pic != NO_PIC)
     elf_elfheader (stdoutput)->e_flags |= EF_MIPS_PIC;
 
-  /* Set MIPS ELF flags for ASEs. */
+  /* Set MIPS ELF flags for ASEs.  */
 #if 0 /* XXX FIXME */
   if (file_ase_mips3d)
     elf_elfheader (stdoutput)->e_flags |= ???;
Index: tc-s390.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-s390.c,v
retrieving revision 1.17
diff -u -r1.17 tc-s390.c
--- tc-s390.c	3 May 2002 18:25:08 -0000	1.17
+++ tc-s390.c	4 May 2002 15:54:07 -0000
@@ -17,7 +17,7 @@
    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, 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   02111-1307, USA.  */
 
 #include <stdio.h>
 #include "as.h"
@@ -82,7 +82,7 @@
 const pseudo_typeS md_pseudo_table[] =
 {
   { "align", s_align_bytes, 0 },
-  /* Pseudo-ops which must be defined. */
+  /* Pseudo-ops which must be defined.  */
   { "bss",      s390_bss,       0 },
   { "insn",     s390_insn,      0 },
   /* Pseudo-ops which must be overridden.  */
@@ -121,7 +121,7 @@
      sp     has the value 15
      lit    has the value 12
 
-   The table is sorted. Suitable for searching by a binary search. */
+   The table is sorted. Suitable for searching by a binary search.  */
 
 static const struct pd_reg pre_defined_registers[] =
 {
@@ -560,7 +560,7 @@
     {
       addressT min, max;
 
-      max = (((addressT) 1 << (operand->bits - 1))<<1) - 1;
+      max = (((addressT) 1 << (operand->bits - 1)) << 1) - 1;
       min = (offsetT) 0;
       uval = (addressT) val;
       /* Length x in an instructions has real length x+1.  */
@@ -591,7 +591,7 @@
   /* Insert fragments of the operand byte for byte.  */
   offset = operand->shift + operand->bits;
   uval <<= (-offset) & 7;
-  insn += (offset - 1)/8;
+  insn += (offset - 1) / 8;
   while (uval != 0)
     {
       *insn-- |= uval;
@@ -724,7 +724,7 @@
 static int lpe_count = 0;
 
 static int
-s390_exp_compare(exp1, exp2)
+s390_exp_compare (exp1, exp2)
      expressionS *exp1;
      expressionS *exp2;
 {
@@ -771,8 +771,8 @@
 	&&   (exp1->X_op_symbol  == exp2->X_op_symbol)
 	&&   (exp1->X_add_number == exp2->X_add_number);
     default:
-    return 0;
-  }
+      return 0;
+    }
 }
 
 /* Test for @lit and if its present make an entry in the literal pool and
@@ -852,7 +852,7 @@
       /* Processing for 'normal' data types.  */
       for (lpe = lpe_list; lpe != NULL; lpe = lpe->next)
 	if (lpe->nbytes == nbytes && lpe->reloc == reloc
-	    && s390_exp_compare(exp_p, &lpe->ex) != 0)
+	    && s390_exp_compare (exp_p, &lpe->ex) != 0)
 	  break;
     }
 
@@ -866,7 +866,7 @@
 	}
       else
 	{
-	  lpe = (struct s390_lpe *) xmalloc(sizeof (struct s390_lpe));
+	  lpe = (struct s390_lpe *) xmalloc (sizeof (struct s390_lpe));
 	}
 
       lpe->ex = *exp_p;
@@ -877,7 +877,7 @@
 	    lpe->floatnum = generic_floating_point_number;
 	  else if (exp_p->X_add_number <= 4)
 	    memcpy (lpe->bignum, generic_bignum,
-		    exp_p->X_add_number*sizeof (LITTLENUM_TYPE));
+		    exp_p->X_add_number * sizeof (LITTLENUM_TYPE));
 	  else
 	    as_bad (_("Big number is too big"));
 	}
@@ -888,13 +888,13 @@
       if (lp_sym == NULL)
 	{
 	  sprintf (tmp_name, ".L\001%i", lp_count);
-	  lp_sym = symbol_make(tmp_name);
+	  lp_sym = symbol_make (tmp_name);
 	}
 
       /* Make name for literal pool entry.  */
       sprintf (tmp_name, ".L\001%i\002%i", lp_count, lpe_count);
       lpe_count++;
-      lpe->sym = symbol_make(tmp_name);
+      lpe->sym = symbol_make (tmp_name);
 
       /* Add to literal pool list.  */
       lpe->next = NULL;
@@ -984,7 +984,7 @@
     }
   while (*input_line_pointer++ == ',');
 
-  input_line_pointer--;		/* Put terminator back into stream. */
+  input_line_pointer--;		/* Put terminator back into stream.  */
   demand_empty_rest_of_line ();
 }
 
@@ -1019,7 +1019,8 @@
   char *f;
   int fc, i;
 
-  while (ISSPACE (*str)) str++;
+  while (ISSPACE (*str))
+    str++;
 
   parentheses = 0;
   skip_optional = 0;
@@ -1047,7 +1048,8 @@
       hold = input_line_pointer;
       input_line_pointer = str;
 
-      if (! register_name (&ex))    /* parse the operand */
+      /* Parse the operand.  */
+      if (! register_name (&ex))
 	expression (&ex);
 
       str = input_line_pointer;
@@ -1397,7 +1399,7 @@
 
   if (strcmp (opformat->name, "e") != 0 && *input_line_pointer++ != ',')
     as_bad (_("missing comma after insn constant\n"));
-  
+
   if ((s = strchr (input_line_pointer, '\n')) != NULL)
     *s = '\0';
   input_line_pointer = md_gather_operands (input_line_pointer, insn,
@@ -1453,7 +1455,7 @@
   struct s390_lpe *lpe;
 
   if (lp_sym == NULL || lpe_count == 0)
-    return;     /* nothing to be done */
+    return;     /* Nothing to be done.  */
 
   /* Emit symbol for start of literal pool.  */
   S_SET_SEGMENT (lp_sym, now_seg);
@@ -1492,7 +1494,7 @@
 		generic_floating_point_number = lpe->floatnum;
 	      else
 		memcpy (generic_bignum, lpe->bignum,
-			lpe->ex.X_add_number*sizeof (LITTLENUM_TYPE));
+			lpe->ex.X_add_number * sizeof (LITTLENUM_TYPE));
 	    }
 	  emit_expr (&lpe->ex, lpe->nbytes);
 	}
@@ -1590,18 +1592,18 @@
 md_undefined_symbol (name)
      char *name;
 {
-  if (*name == '_' && *(name+1) == 'G'
+  if (*name == '_' && *(name + 1) == 'G'
       && strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
-   {
-     if (!GOT_symbol)
-      {
-        if (symbol_find (name))
-          as_bad (_("GOT already in symbol table"));
-        GOT_symbol = symbol_new (name, undefined_section,
-                                 (valueT) 0, &zero_address_frag);
-      }
-     return GOT_symbol;
-   }
+    {
+      if (!GOT_symbol)
+	{
+	  if (symbol_find (name))
+	    as_bad (_("GOT already in symbol table"));
+	  GOT_symbol = symbol_new (name, undefined_section,
+				   (valueT) 0, &zero_address_frag);
+	}
+      return GOT_symbol;
+    }
   return 0;
 }
 
@@ -1623,8 +1625,8 @@
    to make sure that the dynamic relocations are done correctly, so in
    some cases we force the original symbol to be used.  */
 int
-tc_s390_fix_adjustable(fixP)
-     fixS * fixP;
+tc_s390_fix_adjustable (fixP)
+     fixS *fixP;
 {
   /* Prevent all adjustments to global symbols.  */
   if (S_IS_EXTERN (fixP->fx_addsy))
@@ -1632,7 +1634,7 @@
   if (S_IS_WEAK (fixP->fx_addsy))
     return 0;
   /* Don't adjust pc-relative references to merge sections.  */
-  if ((S_GET_SEGMENT(fixP->fx_addsy)->flags & SEC_MERGE) != 0 
+  if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0
       && fixP->fx_pcrel)
     return 0;
   /* adjust_reloc_syms doesn't know about the GOT.  */
@@ -1698,11 +1700,11 @@
      segT seg;
 {
   char *where;
-  valueT value = * valP;
+  valueT value = *valP;
 
   where = fixP->fx_frag->fr_literal + fixP->fx_where;
 
-  if (fixP->fx_subsy != NULL) 
+  if (fixP->fx_subsy != NULL)
     {
       if ((fixP->fx_addsy != NULL
 	   && S_GET_SEGMENT (fixP->fx_addsy) == S_GET_SEGMENT (fixP->fx_subsy)
@@ -1712,24 +1714,24 @@
       if (!S_IS_DEFINED (fixP->fx_subsy))
 	as_bad_where (fixP->fx_file, fixP->fx_line,
 		      _("unresolved fx_subsy symbol that must be resolved"));
-      value -= S_GET_VALUE(fixP->fx_subsy);
+      value -= S_GET_VALUE (fixP->fx_subsy);
 
       if (S_GET_SEGMENT (fixP->fx_subsy) == seg && ! fixP->fx_pcrel)
 	value += MD_PCREL_FROM_SECTION (fixP, seg);
     }
-  
-  if (fixP->fx_addsy != NULL) 
+
+  if (fixP->fx_addsy != NULL)
     {
       if ((fixP->fx_subsy != NULL
 	   && S_GET_SEGMENT (fixP->fx_addsy) == S_GET_SEGMENT (fixP->fx_subsy)
-	   && SEG_NORMAL (S_GET_SEGMENT(fixP->fx_addsy)))
+	   && SEG_NORMAL (S_GET_SEGMENT (fixP->fx_addsy)))
 	  || (S_GET_SEGMENT (fixP->fx_addsy) == seg
 	      && fixP->fx_pcrel && TC_RELOC_RTSYM_LOC_FIXUP (fixP))
-	  || (!fixP->fx_pcrel 
+	  || (!fixP->fx_pcrel
 	      && S_GET_SEGMENT (fixP->fx_addsy) == absolute_section)
 	  || (S_GET_SEGMENT (fixP->fx_addsy) != undefined_section
 	      && !bfd_is_com_section (S_GET_SEGMENT (fixP->fx_addsy))
-	      && TC_FIX_ADJUSTABLE(fixP)))
+	      && TC_FIX_ADJUSTABLE (fixP)))
 	value -= S_GET_VALUE (fixP->fx_addsy);
 
       if (fixP->fx_pcrel)
@@ -1965,8 +1967,8 @@
   if (reloc->howto == NULL)
     {
       as_bad_where (fixp->fx_file, fixp->fx_line,
-                    _("cannot represent relocation type %s"),
-                    bfd_get_reloc_code_name (code));
+		    _("cannot represent relocation type %s"),
+		    bfd_get_reloc_code_name (code));
       /* Set howto to a garbage value so that we can keep going.  */
       reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
       assert (reloc->howto != NULL);
Index: tc-s390.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-s390.h,v
retrieving revision 1.7
diff -u -r1.7 tc-s390.h
--- tc-s390.h	15 Nov 2001 21:28:58 -0000	1.7
+++ tc-s390.h	4 May 2002 15:54:07 -0000
@@ -1,5 +1,5 @@
 /* tc-s390.h -- Header file for tc-s390.c.
-   Copyright 2000, 2001 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    Written by Martin Schwidefsky (schwidefsky@de.ibm.com).
 
    This file is part of GAS, the GNU Assembler.
@@ -17,7 +17,7 @@
    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, 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   02111-1307, USA.  */
 
 #define TC_S390
 
@@ -34,7 +34,7 @@
    are willing to perform this relocation while building the .o file.
    This is only used for pcrel relocations, so GOTOFF does not need to be
    checked here.  I am not sure if some of the others are ever used with
-   pcrel, but it is easier to be safe than sorry. */
+   pcrel, but it is easier to be safe than sorry.  */
 
 #define TC_RELOC_RTSYM_LOC_FIXUP(FIX)        \
   ((FIX)->fx_r_type != BFD_RELOC_390_GOTENT  \
@@ -59,9 +59,9 @@
 
 /* The target BFD format.  */
 #define TARGET_FORMAT s390_target_format()
-extern const char * s390_target_format PARAMS ((void));
+extern const char *s390_target_format PARAMS ((void));
 
-/* Set the endianness we are using. */
+/* Set the endianness we are using.  */
 #define TARGET_BYTES_BIG_ENDIAN 1
 
 /* Whether or not the target is big endian */


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