/* 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.
md_begin (void)
{
const opcode_entry_type *opcode;
- int idx = -1;
+ unsigned int idx = -1u;
opcode_hash_control = hash_new ();
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)
{
*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;
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:
/*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"));
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;
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;