* config/tc-a29k.c (insert_sreg): Prototype.

(define_some_regs): Prototype, make static.
	(parse_operand): Likewise.
	(md_parse_option <c,arg>): Add ATTRIBUTE_UNUSED.
	(md_show_usage <stream>): Likewise.
	(md_section_align <segment>): Likewise.
	(md_convert_frag <all args>): Likewise.
	(md_estimate_size_before_relax <all args>): Likewise.
	(md_apply_fix3): Don't cast valP pointer type.  Fix bogus >>='s.
	* config/tc-arm.c (arm_validate_fix): Only for OBJ_COFF or OBJ_ELF.
This commit is contained in:
Alan Modra
2002-12-12 22:43:45 +00:00
parent ebf19f1b15
commit bfc866a6e6
3 changed files with 29 additions and 14 deletions

View File

@ -1,5 +1,15 @@
2002-12-13 Alan Modra <amodra@bigpond.net.au> 2002-12-13 Alan Modra <amodra@bigpond.net.au>
* config/tc-a29k.c (insert_sreg): Prototype.
(define_some_regs): Prototype, make static.
(parse_operand): Likewise.
(md_parse_option <c,arg>): Add ATTRIBUTE_UNUSED.
(md_show_usage <stream>): Likewise.
(md_section_align <segment>): Likewise.
(md_convert_frag <all args>): Likewise.
(md_estimate_size_before_relax <all args>): Likewise.
(md_apply_fix3): Don't cast valP pointer type. Fix bogus >>='s.
* config/tc-arm.c (arm_validate_fix): Only for OBJ_COFF or OBJ_ELF.
* config/tc-d30v.c (md_parse_option <arg>): Add ATTRIBUTE_UNUSED. * config/tc-d30v.c (md_parse_option <arg>): Add ATTRIBUTE_UNUSED.
(md_undefined_symbol <name>): Likewise. (md_undefined_symbol <name>): Likewise.
(md_convert_frag <all args>): Likewise. (md_convert_frag <all args>): Likewise.

View File

@ -61,6 +61,9 @@ static void machine_ip PARAMS ((char *str));
static void s_data1 PARAMS ((void)); static void s_data1 PARAMS ((void));
static void s_use PARAMS ((int)); static void s_use PARAMS ((int));
#endif #endif
static void insert_sreg PARAMS ((char *, int));
static void define_some_regs PARAMS ((void));
static char *parse_operand PARAMS ((char *, expressionS *, int));
const pseudo_typeS const pseudo_typeS
md_pseudo_table[] = md_pseudo_table[] =
@ -198,7 +201,7 @@ insert_sreg (regname, regnum)
/* Install symbol definitions for assorted special registers. /* Install symbol definitions for assorted special registers.
See ASM29K Ref page 2-9. */ See ASM29K Ref page 2-9. */
void static void
define_some_regs () define_some_regs ()
{ {
#define SREG 256 #define SREG 256
@ -360,7 +363,7 @@ md_assemble (str)
} }
} }
char * static char *
parse_operand (s, operandp, opt) parse_operand (s, operandp, opt)
char *s; char *s;
expressionS *operandp; expressionS *operandp;
@ -787,7 +790,7 @@ md_apply_fix3 (fixP, valP, seg)
valueT * valP; valueT * valP;
segT seg ATTRIBUTE_UNUSED; segT seg ATTRIBUTE_UNUSED;
{ {
long val = * (long *) valP; long val = *valP;
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
fixP->fx_addnumber = val; /* Remember value for emit_reloc. */ fixP->fx_addnumber = val; /* Remember value for emit_reloc. */
@ -813,7 +816,7 @@ md_apply_fix3 (fixP, valP, seg)
break; break;
case RELOC_WDISP30: case RELOC_WDISP30:
val = (val >>= 2) + 1; val = (val >> 2) + 1;
buf[0] |= (val >> 24) & 0x3f; buf[0] |= (val >> 24) & 0x3f;
buf[1] = (val >> 16); buf[1] = (val >> 16);
buf[2] = val >> 8; buf[2] = val >> 8;
@ -837,7 +840,7 @@ md_apply_fix3 (fixP, valP, seg)
break; break;
case RELOC_WDISP22: case RELOC_WDISP22:
val = (val >>= 2) + 1; val = (val >> 2) + 1;
/* FALLTHROUGH */ /* FALLTHROUGH */
case RELOC_BASE22: case RELOC_BASE22:
buf[1] |= (val >> 16) & 0x3f; buf[1] |= (val >> 16) & 0x3f;
@ -925,9 +928,9 @@ tc_coff_fix2rtype (fixP)
/* should never be called for 29k */ /* should never be called for 29k */
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;
register fragS *fragP; register fragS *fragP ATTRIBUTE_UNUSED;
{ {
as_fatal (_("a29k_convert_frag\n")); as_fatal (_("a29k_convert_frag\n"));
} }
@ -935,8 +938,8 @@ md_convert_frag (headers, seg, fragP)
/* should never be called for a29k */ /* should never be called for a29k */
int int
md_estimate_size_before_relax (fragP, segtype) md_estimate_size_before_relax (fragP, segtype)
register fragS *fragP; register fragS *fragP ATTRIBUTE_UNUSED;
segT segtype; segT segtype ATTRIBUTE_UNUSED;
{ {
as_fatal (_("a29k_estimate_size_before_relax\n")); as_fatal (_("a29k_estimate_size_before_relax\n"));
return 0; return 0;
@ -1046,15 +1049,15 @@ 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;
{ {
} }
@ -1277,7 +1280,7 @@ md_operand (expressionP)
/* Round up a section size to the appropriate boundary. */ /* Round up a section size to the appropriate boundary. */
valueT valueT
md_section_align (segment, size) md_section_align (segment, size)
segT segment; segT segment ATTRIBUTE_UNUSED;
valueT size; valueT size;
{ {
return size; /* Byte alignment is fine */ return size; /* Byte alignment is fine */

View File

@ -11415,6 +11415,7 @@ arm_canonicalize_symbol_name (name)
return name; return name;
} }
#if defined OBJ_COFF || defined OBJ_ELF
void void
arm_validate_fix (fixP) arm_validate_fix (fixP)
fixS * fixP; fixS * fixP;
@ -11431,6 +11432,7 @@ arm_validate_fix (fixP)
fixP->fx_addsy = find_real_start (fixP->fx_addsy); fixP->fx_addsy = find_real_start (fixP->fx_addsy);
} }
} }
#endif
int int
arm_force_relocation (fixp) arm_force_relocation (fixp)