-/* tc-h8500.c -- Assemble code for the Hitachi H8/500
- Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002
+/* tc-h8500.c -- Assemble code for the Renesas H8/500
+ Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
Integer arg to pass to the function
*/
-void cons ();
-
const pseudo_typeS md_pseudo_table[] =
{
{"int", cons, 2},
void
md_begin ()
{
- h8500_opcode_info *opcode;
+ const h8500_opcode_info *opcode;
char prev_buffer[100];
int idx = 0;
static int cr; /* unknown size cr */
static expressionS displacement;/* displacement expression */
-static int displacement_size; /* and size if given */
static int immediate_inpage;
static expressionS immediate; /* immediate expression */
-static int immediate_size; /* and size if given */
static expressionS absolute; /* absolute expression */
-static int absolute_size; /* and size if given */
typedef struct
{
/* Try to parse a reg name. Return the number of chars consumed. */
+static int parse_reg PARAMS ((char *, int *, int *));
+
static int
parse_reg (src, mode, reg)
char *src;
return 0;
}
+static char *parse_exp PARAMS ((char *, expressionS *, int *));
+
static char *
parse_exp (s, op, page)
char *s;
exp_signed, exp_unsigned, exp_sandu
} sign_type;
+static char *skip_colonthing
+ PARAMS ((sign_type, char *, h8500_operand_info *, int, int, int, int));
+
static char *
skip_colonthing (sign, ptr, exp, def, size8, size16, size24)
sign_type sign;
ptr++;
exp->type = size8;
}
- else if (ptr[0] == '1' & ptr[1] == '6')
+ else if (ptr[0] == '1' && ptr[1] == '6')
{
ptr += 2;
exp->type = size16;
}
- else if (ptr[0] == '2' & ptr[1] == '4')
+ else if (ptr[0] == '2' && ptr[1] == '4')
{
if (!size24)
{
return ptr;
}
+static int parse_reglist PARAMS ((char *, h8500_operand_info *));
+
static int
parse_reglist (src, op)
char *src;
*/
+static void get_operand PARAMS ((char **, h8500_operand_info *, char));
+
static void
get_operand (ptr, op, ispage)
char **ptr;
}
}
+static char *get_operands
+ PARAMS ((h8500_opcode_info *, char *, h8500_operand_info *));
+
static char *
get_operands (info, args, operand)
h8500_opcode_info *info;
char *args;
h8500_operand_info *operand;
-
{
char *ptr = args;
int pcrel8; /* Set when we've seen a pcrel operand */
+static h8500_opcode_info *get_specific
+ PARAMS ((h8500_opcode_info *, h8500_operand_info *));
+
static h8500_opcode_info *
get_specific (opcode, operands)
h8500_opcode_info *opcode;
h8500_opcode_info *this_try = opcode;
int found = 0;
unsigned int noperands = opcode->nargs;
-
- unsigned int this_index = opcode->idx;
+ int this_index = opcode->idx;
while (this_index == opcode->idx && !found)
{
return 0;
}
-int
+static int check PARAMS ((expressionS *, int, int));
+
+static int
check (operand, low, high)
expressionS *operand;
int low;
return operand->X_add_number;
}
+static void insert PARAMS ((char *, int, expressionS *, int, int));
+
static void
insert (output, index, exp, reloc, pcrel)
char *output;
reloc);
}
-void
+static void build_relaxable_instruction
+ PARAMS ((h8500_opcode_info *, h8500_operand_info *));
+
+static void
build_relaxable_instruction (opcode, operand)
h8500_opcode_info *opcode;
- h8500_operand_info *operand;
+ h8500_operand_info *operand ATTRIBUTE_UNUSED;
{
/* All relaxable instructions start life as two bytes but can become
three bytes long if a lonely branch and up to 9 bytes if long
/* Now we know what sort of opcodes it is, let's build the bytes. */
+static void build_bytes PARAMS ((h8500_opcode_info *, h8500_operand_info *));
+
static void
build_bytes (opcode, operand)
h8500_opcode_info *opcode;
h8500_operand_info *operand;
-
{
int index;
void
tc_crawl_symbol_chain (headers)
- object_headers *headers;
+ object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_crawl_symbol_chain \n"));
}
symbolS *
md_undefined_symbol (name)
- char *name;
+ char *name ATTRIBUTE_UNUSED;
{
return 0;
}
void
tc_headers_hook (headers)
- object_headers *headers;
+ object_headers *headers ATTRIBUTE_UNUSED;
{
printf (_("call to tc_headers_hook \n"));
}
LITTLENUM_TYPE words[MAX_LITTLENUMS];
LITTLENUM_TYPE *wordP;
char *t;
- char *atof_ieee ();
switch (type)
{
int
md_parse_option (c, arg)
- int c;
- char *arg;
+ int c ATTRIBUTE_UNUSED;
+ char *arg ATTRIBUTE_UNUSED;
{
return 0;
}
void
md_show_usage (stream)
- FILE *stream;
+ FILE *stream ATTRIBUTE_UNUSED;
{
}
\f
-void
-tc_aout_fix_to_chars ()
-{
- printf (_("call to tc_aout_fix_to_chars \n"));
- abort ();
-}
+static void wordify_scb PARAMS ((char *, int *, int *));
static void
wordify_scb (buffer, disp_size, inst_size)
void
md_convert_frag (headers, seg, fragP)
- object_headers *headers;
- segT seg;
+ object_headers *headers ATTRIBUTE_UNUSED;
+ segT seg ATTRIBUTE_UNUSED;
fragS *fragP;
{
int disp_size = 0;
void
tc_coff_symbol_emit_hook (ignore)
- symbolS *ignore;
+ symbolS *ignore ATTRIBUTE_UNUSED;
{
}
dot = segment_info[S_GET_SEGMENT (symbol_ptr)].dot;
if (dot)
{
-#if 0
- intr->r_offset -=
- segment_info[S_GET_SEGMENT (symbol_ptr)].scnhdr.s_paddr;
-#endif
intr->r_offset += S_GET_VALUE (symbol_ptr);
intr->r_symndx = dot->sy_number;
}