static void xgate_print_table (void);
static unsigned int xgate_get_operands (char *, s_operand []);
static register_id reg_name_search (char *);
-static op_modifiers xgate_determine_modifiers(char **);
+static op_modifiers xgate_determine_modifiers (char **);
static void xgate_scan_operands (struct xgate_opcode *opcode, s_operand []);
static unsigned int xgate_parse_operand (struct xgate_opcode *, int *, int,
char **, s_operand);
{ NULL, no_argument, NULL, 0 }
};
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
const char *
md_atof (int type, char *litP, int *sizeP)
xgate_op_table = XNEWVEC (struct xgate_opcode, xgate_num_opcodes);
memset (xgate_op_table, 0,
- sizeof(struct xgate_opcode) * (xgate_num_opcodes));
+ sizeof (struct xgate_opcode) * (xgate_num_opcodes));
for (xgate_opcode_ptr = (struct xgate_opcode*) xgate_opcodes, i = 0;
i < xgate_num_opcodes; i++)
xgate_op_table[i] = xgate_opcode_ptr[i];
- qsort (xgate_op_table, xgate_num_opcodes, sizeof(struct xgate_opcode),
+ qsort (xgate_op_table, xgate_num_opcodes, sizeof (struct xgate_opcode),
(int (*)(const void *, const void *)) cmp_opcode);
/* Calculate number of handles since this will be
symbolS *
md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
{
- return 0;
+ return NULL;
}
/* GAS will call this function for each section at the end of the assembly,
fixup_required = 0;
oper_check = 0; /* set error flags */
- input_line = extract_word (input_line, op_name, sizeof(op_name));
+ input_line = extract_word (input_line, op_name, sizeof (op_name));
/* Check to make sure we are not reading a bogus line. */
if (!op_name[0])
}
else
{
- operandCount = xgate_get_operands(input_line, new_operands);
+ operandCount = xgate_get_operands (input_line, new_operands);
macro_opcode = xgate_find_match (opcode_handle,
opcode_handle->number_of_modes, new_operands,
- operandCount);
+ operandCount);
xgate_scan_operands (macro_opcode, new_operands);
}
}
xgate_parse_exp (char *s, expressionS * op)
{
input_line_pointer = s;
- expression(op);
+
+ expression (op);
if (op->X_op == O_absent)
as_bad (_("missing operand"));
return input_line_pointer;
switch (operandCount)
{
case 0:
- if (!strcmp(opcode_handle->opc0[i]->constraints, XGATE_OP_INH))
+ if (!strcmp (opcode_handle->opc0[i]->constraints, XGATE_OP_INH))
return opcode_handle->opc0[i];
break;
case 1:
if (oprs[0].reg >= REG_R0 && oprs[0].reg <= REG_R7)
- if (!strcmp(opcode_handle->opc0[i]->constraints, XGATE_OP_MON))
- return opcode_handle->opc0[i];
- if (!strcmp(opcode_handle->opc0[i]->constraints, XGATE_OP_DYA_MON))
- return opcode_handle->opc0[i];
+ {
+ if (!strcmp (opcode_handle->opc0[i]->constraints, XGATE_OP_MON))
+ return opcode_handle->opc0[i];
+ if (!strcmp (opcode_handle->opc0[i]->constraints, XGATE_OP_DYA_MON))
+ return opcode_handle->opc0[i];
+ }
if (oprs[0].reg == REG_NONE)
- if (!strcmp(opcode_handle->opc0[i]->constraints, XGATE_OP_IMM3))
+ if (!strcmp (opcode_handle->opc0[i]->constraints, XGATE_OP_IMM3))
return opcode_handle->opc0[i];
break;
case 2:
if (oprs[0].reg >= REG_R0 && oprs[0].reg <= REG_R7)
{
if (oprs[1].reg >= REG_R0 && oprs[1].reg <= REG_R7)
- if (!strcmp(opcode_handle->opc0[i]->constraints, XGATE_OP_DYA))
- return opcode_handle->opc0[i];
+ {
+ if (!strcmp (opcode_handle->opc0[i]->constraints, XGATE_OP_DYA))
+ return opcode_handle->opc0[i];
+ }
if (oprs[1].reg == REG_CCR)
- if (!strcmp(opcode_handle->opc0[i]->constraints,
+ if (!strcmp (opcode_handle->opc0[i]->constraints,
XGATE_OP_MON_R_C))
return opcode_handle->opc0[i];
if (oprs[1].reg == REG_PC)
- if (!strcmp(opcode_handle->opc0[i]->constraints,
+ if (!strcmp (opcode_handle->opc0[i]->constraints,
XGATE_OP_MON_R_P))
return opcode_handle->opc0[i];
if (oprs[1].reg == REG_NONE)
- if (!strcmp(opcode_handle->opc0[i]->constraints, XGATE_OP_IMM16)
- || !strcmp(opcode_handle->opc0[i]->constraints, XGATE_OP_IMM8)
- || !strcmp(opcode_handle->opc0[i]->constraints, XGATE_OP_IMM4)
- || !strcmp(opcode_handle->opc0[i]->constraints,
+ if (!strcmp (opcode_handle->opc0[i]->constraints, XGATE_OP_IMM16)
+ || !strcmp (opcode_handle->opc0[i]->constraints, XGATE_OP_IMM8)
+ || !strcmp (opcode_handle->opc0[i]->constraints, XGATE_OP_IMM4)
+ || !strcmp (opcode_handle->opc0[i]->constraints,
XGATE_OP_IMM16mADD)
- || !strcmp(opcode_handle->opc0[i]->constraints,
+ || !strcmp (opcode_handle->opc0[i]->constraints,
XGATE_OP_IMM16mAND)
- || !strcmp(opcode_handle->opc0[i]->constraints,
+ || !strcmp (opcode_handle->opc0[i]->constraints,
XGATE_OP_IMM16mCPC)
- || !strcmp(opcode_handle->opc0[i]->constraints,
+ || !strcmp (opcode_handle->opc0[i]->constraints,
XGATE_OP_IMM16mSUB)
- || !strcmp(opcode_handle->opc0[i]->constraints,
+ || !strcmp (opcode_handle->opc0[i]->constraints,
XGATE_OP_IMM16mLDW))
return opcode_handle->opc0[i];
}
if (oprs[0].reg == REG_CCR)
- if (!strcmp(opcode_handle->opc0[i]->constraints, XGATE_OP_MON_C_R))
+ if (!strcmp (opcode_handle->opc0[i]->constraints, XGATE_OP_MON_C_R))
return opcode_handle->opc0[i];
break;
case 3:
{
if (oprs[2].reg >= REG_R0 && oprs[2].reg <= REG_R7)
{
- if (!strcmp(opcode_handle->opc0[i]->constraints,
+ if (!strcmp (opcode_handle->opc0[i]->constraints,
XGATE_OP_IDR)
- || !strcmp(opcode_handle->opc0[i]->constraints,
+ || !strcmp (opcode_handle->opc0[i]->constraints,
XGATE_OP_TRI))
return opcode_handle->opc0[i];
}
if (oprs[2].reg == REG_NONE)
- if (!strcmp(opcode_handle->opc0[i]->constraints,
+ if (!strcmp (opcode_handle->opc0[i]->constraints,
XGATE_OP_IDO5))
return opcode_handle->opc0[i];
}
}
break;
default:
- as_bad(_("unknown operand count"));
+ as_bad (_("unknown operand count"));
break;
}
}
bfdsym = symbol_get_bfdsym (sym);
elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym);
- gas_assert(elfsym);
+ gas_assert (elfsym);
/* Mark the symbol as being *from XGATE */
elfsym->internal_elf_sym.st_target_internal = 1;
/* reg_name_search() finds the register number given its name.
Returns the register number or REG_NONE on failure. */
+
static register_id
reg_name_search (char *name)
{
/* Parse operand modifiers such as inc/dec/hi/low. */
static op_modifiers
-xgate_determine_modifiers(char **line)
+xgate_determine_modifiers (char **line)
{
char *local_line = line[0];
++op;
bin = xgate_apply_operand (operand, &oper_mask, bin, operand_bit_length);
- if(first_operand_equals_second)
+ if (first_operand_equals_second)
bin = xgate_apply_operand (operand, &oper_mask, bin,
operand_bit_length);
/* Parse second operand. */
if (operand.reg == REG_NONE)
as_bad (_(": expected register name r0-r7 ") );
op_mask = operand.reg;
- if(operand.mod == MOD_POSTINC)
+ if (operand.mod == MOD_POSTINC)
pp_fix = INCREMENT;
- if(operand.mod == MOD_PREDEC)
+ if (operand.mod == MOD_PREDEC)
pp_fix = DECREMENT;
op_mask <<= 2;
op_mask |= pp_fix;