Merge branch 'master' into merge-job
[deliverable/binutils-gdb.git] / gas / config / tc-z8k.c
index 9b6ee3867a5761f790938db9db198a3635e8887d..ea4ee3a6b1f3be1d4944621b67eaa74008434199 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-z8k.c -- Assemble code for the Zilog Z800n
-   Copyright (C) 1992-2016 Free Software Foundation, Inc.
+   Copyright (C) 1992-2020 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -143,7 +143,7 @@ void
 md_begin (void)
 {
   const opcode_entry_type *opcode;
-  int idx = -1;
+  unsigned int idx = -1u;
 
   opcode_hash_control = hash_new ();
 
@@ -861,7 +861,7 @@ get_specific (opcode_entry_type *opcode, op_type *operands)
   int found = 0;
   unsigned int noperands = opcode->noperands;
 
-  int this_index = opcode->idx;
+  unsigned int this_index = opcode->idx;
 
   while (this_index == opcode->idx && !found)
     {
@@ -1000,11 +1000,14 @@ apply_fix (char *ptr, bfd_reloc_code_real_type type, expressionS *operand,
       *ptr++ = n >> 24;
       *ptr++ = n >> 20;
       *ptr++ = n >> 16;
+      /* Fall through.  */
     case 4:                    /* 4 nibbles == 16 bits.  */
       *ptr++ = n >> 12;
       *ptr++ = n >> 8;
+      /* Fall through.  */
     case 2:
       *ptr++ = n >> 4;
+      /* Fall through.  */
     case 1:
       *ptr++ = n >> 0;
       break;
@@ -1121,7 +1124,7 @@ build_bytes (opcode_entry_type *this_try, struct z8k_op *operand ATTRIBUTE_UNUSE
        case CLASS_REG_WORD:
        case CLASS_REG_LONG:
        case CLASS_REG_QUAD:
-         /* Insert bit mattern of right reg.  */
+         /* Insert bit pattern of right reg.  */
          *output_ptr++ = reg[c & 0xf];
          break;
        case CLASS_DISP:
@@ -1152,7 +1155,7 @@ build_bytes (opcode_entry_type *this_try, struct z8k_op *operand ATTRIBUTE_UNUSE
               /*case ARG_IMMNMINUS1: not used.  */
              case ARG_IMM4M1:
                imm_operand->X_add_number--;
-                /* Drop through.  */
+                /* Fall through.  */
              case ARG_IMM4:
                 if (imm_operand->X_add_number > 15)
                  as_bad (_("immediate value out of range"));
@@ -1160,7 +1163,7 @@ build_bytes (opcode_entry_type *this_try, struct z8k_op *operand ATTRIBUTE_UNUSE
                break;
              case ARG_NIM8:
                imm_operand->X_add_number = -imm_operand->X_add_number;
-                /* Drop through.  */
+                /* Fall through.  */
              case ARG_IMM8:
                output_ptr = apply_fix (output_ptr, BFD_RELOC_8, imm_operand, 2);
                break;
@@ -1382,7 +1385,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED,
 valueT
 md_section_align (segT seg, valueT size)
 {
-  int align = bfd_get_section_alignment (stdoutput, seg);
+  int align = bfd_section_alignment (seg);
   valueT mask = ((valueT) 1 << align) - 1;
 
   return (size + mask) & ~mask;
This page took 0.023756 seconds and 4 git commands to generate.