* h8500-opc.h (h8500_table): Add missing initializers to quiet
warnings. * config/tc-h8500.c (cons): Delete declaration. (md_begin <opcode>): Constify. (displacement_size, immediate_size, absolute_size): Remove. (build_relaxable_instruction <operand>): Add ATTRIBUTE_UNUSED. (tc_crawl_symbol_chain <headers>): Likewise. (md_undefined_symbol <name>): Likewise. (tc_headers_hook <headers>): Likewise. (md_parse_option <c,arg>): Likewise. (md_show_usage <stream>): Likewise. (md_convert_frag <headers, seg>): Likewise. (tc_coff_symbol_emit_hook <ignore>): Likewise. (md_atof): Remove declaration of atof_ieee. (tc_aout_fix_to_chars): Remove unused function. (parse_reg): Prototype. (parse_exp): Prototype. (skip_colonthing): Prototype. Use &&, not & in logical expressions. (parse_reglist): Prototype. (get_operand): Prototype. (get_operands): Prototype. (get_specific): Prototype. Make "this_index" signed. (check): Prototype, make static. (insert): Prototype (build_relaxable_instruction): Prototype, make static. (build_bytes): Prototype. (wordify_scb): Prototype. * config/tc-h8500.h (start_label): Declare. (tc_coff_sizemachdep): Declare.
This commit is contained in:
parent
650f02e951
commit
45e85b8790
5 changed files with 1026 additions and 981 deletions
|
@ -1,5 +1,32 @@
|
||||||
2002-12-13 Alan Modra <amodra@bigpond.net.au>
|
2002-12-13 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* config/tc-h8500.c (cons): Delete declaration.
|
||||||
|
(md_begin <opcode>): Constify.
|
||||||
|
(displacement_size, immediate_size, absolute_size): Remove.
|
||||||
|
(build_relaxable_instruction <operand>): Add ATTRIBUTE_UNUSED.
|
||||||
|
(tc_crawl_symbol_chain <headers>): Likewise.
|
||||||
|
(md_undefined_symbol <name>): Likewise.
|
||||||
|
(tc_headers_hook <headers>): Likewise.
|
||||||
|
(md_parse_option <c,arg>): Likewise.
|
||||||
|
(md_show_usage <stream>): Likewise.
|
||||||
|
(md_convert_frag <headers, seg>): Likewise.
|
||||||
|
(tc_coff_symbol_emit_hook <ignore>): Likewise.
|
||||||
|
(md_atof): Remove declaration of atof_ieee.
|
||||||
|
(tc_aout_fix_to_chars): Remove unused function.
|
||||||
|
(parse_reg): Prototype.
|
||||||
|
(parse_exp): Prototype.
|
||||||
|
(skip_colonthing): Prototype. Use &&, not & in logical expressions.
|
||||||
|
(parse_reglist): Prototype.
|
||||||
|
(get_operand): Prototype.
|
||||||
|
(get_operands): Prototype.
|
||||||
|
(get_specific): Prototype. Make "this_index" signed.
|
||||||
|
(check): Prototype, make static.
|
||||||
|
(insert): Prototype
|
||||||
|
(build_relaxable_instruction): Prototype, make static.
|
||||||
|
(build_bytes): Prototype.
|
||||||
|
(wordify_scb): Prototype.
|
||||||
|
* config/tc-h8500.h (start_label): Declare.
|
||||||
|
(tc_coff_sizemachdep): Declare.
|
||||||
* config/tc-i370.c (i370_ebcdic <unused>): Add ATTRIBUTE_UNUSED.
|
* config/tc-i370.c (i370_ebcdic <unused>): Add ATTRIBUTE_UNUSED.
|
||||||
(i370_rmode <unused>): Likewise.
|
(i370_rmode <unused>): Likewise.
|
||||||
(i370_csect <unused>): Likewise.
|
(i370_csect <unused>): Likewise.
|
||||||
|
|
|
@ -41,8 +41,6 @@ const char line_comment_chars[] = "!#";
|
||||||
Integer arg to pass to the function
|
Integer arg to pass to the function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void cons ();
|
|
||||||
|
|
||||||
const pseudo_typeS md_pseudo_table[] =
|
const pseudo_typeS md_pseudo_table[] =
|
||||||
{
|
{
|
||||||
{"int", cons, 2},
|
{"int", cons, 2},
|
||||||
|
@ -122,7 +120,7 @@ static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
|
||||||
void
|
void
|
||||||
md_begin ()
|
md_begin ()
|
||||||
{
|
{
|
||||||
h8500_opcode_info *opcode;
|
const h8500_opcode_info *opcode;
|
||||||
char prev_buffer[100];
|
char prev_buffer[100];
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
||||||
|
@ -148,14 +146,11 @@ static int crw; /* word sized cr */
|
||||||
static int cr; /* unknown size cr */
|
static int cr; /* unknown size cr */
|
||||||
|
|
||||||
static expressionS displacement;/* displacement expression */
|
static expressionS displacement;/* displacement expression */
|
||||||
static int displacement_size; /* and size if given */
|
|
||||||
|
|
||||||
static int immediate_inpage;
|
static int immediate_inpage;
|
||||||
static expressionS immediate; /* immediate expression */
|
static expressionS immediate; /* immediate expression */
|
||||||
static int immediate_size; /* and size if given */
|
|
||||||
|
|
||||||
static expressionS absolute; /* absolute expression */
|
static expressionS absolute; /* absolute expression */
|
||||||
static int absolute_size; /* and size if given */
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -169,6 +164,8 @@ h8500_operand_info;
|
||||||
|
|
||||||
/* Try to parse a reg name. Return the number of chars consumed. */
|
/* Try to parse a reg name. Return the number of chars consumed. */
|
||||||
|
|
||||||
|
static int parse_reg PARAMS ((char *, int *, int *));
|
||||||
|
|
||||||
static int
|
static int
|
||||||
parse_reg (src, mode, reg)
|
parse_reg (src, mode, reg)
|
||||||
char *src;
|
char *src;
|
||||||
|
@ -246,6 +243,8 @@ parse_reg (src, mode, reg)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *parse_exp PARAMS ((char *, expressionS *, int *));
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
parse_exp (s, op, page)
|
parse_exp (s, op, page)
|
||||||
char *s;
|
char *s;
|
||||||
|
@ -292,6 +291,9 @@ typedef enum
|
||||||
exp_signed, exp_unsigned, exp_sandu
|
exp_signed, exp_unsigned, exp_sandu
|
||||||
} sign_type;
|
} sign_type;
|
||||||
|
|
||||||
|
static char *skip_colonthing
|
||||||
|
PARAMS ((sign_type, char *, h8500_operand_info *, int, int, int, int));
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
skip_colonthing (sign, ptr, exp, def, size8, size16, size24)
|
skip_colonthing (sign, ptr, exp, def, size8, size16, size24)
|
||||||
sign_type sign;
|
sign_type sign;
|
||||||
|
@ -311,12 +313,12 @@ skip_colonthing (sign, ptr, exp, def, size8, size16, size24)
|
||||||
ptr++;
|
ptr++;
|
||||||
exp->type = size8;
|
exp->type = size8;
|
||||||
}
|
}
|
||||||
else if (ptr[0] == '1' & ptr[1] == '6')
|
else if (ptr[0] == '1' && ptr[1] == '6')
|
||||||
{
|
{
|
||||||
ptr += 2;
|
ptr += 2;
|
||||||
exp->type = size16;
|
exp->type = size16;
|
||||||
}
|
}
|
||||||
else if (ptr[0] == '2' & ptr[1] == '4')
|
else if (ptr[0] == '2' && ptr[1] == '4')
|
||||||
{
|
{
|
||||||
if (!size24)
|
if (!size24)
|
||||||
{
|
{
|
||||||
|
@ -362,6 +364,8 @@ skip_colonthing (sign, ptr, exp, def, size8, size16, size24)
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int parse_reglist PARAMS ((char *, h8500_operand_info *));
|
||||||
|
|
||||||
static int
|
static int
|
||||||
parse_reglist (src, op)
|
parse_reglist (src, op)
|
||||||
char *src;
|
char *src;
|
||||||
|
@ -431,6 +435,8 @@ parse_reglist (src, op)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static void get_operand PARAMS ((char **, h8500_operand_info *, char));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
get_operand (ptr, op, ispage)
|
get_operand (ptr, op, ispage)
|
||||||
char **ptr;
|
char **ptr;
|
||||||
|
@ -559,12 +565,14 @@ get_operand (ptr, op, ispage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *get_operands
|
||||||
|
PARAMS ((h8500_opcode_info *, char *, h8500_operand_info *));
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
get_operands (info, args, operand)
|
get_operands (info, args, operand)
|
||||||
h8500_opcode_info *info;
|
h8500_opcode_info *info;
|
||||||
char *args;
|
char *args;
|
||||||
h8500_operand_info *operand;
|
h8500_operand_info *operand;
|
||||||
|
|
||||||
{
|
{
|
||||||
char *ptr = args;
|
char *ptr = args;
|
||||||
|
|
||||||
|
@ -602,6 +610,9 @@ get_operands (info, args, operand)
|
||||||
|
|
||||||
int pcrel8; /* Set when we've seen a pcrel operand */
|
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 *
|
static h8500_opcode_info *
|
||||||
get_specific (opcode, operands)
|
get_specific (opcode, operands)
|
||||||
h8500_opcode_info *opcode;
|
h8500_opcode_info *opcode;
|
||||||
|
@ -610,8 +621,7 @@ get_specific (opcode, operands)
|
||||||
h8500_opcode_info *this_try = opcode;
|
h8500_opcode_info *this_try = opcode;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
unsigned int noperands = opcode->nargs;
|
unsigned int noperands = opcode->nargs;
|
||||||
|
int this_index = opcode->idx;
|
||||||
unsigned int this_index = opcode->idx;
|
|
||||||
|
|
||||||
while (this_index == opcode->idx && !found)
|
while (this_index == opcode->idx && !found)
|
||||||
{
|
{
|
||||||
|
@ -843,7 +853,9 @@ get_specific (opcode, operands)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int check PARAMS ((expressionS *, int, int));
|
||||||
|
|
||||||
|
static int
|
||||||
check (operand, low, high)
|
check (operand, low, high)
|
||||||
expressionS *operand;
|
expressionS *operand;
|
||||||
int low;
|
int low;
|
||||||
|
@ -858,6 +870,8 @@ check (operand, low, high)
|
||||||
return operand->X_add_number;
|
return operand->X_add_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void insert PARAMS ((char *, int, expressionS *, int, int));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
insert (output, index, exp, reloc, pcrel)
|
insert (output, index, exp, reloc, pcrel)
|
||||||
char *output;
|
char *output;
|
||||||
|
@ -874,10 +888,13 @@ insert (output, index, exp, reloc, pcrel)
|
||||||
reloc);
|
reloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void build_relaxable_instruction
|
||||||
|
PARAMS ((h8500_opcode_info *, h8500_operand_info *));
|
||||||
|
|
||||||
|
static void
|
||||||
build_relaxable_instruction (opcode, operand)
|
build_relaxable_instruction (opcode, operand)
|
||||||
h8500_opcode_info *opcode;
|
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
|
/* 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
|
three bytes long if a lonely branch and up to 9 bytes if long
|
||||||
|
@ -917,11 +934,12 @@ build_relaxable_instruction (opcode, operand)
|
||||||
|
|
||||||
/* Now we know what sort of opcodes it is, let's build the bytes. */
|
/* 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
|
static void
|
||||||
build_bytes (opcode, operand)
|
build_bytes (opcode, operand)
|
||||||
h8500_opcode_info *opcode;
|
h8500_opcode_info *opcode;
|
||||||
h8500_operand_info *operand;
|
h8500_operand_info *operand;
|
||||||
|
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
|
@ -1116,21 +1134,21 @@ md_assemble (str)
|
||||||
|
|
||||||
void
|
void
|
||||||
tc_crawl_symbol_chain (headers)
|
tc_crawl_symbol_chain (headers)
|
||||||
object_headers *headers;
|
object_headers *headers ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
printf (_("call to tc_crawl_symbol_chain \n"));
|
printf (_("call to tc_crawl_symbol_chain \n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
symbolS *
|
symbolS *
|
||||||
md_undefined_symbol (name)
|
md_undefined_symbol (name)
|
||||||
char *name;
|
char *name ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tc_headers_hook (headers)
|
tc_headers_hook (headers)
|
||||||
object_headers *headers;
|
object_headers *headers ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
printf (_("call to tc_headers_hook \n"));
|
printf (_("call to tc_headers_hook \n"));
|
||||||
}
|
}
|
||||||
|
@ -1154,7 +1172,6 @@ md_atof (type, litP, sizeP)
|
||||||
LITTLENUM_TYPE words[MAX_LITTLENUMS];
|
LITTLENUM_TYPE words[MAX_LITTLENUMS];
|
||||||
LITTLENUM_TYPE *wordP;
|
LITTLENUM_TYPE *wordP;
|
||||||
char *t;
|
char *t;
|
||||||
char *atof_ieee ();
|
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
@ -1207,24 +1224,19 @@ size_t md_longopts_size = sizeof (md_longopts);
|
||||||
|
|
||||||
int
|
int
|
||||||
md_parse_option (c, arg)
|
md_parse_option (c, arg)
|
||||||
int c;
|
int c ATTRIBUTE_UNUSED;
|
||||||
char *arg;
|
char *arg ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
md_show_usage (stream)
|
md_show_usage (stream)
|
||||||
FILE *stream;
|
FILE *stream ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void wordify_scb PARAMS ((char *, int *, int *));
|
||||||
tc_aout_fix_to_chars ()
|
|
||||||
{
|
|
||||||
printf (_("call to tc_aout_fix_to_chars \n"));
|
|
||||||
abort ();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
wordify_scb (buffer, disp_size, inst_size)
|
wordify_scb (buffer, disp_size, inst_size)
|
||||||
|
@ -1296,8 +1308,8 @@ wordify_scb (buffer, disp_size, inst_size)
|
||||||
|
|
||||||
void
|
void
|
||||||
md_convert_frag (headers, seg, fragP)
|
md_convert_frag (headers, seg, fragP)
|
||||||
object_headers *headers;
|
object_headers *headers ATTRIBUTE_UNUSED;
|
||||||
segT seg;
|
segT seg ATTRIBUTE_UNUSED;
|
||||||
fragS *fragP;
|
fragS *fragP;
|
||||||
{
|
{
|
||||||
int disp_size = 0;
|
int disp_size = 0;
|
||||||
|
@ -1492,7 +1504,7 @@ md_pcrel_from (fixP)
|
||||||
|
|
||||||
void
|
void
|
||||||
tc_coff_symbol_emit_hook (ignore)
|
tc_coff_symbol_emit_hook (ignore)
|
||||||
symbolS *ignore;
|
symbolS *ignore ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,10 @@ extern void tc_reloc_mangle
|
||||||
#define RELOC_32 1234
|
#define RELOC_32 1234
|
||||||
|
|
||||||
#define TC_START_LABEL(ch, ptr) (ch == ':' && start_label(ptr))
|
#define TC_START_LABEL(ch, ptr) (ch == ':' && start_label(ptr))
|
||||||
|
int start_label PARAMS ((char *));
|
||||||
|
|
||||||
#define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag)
|
#define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag)
|
||||||
|
int tc_coff_sizemachdep PARAMS ((struct frag *));
|
||||||
|
|
||||||
#define md_operand(x)
|
#define md_operand(x)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
2002-12-13 Alan Modra <amodra@bigpond.net.au>
|
2002-12-13 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* h8500-opc.h (h8500_table): Add missing initializers to quiet
|
||||||
|
warnings.
|
||||||
* pj-dis.c (print_insn_pj): Adjust for pj_opc_info_t change.
|
* pj-dis.c (print_insn_pj): Adjust for pj_opc_info_t change.
|
||||||
* z8kgen.c: Include "libiberty.h".
|
* z8kgen.c: Include "libiberty.h".
|
||||||
(opt, args, toks): Fix initializer warnings.
|
(opt, args, toks): Fix initializer warnings.
|
||||||
|
|
1901
opcodes/h8500-opc.h
1901
opcodes/h8500-opc.h
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue