* config/tc-arc.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-d10v.c: Likewise.
* config/tc-d30v.c: Likewise.
* config/tc-frv.c: Likewise.
* config/tc-frv.h: Likewise.
* config/tc-h8300.c: Likewise.
* config/tc-h8500.c: Likewise.
* config/tc-i370.c: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-ip2k.c: Likewise.
* config/tc-m68hc11.c: Likewise.
* config/tc-maxq.c: Likewise.
* config/tc-mcore.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-msp430.c: Likewise.
* config/tc-pj.c: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-ppc.h: Likewise.
* config/tc-s390.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-sh64.c: Likewise.
* config/tc-tic4x.c: Likewise.
* config/tc-tic80.c: Likewise.
* config/tc-v850.c: Likewise.
* config/tc-vax.c: Likewise.
* config/tc-w65.c: Likewise.
* config/tc-xstormy16.c: Likewise.
* config/tc-z8k.c: Likewise.
+2005-02-23 Alan Modra <amodra@bigpond.net.au>
+
+ * cgen.c: Warning fixes.
+ * config/tc-arc.c: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-avr.c: Likewise.
+ * config/tc-d10v.c: Likewise.
+ * config/tc-d30v.c: Likewise.
+ * config/tc-frv.c: Likewise.
+ * config/tc-frv.h: Likewise.
+ * config/tc-h8300.c: Likewise.
+ * config/tc-h8500.c: Likewise.
+ * config/tc-i370.c: Likewise.
+ * config/tc-i960.c: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-ip2k.c: Likewise.
+ * config/tc-m68hc11.c: Likewise.
+ * config/tc-maxq.c: Likewise.
+ * config/tc-mcore.c: Likewise.
+ * config/tc-mips.c: Likewise.
+ * config/tc-msp430.c: Likewise.
+ * config/tc-pj.c: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-ppc.h: Likewise.
+ * config/tc-s390.c: Likewise.
+ * config/tc-sh.c: Likewise.
+ * config/tc-sh64.c: Likewise.
+ * config/tc-tic4x.c: Likewise.
+ * config/tc-tic80.c: Likewise.
+ * config/tc-v850.c: Likewise.
+ * config/tc-vax.c: Likewise.
+ * config/tc-w65.c: Likewise.
+ * config/tc-xstormy16.c: Likewise.
+ * config/tc-z8k.c: Likewise.
+
2005-02-22 Catherine Moore <clm@cm00re.com>
* read.c (read_a_source_file): Reinstate TC_EQUAL_IN_INSN test.
/* GAS interface for targets using CGEN: Cpu tools GENerator.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* If we're recording insns as numbers (rather than a string of bytes),
target byte order handling is deferred until now. */
#if CGEN_INT_INSN_P
- cgen_put_insn_value (gas_cgen_cpu_desc, f, length, *buf);
+ cgen_put_insn_value (gas_cgen_cpu_desc, (unsigned char *) f, length, *buf);
#else
memcpy (f, buf, byte_len);
#endif
#if CGEN_INT_INSN_P
{
CGEN_INSN_INT insn_value =
- cgen_get_insn_value (cd, where, CGEN_INSN_BITSIZE (insn));
+ cgen_get_insn_value (cd, (unsigned char *) where,
+ CGEN_INSN_BITSIZE (insn));
/* ??? 0 is passed for `pc'. */
errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields,
&insn_value, (bfd_vma) 0);
- cgen_put_insn_value (cd, where, CGEN_INSN_BITSIZE (insn),
- insn_value);
+ cgen_put_insn_value (cd, (unsigned char *) where,
+ CGEN_INSN_BITSIZE (insn), insn_value);
}
#else
/* ??? 0 is passed for `pc'. */
- errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields, where,
+ errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields,
+ (unsigned char *) where,
(bfd_vma) 0);
#endif
if (errmsg)
arc_extinst (ignore)
int ignore ATTRIBUTE_UNUSED;
{
- unsigned char syntax[129];
+ char syntax[129];
char *name;
char *p;
char c;
{
int size;
addressT where;
- unsigned char *ptr;
+ char *ptr;
/* The current word of data. */
valueT data;
/* The number of bytes left in this word. */
s_arm_unwind_fnend (int ignored ATTRIBUTE_UNUSED)
{
long where;
- unsigned char *ptr;
+ char *ptr;
valueT val;
demand_empty_rest_of_line ();
/* tc-avr.c -- Assembler code for the ATMEL AVR
- Copyright 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2004, 2005
+ Free Software Foundation, Inc.
Contributed by Denis Chertykov <denisc@overta.ru>
This file is part of GAS, the GNU Assembler.
{
/* Fetch the instruction, insert the fully resolved operand
value, and stuff the instruction back again. */
- where = fixP->fx_frag->fr_literal + fixP->fx_where;
+ where = (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where;
insn = bfd_getl16 (where);
switch (fixP->fx_r_type)
/* tc-d10v.c -- Assembler code for the Mitsubishi D10V
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
char *str;
struct d10v_opcode **opcode;
{
- unsigned char *op_start, *save;
- unsigned char *op_end;
+ unsigned char *op_start, *op_end;
+ char *save;
char name[20];
int nlen = 0;
expressionS myops[6];
str++;
/* Find the opcode end. */
- for (op_start = op_end = (unsigned char *) (str);
- *op_end
- && nlen < 20
- && !is_end_of_line[*op_end] && *op_end != ' ';
+ for (op_start = op_end = (unsigned char *) str;
+ *op_end && nlen < 20 && !is_end_of_line[*op_end] && *op_end != ' ';
op_end++)
{
name[nlen] = TOLOWER (op_start[nlen]);
as_fatal (_("unknown opcode: %s"), name);
save = input_line_pointer;
- input_line_pointer = op_end;
+ input_line_pointer = (char *) op_end;
*opcode = find_opcode (*opcode, myops);
if (*opcode == 0)
return -1;
/* tc-d30v.c -- Assembler code for the Mitsubishi D30V
- Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2005
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
int shortp;
int is_parallel;
{
- unsigned char *op_start;
- unsigned char *save;
- unsigned char *op_end;
+ char *op_start;
+ char *save;
+ char *op_end;
char name[NAME_BUF_LEN];
int cmp_hack;
int nlen = 0;
str++;
/* Find the opcode end. */
- for (op_start = op_end = (unsigned char *) (str);
+ for (op_start = op_end = str;
*op_end
&& nlen < (NAME_BUF_LEN - 1)
&& *op_end != '/'
- && !is_end_of_line[*op_end] && *op_end != ' ';
+ && !is_end_of_line[(unsigned char) *op_end] && *op_end != ' ';
op_end++)
{
name[nlen] = TOLOWER (op_start[nlen]);
/* Set the packing bit on the previous insn. */
if (pack_prev)
{
- unsigned char *buffer = prev_insn->address;
+ char *buffer = prev_insn->address;
buffer[0] |= 0x80;
}
/* The branch is in the middle. Split this vliw insn into first
/* Set the packing bit on the previous insn. */
if (pack_prev)
{
- unsigned char *buffer = prev_insn->address;
+ char *buffer = prev_insn->address;
buffer[0] |= 0x80;
}
/* Set the packing bit on the previous insn. */
if (pack_prev)
{
- unsigned char *buffer = prev_insn->address;
+ char *buffer = prev_insn->address;
buffer[0] |= 0x80;
}
/* tc-frv.h -- Header file for tc-frv.c.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
{ \
valueT count = ((FRAGP)->fr_next->fr_address \
- ((FRAGP)->fr_address + (FRAGP)->fr_fix)); \
- unsigned char *dest = (FRAGP)->fr_literal + (FRAGP)->fr_fix; \
+ char *dest = (FRAGP)->fr_literal + (FRAGP)->fr_fix; \
if ((count & 3) != 0) \
{ \
memset (dest, 0, (count & 3)); \
/* tc-h8300.c -- Assemble code for the Renesas H8/300
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
static void
get_rtsl_operands (char *ptr, struct h8_op *operand)
{
- int mode, num, num2, len, type = 0;
+ int mode, len, type = 0;
+ unsigned int num, num2;
ptr++;
if (*ptr == '(')
ptr += len;
/* CONST_xxx are used as placeholders in the opcode table. */
num = num2 - num;
- if (num < 0 || num > 3)
+ if (num > 3)
{
as_bad (_("invalid register list"));
return;
/* tc-h8500.c -- Assemble code for the Renesas H8/500
- Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002, 2003
+ Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
typedef struct
{
int type;
- int reg;
+ unsigned int reg;
expressionS exp;
int page;
}
/* Try to parse a reg name. Return the number of chars consumed. */
-static int parse_reg PARAMS ((char *, int *, int *));
+static int parse_reg PARAMS ((char *, int *, unsigned int *));
static int
parse_reg (src, mode, reg)
char *src;
int *mode;
- int *reg;
+ unsigned int *reg;
{
char *end;
int len;
h8500_operand_info *op;
{
int mode;
- int rn;
+ unsigned int rn;
int mask = 0;
- int rm;
+ unsigned int rm;
int idx = 1; /* skip ( */
while (src[idx] && src[idx] != ')')
/* tc-i370.c -- Assembler for the IBM 360/370/390 instruction set.
Loosely based on the ppc files by Linas Vepstas <linas@linas.org> 1998, 99
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2005 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GAS, the GNU Assembler.
/* If there are fewer operands in the line then are called
for by the instruction, we want to skip the optional
operand. */
- nwanted = strlen (opcode->operands);
+ nwanted = strlen ((char *) opcode->operands);
if (have_optional_index)
{
if (opcount < nwanted)
/* tc-i960.c - All the i80960-specific stuff
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003
+ 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS.
md_chars_to_number: convert from target byte order to host byte order.
*************************************************************************** */
-static int md_chars_to_number PARAMS ((unsigned char *, int));
+static int md_chars_to_number PARAMS ((char *, int));
static int
md_chars_to_number (val, n)
- unsigned char *val; /* Value in target byte order */
+ char *val; /* Value in target byte order */
int n; /* Number of bytes in the input */
{
int retval;
for (retval = 0; n--;)
{
retval <<= 8;
- retval |= val[n];
+ retval |= (unsigned char) val[n];
}
return retval;
}
}
/* Output COUNT bytes to a memory location. */
-static unsigned char *vbyte_mem_ptr = NULL;
+static char *vbyte_mem_ptr = NULL;
void
output_vbyte_mem (count, ptr, comment)
unsigned long imask_size;
{
imask[0] = UNW_P4;
- (*f) (imask_size, imask, NULL);
+ (*f) (imask_size, (char *) imask, NULL);
}
static void
dot_spillreg (dummy)
int dummy ATTRIBUTE_UNUSED;
{
- int sep, ab, xy, reg, treg;
+ int sep;
+ unsigned int ab, xy, reg, treg;
expressionS e1, e2;
if (!in_procedure ("spillreg"))
int psprel;
{
expressionS e1, e2;
- int sep, ab, reg;
+ int sep;
+ unsigned int ab, reg;
if (!in_procedure ("spillmem"))
return;
dot_spillreg_p (dummy)
int dummy ATTRIBUTE_UNUSED;
{
- int sep, ab, xy, reg, treg;
+ int sep;
+ unsigned int ab, xy, reg, treg;
expressionS e1, e2, e3;
unsigned int qp;
int psprel;
{
expressionS e1, e2, e3;
- int sep, ab, reg;
+ int sep;
+ unsigned int ab, reg;
unsigned int qp;
if (!in_procedure ("spillmem.p"))
int dummy ATTRIBUTE_UNUSED;
{
expressionS e;
- unsigned char *ptr;
+ char *ptr;
int bytes_per_address;
long where;
segT saved_seg;
{
const struct ia64_operand *odesc, *o2desc;
struct ia64_opcode *idesc = slot->idesc;
- bfd_signed_vma insn, val;
+ bfd_vma insn;
+ bfd_signed_vma val;
const char *err;
int i;
/* tc-ip2k.c -- Assembler for the Scenix IP2xxx.
- Copyright (C) 2000, 2002, 2003 Free Software Foundation.
+ Copyright (C) 2000, 2002, 2003, 2005 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
the PCL (pc + 2) >> 1 is odd or even. */
{
enum cgen_parse_operand_result result_type;
- long value;
+ bfd_vma value;
const char *curpc_plus_2 = ".+2";
const char *err;
/* Canonical name, since used a lot. */
CGEN_CPU_DESC cd = gas_cgen_cpu_desc;
CGEN_INSN_INT insn_value
- = cgen_get_insn_value (cd, where,
+ = cgen_get_insn_value (cd, (unsigned char *) where,
CGEN_INSN_BITSIZE (fixP->fx_cgen.insn));
/* Preserve (DP) or (SP) specification. */
*valueP += (insn_value & 0x180);
/* tc-m68hc11.c -- Assembler code for the Motorola 68HC11 & 68HC12.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@nerim.fr)
This file is part of GAS, the GNU Assembler.
struct m68hc11_opcode_def *opc;
struct m68hc11_opcode *opcode;
- unsigned char *op_start, *save;
- unsigned char *op_end;
+ unsigned char *op_start, *op_end;
+ char *save;
char name[20];
int nlen = 0;
operand operands[M6811_MAX_OPERANDS];
/* Find the opcode end and get the opcode in 'name'. The opcode is forced
lower case (the opcode table only has lower case op-codes). */
- for (op_start = op_end = (unsigned char *) (str);
+ for (op_start = op_end = (unsigned char *) str;
*op_end && nlen < 20 && !is_end_of_line[*op_end] && *op_end != ' ';
op_end++)
{
return;
}
save = input_line_pointer;
- input_line_pointer = op_end;
+ input_line_pointer = (char *) op_end;
if (opc)
{
fragS * fragP)
#endif
{
- unsigned char *opcode;
+ char *opcode;
offsetT target_address;
offsetT opcode_address;
offsetT displacement_from_opcode_start;
|| fragP->fr_subtype == NO_PREFIX))
{
/* Its a displacement. */
- char *p = (char *) &opcode[0];
-
- *p = (char) displacement_from_opcode_start;
+ *opcode = (char) displacement_from_opcode_start;
}
else
{
if (fragP->fr_subtype != SHORT_PREFIX)
{
RELOC_ENUM reloc_type;
- unsigned char *opcode;
int old_fr_fix;
int size = 2;
if (reloc_type == 1)
size = 0;
old_fr_fix = fragP->fr_fix;
- opcode = (unsigned char *) fragP->fr_opcode;
fragP->fr_fix += (size);
segT sec ATTRIBUTE_UNUSED;
register fragS * fragP;
{
- unsigned char * buffer;
+ char *buffer;
int targ_addr = S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset;
- buffer = (unsigned char *) (fragP->fr_fix + fragP->fr_literal);
+ buffer = fragP->fr_fix + fragP->fr_literal;
switch (fragP->fr_subtype)
{
if (fixP->fx_done)
{
if (8 <= sizeof (valueT))
- md_number_to_chars (buf, *valP, 8);
+ md_number_to_chars ((char *) buf, *valP, 8);
else
{
valueT hiv;
value now. This can happen if we have a .word which is not
resolved when it appears but is later defined. */
if (fixP->fx_done)
- md_number_to_chars (buf, *valP, 4);
+ md_number_to_chars ((char *) buf, *valP, 4);
break;
case BFD_RELOC_16:
/* If we are deleting this reloc entry, we must fill in the
value now. */
if (fixP->fx_done)
- md_number_to_chars (buf, *valP, 2);
+ md_number_to_chars ((char *) buf, *valP, 2);
break;
case BFD_RELOC_LO16:
_("relocation overflow"));
if (target_big_endian)
buf += 2;
- md_number_to_chars (buf, *valP, 2);
+ md_number_to_chars ((char *) buf, *valP, 2);
}
break;
if (*valP + 0x20000 <= 0x3ffff)
{
insn |= (*valP >> 2) & 0xffff;
- md_number_to_chars (buf, insn, 4);
+ md_number_to_chars ((char *) buf, insn, 4);
}
else if (mips_pic == NO_PIC
&& fixP->fx_done
fixP->fx_done = 0;
fixP->fx_addsy = section_symbol (text_section);
*valP += md_pcrel_from (fixP);
- md_number_to_chars (buf, insn, 4);
+ md_number_to_chars ((char *) buf, insn, 4);
}
else
{
fixp->fx_file = fragp->fr_file;
fixp->fx_line = fragp->fr_line;
- md_number_to_chars (buf, insn, 4);
+ md_number_to_chars ((char *) buf, insn, 4);
buf += 4;
}
else
i--;
insn |= i;
/* Branch over the jump. */
- md_number_to_chars (buf, insn, 4);
+ md_number_to_chars ((char *) buf, insn, 4);
buf += 4;
/* Nop */
- md_number_to_chars (buf, 0, 4);
+ md_number_to_chars ((char *) buf, 0, 4);
buf += 4;
if (RELAX_BRANCH_LIKELY (fragp->fr_subtype))
delay slot. */
insn |= i;
- md_number_to_chars (buf, insn, 4);
+ md_number_to_chars ((char *) buf, insn, 4);
buf += 4;
- md_number_to_chars (buf, 0, 4);
+ md_number_to_chars ((char *) buf, 0, 4);
buf += 4;
}
fixp->fx_file = fragp->fr_file;
fixp->fx_line = fragp->fr_line;
- md_number_to_chars (buf, insn, 4);
+ md_number_to_chars ((char *) buf, insn, 4);
buf += 4;
}
else
fixp->fx_file = fragp->fr_file;
fixp->fx_line = fragp->fr_line;
- md_number_to_chars (buf, insn, 4);
+ md_number_to_chars ((char *) buf, insn, 4);
buf += 4;
if (mips_opts.isa == ISA_MIPS1)
{
/* nop */
- md_number_to_chars (buf, 0, 4);
+ md_number_to_chars ((char *) buf, 0, 4);
buf += 4;
}
fixp->fx_file = fragp->fr_file;
fixp->fx_line = fragp->fr_line;
- md_number_to_chars (buf, insn, 4);
+ md_number_to_chars ((char *) buf, insn, 4);
buf += 4;
/* j(al)r $at. */
else
insn = 0x00200008;
- md_number_to_chars (buf, insn, 4);
+ md_number_to_chars ((char *) buf, insn, 4);
buf += 4;
}
}
if (use_extend)
{
- md_number_to_chars (buf, 0xf000 | extend, 2);
+ md_number_to_chars ((char *) buf, 0xf000 | extend, 2);
fragp->fr_fix += 2;
buf += 2;
}
- md_number_to_chars (buf, insn, 2);
+ md_number_to_chars ((char *) buf, insn, 2);
fragp->fr_fix += 2;
buf += 2;
}
else
as_warn (_(".end directive missing or unknown symbol"));
+#ifdef OBJ_ELF
/* Create an expression to calculate the size of the function. */
if (p && cur_proc_ptr)
{
cur_proc_ptr->func_end_sym = exp->X_add_symbol;
}
-#ifdef OBJ_ELF
/* Generate a .pdr section. */
if (OUTPUT_FLAVOR == bfd_target_elf_flavour && ! ECOFF_DEBUGGING
&& mips_flag_pdr)
/* Fetch the instruction, insert the fully resolved operand
value, and stuff the instruction back again. */
- where = fixp->fx_frag->fr_literal + fixp->fx_where;
+ where = (unsigned char *) fixp->fx_frag->fr_literal + fixp->fx_where;
insn = bfd_getl16 (where);
/*-
tc-pj.c -- Assemble code for Pico Java
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
md_assemble (str)
char *str;
{
- unsigned char *op_start;
- unsigned char *op_end;
+ char *op_start;
+ char *op_end;
pj_opc_info_t *opcode;
char *output;
str++;
/* Find the op code end. */
- for (op_start = op_end = (unsigned char *) (str);
- *op_end && !is_end_of_line[*op_end] && *op_end != ' ';
+ op_start = str;
+ for (op_end = str;
+ *op_end && !is_end_of_line[*op_end & 0xff] && *op_end != ' ';
op_end++)
nlen++;
/* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000)
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004 Free Software Foundation, Inc.
+ 2004, 2005 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GAS, the GNU Assembler.
if (fixP->fx_pcrel)
abort ();
{
- unsigned char *where = fixP->fx_frag->fr_literal + fixP->fx_where;
+ char *where = fixP->fx_frag->fr_literal + fixP->fx_where;
unsigned long val, mask;
if (target_big_endian)
/* tc-ppc.h -- Header file for tc-ppc.c.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004 Free Software Foundation, Inc.
+ 2004, 2005 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GAS, the GNU Assembler.
- ((FRAGP)->fr_address + (FRAGP)->fr_fix)); \
if (count != 0 && (count & 3) == 0) \
{ \
- unsigned char *dest = (FRAGP)->fr_literal + (FRAGP)->fr_fix; \
+ char *dest = (FRAGP)->fr_literal + (FRAGP)->fr_fix; \
\
(FRAGP)->fr_var = 4; \
if (target_big_endian) \
&& (addressT) exp.X_add_number < (1ULL << 32))
|| ( opformat->oplen == 2
&& (addressT) exp.X_add_number < (1ULL << 16)))
- md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
+ md_number_to_chars ((char *) insn, exp.X_add_number, opformat->oplen);
else
as_bad (_("Invalid .insn format\n"));
}
&& opformat->oplen == 6
&& generic_bignum[3] == 0)
{
- md_number_to_chars (insn, generic_bignum[2], 2);
- md_number_to_chars (&insn[2], generic_bignum[1], 2);
- md_number_to_chars (&insn[4], generic_bignum[0], 2);
+ md_number_to_chars ((char *) insn, generic_bignum[2], 2);
+ md_number_to_chars ((char *) &insn[2], generic_bignum[1], 2);
+ md_number_to_chars ((char *) &insn[4], generic_bignum[0], 2);
}
else
as_bad (_("Invalid .insn format\n"));
if (fixP->fx_done)
{
/* Insert the fully resolved operand value. */
- s390_insert_operand (where, operand, (offsetT) value,
- fixP->fx_file, fixP->fx_line);
+ s390_insert_operand ((unsigned char *) where, operand,
+ (offsetT) value, fixP->fx_file, fixP->fx_line);
return;
}
The pre-processor will eliminate whitespace in front of
any '@' after the first argument; we may be called from
assemble_ppi, so the opcode might be terminated by an '@'. */
- for (op_start = op_end = (unsigned char *) (str);
+ for (op_start = op_end = (unsigned char *) str;
*op_end
&& nlen < 20
&& !is_end_of_line[*op_end] && *op_end != ' ' && *op_end != '@';
}
name[nlen] = 0;
- *str_p = op_end;
+ *str_p = (char *) op_end;
if (nlen == 0)
as_bad (_("can't find opcode "));
void
md_assemble (char *str)
{
- unsigned char *op_end;
+ char *op_end;
sh_operand_info operand[3];
sh_opcode_info *opcode;
unsigned int size = 0;
/* tc-sh64.c -- Assemble code for the SuperH SH SHcompact and SHmedia.
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
{
/* Emit error for an out-of-range value. */
- shmedia_check_limits (valp, fixP->fx_r_type, fixP);
+ shmedia_check_limits ((offsetT *) valp, fixP->fx_r_type, fixP);
switch (fixP->fx_r_type)
{
static char *tic4x_expression
PARAMS ((char *, expressionS *));
static char *tic4x_expression_abs
- PARAMS ((char *, int *));
+ PARAMS ((char *, offsetT *));
static void tic4x_emit_char
PARAMS ((char, int));
static void tic4x_seg_alloc
static char *
tic4x_expression_abs (str, value)
char *str;
- int *value;
+ offsetT *value;
{
char *s;
char *t;
char c;
char *name;
char *p;
- int size;
+ offsetT size;
segT current_seg;
subsegT current_subseg;
symbolS *symbolP;
tic4x_expression_abs (++input_line_pointer, &size);
if (size < 0)
{
- as_bad (".bss size %d < 0!", size);
+ as_bad (".bss size %ld < 0!", (long) size);
return;
}
subseg_set (bss_section, 0);
int x ATTRIBUTE_UNUSED;
{
char c;
- int value;
+ offsetT value;
char *name;
SKIP_WHITESPACE ();
char *subsection_name;
char *name;
segT seg;
- int num;
+ offsetT num;
SKIP_WHITESPACE ();
if (*input_line_pointer == '"')
char *name;
char *section_name;
segT seg;
- int size, alignment_flag;
+ offsetT size, alignment_flag;
segT current_seg;
subsegT current_subseg;
tic4x_version (x)
int x ATTRIBUTE_UNUSED;
{
- unsigned int temp;
+ offsetT temp;
input_line_pointer =
tic4x_expression_abs (input_line_pointer, &temp);
if (!IS_CPU_TIC3X (temp) && !IS_CPU_TIC4X (temp))
- as_bad ("This assembler does not support processor generation %d",
- temp);
+ as_bad ("This assembler does not support processor generation %ld",
+ (long) temp);
- if (tic4x_cpu && temp != tic4x_cpu)
+ if (tic4x_cpu && temp != (offsetT) tic4x_cpu)
as_warn ("Changing processor generation on fly not supported...");
tic4x_cpu = temp;
demand_empty_rest_of_line ();
int ieee;
LITTLENUM_TYPE words[MAX_LITTLENUMS];
LITTLENUM_TYPE *wordP;
- unsigned char *t;
+ char *t;
switch (type)
{
if (t)
input_line_pointer = t;
*sizeP = prec * sizeof (LITTLENUM_TYPE);
- t = litP;
+
/* This loops outputs the LITTLENUMs in REVERSE order; in accord with
little endian byte order. */
/* SES: However it is required to put the words (32-bits) out in the
md_pcrel_from (fixP)
fixS *fixP;
{
- unsigned char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
+ unsigned char *buf;
unsigned int op;
+ buf = (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where;
op = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
return ((fixP->fx_where + fixP->fx_frag->fr_address) >> 2) +
/* tc-tic80.c -- Assemble for the TI TMS320C80 (MV)
- Copyright 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 2000, 2001, 2002, 2005
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
char *str;
{
char *scan;
- unsigned char *input_line_save;
+ char *input_line_save;
struct tic80_opcode *opcode;
expressionS myops[16];
/* tc-v850.c -- Assembler code for the NEC V850
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* Now create the unconditional branch + fixup to the final
target. */
- md_number_to_chars (buffer + 2, 0x00000780, 4);
+ md_number_to_chars ((char *) buffer + 2, 0x00000780, 4);
fix_new (fragP, fragP->fr_fix + 2, 4, fragP->fr_symbol,
fragP->fr_offset, 1, BFD_RELOC_UNUSED +
(int) fragP->fr_opcode + 1);
/* Remember where it is, in case we want to modify the op-code later. */
opcode_low_byteP = frag_more (v.vit_opcode_nbytes);
memcpy (opcode_low_byteP, v.vit_opcode, v.vit_opcode_nbytes);
- opcode_as_number = md_chars_to_number (opcode_as_chars = v.vit_opcode, 4);
+ opcode_as_chars = v.vit_opcode;
+ opcode_as_number = md_chars_to_number ((unsigned char *) opcode_as_chars, 4);
for (operandP = v.vit_operand,
expP = exp_of_operand,
segP = seg_of_operand,
/* tc-w65.c -- Assemble code for the W65816
- Copyright 1995, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1995, 1998, 2000, 2001, 2002, 2005
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
fragP->fr_offset);
int disp = targ_addr - next_inst;
- md_number_to_chars (buffer + inst_size, disp, disp_size);
+ md_number_to_chars ((char *) buffer + inst_size, disp, disp_size);
fragP->fr_fix += disp_size + inst_size;
fragP->fr_var = 0;
}
#if CGEN_INT_INSN_P
{
CGEN_INSN_INT insn_value =
- cgen_get_insn_value (cd, where, CGEN_INSN_BITSIZE (insn));
+ cgen_get_insn_value (cd, (unsigned char *) where,
+ CGEN_INSN_BITSIZE (insn));
/* ??? 0 is passed for `pc'. */
errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields,
&insn_value, (bfd_vma) 0);
- cgen_put_insn_value (cd, where, CGEN_INSN_BITSIZE (insn),
- insn_value);
+ cgen_put_insn_value (cd, (unsigned char *) where,
+ CGEN_INSN_BITSIZE (insn), insn_value);
}
#else
/* ??? 0 is passed for `pc'. */
- errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields, where,
+ errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields,
+ (unsigned char *) where,
(bfd_vma) 0);
#endif
if (errmsg)
static int the_interrupt;
static char *
-whatreg (int *reg, char *src)
+whatreg (unsigned int *reg, char *src)
{
if (ISDIGIT (src[1]))
{
}
else
{
- int regn;
+ unsigned int regn;
end = parse_reg (src, &mode->mode, ®n);
if (end)
{
- int nw, nr;
+ int nw;
+ unsigned int nr;
src = end;
if (*src == '(')