projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
m68hc11: make some vars type bfd_reloc_code_real_type
[deliverable/binutils-gdb.git]
/
gas
/
config
/
tc-m68hc11.c
diff --git
a/gas/config/tc-m68hc11.c
b/gas/config/tc-m68hc11.c
index 43cf6b692981a9c2d6b4f3b1b8bd4afe0c246b4d..2f80e0adb23f3a437d7c0bd3a2946e65612daeca 100644
(file)
--- a/
gas/config/tc-m68hc11.c
+++ b/
gas/config/tc-m68hc11.c
@@
-1,5
+1,5
@@
/* tc-m68hc11.c -- Assembler code for the Motorola 68HC11 & 68HC12.
/* tc-m68hc11.c -- Assembler code for the Motorola 68HC11 & 68HC12.
- Copyright (C) 1999-201
5
Free Software Foundation, Inc.
+ Copyright (C) 1999-201
6
Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@nerim.fr)
XGATE and S12X added by James Murray (jsm@jsm-net.demon.co.uk)
Written by Stephane Carrez (stcarrez@nerim.fr)
XGATE and S12X added by James Murray (jsm@jsm-net.demon.co.uk)
@@
-490,7
+490,7
@@
m68hc11_print_statistics (FILE *file)
}
int
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, c
onst c
har *arg)
{
get_default_target ();
switch (c)
{
get_default_target ();
switch (c)
@@
-574,7
+574,7
@@
md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
return 0;
}
return 0;
}
-char *
+c
onst c
har *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
@@
-584,7
+584,7
@@
valueT
md_section_align (asection *seg, valueT addr)
{
int align = bfd_get_section_alignment (stdoutput, seg);
md_section_align (asection *seg, valueT addr)
{
int align = bfd_get_section_alignment (stdoutput, seg);
- return ((addr + (1 << align) - 1) &
(-
1 << align));
+ return ((addr + (1 << align) - 1) &
-(
1 << align));
}
static int
}
static int
@@
-603,7
+603,7
@@
cmp_opcode (struct m68hc11_opcode *op1, struct m68hc11_opcode *op2)
void
md_begin (void)
{
void
md_begin (void)
{
- char *prev_name = "";
+ c
onst c
har *prev_name = "";
struct m68hc11_opcode *opcodes;
struct m68hc11_opcode_def *opc = 0;
int i, j;
struct m68hc11_opcode *opcodes;
struct m68hc11_opcode_def *opc = 0;
int i, j;
@@
-613,9
+613,7
@@
md_begin (void)
m68hc11_hash = hash_new ();
/* Get a writable copy of the opcode table and sort it on the names. */
m68hc11_hash = hash_new ();
/* Get a writable copy of the opcode table and sort it on the names. */
- opcodes = (struct m68hc11_opcode *) xmalloc (m68hc11_num_opcodes *
- sizeof (struct
- m68hc11_opcode));
+ opcodes = XNEWVEC (struct m68hc11_opcode, m68hc11_num_opcodes);
m68hc11_sorted_opcodes = opcodes;
num_opcodes = 0;
for (i = 0; i < m68hc11_num_opcodes; i++)
m68hc11_sorted_opcodes = opcodes;
num_opcodes = 0;
for (i = 0; i < m68hc11_num_opcodes; i++)
@@
-644,8
+642,7
@@
md_begin (void)
qsort (opcodes, num_opcodes, sizeof (struct m68hc11_opcode),
(int (*) (const void*, const void*)) cmp_opcode);
qsort (opcodes, num_opcodes, sizeof (struct m68hc11_opcode),
(int (*) (const void*, const void*)) cmp_opcode);
- opc = (struct m68hc11_opcode_def *)
- xmalloc (num_opcodes * sizeof (struct m68hc11_opcode_def));
+ opc = XNEWVEC (struct m68hc11_opcode_def, num_opcodes);
m68hc11_opcode_defs = opc--;
/* Insert unique names into hash table. The M6811 instruction set
m68hc11_opcode_defs = opc--;
/* Insert unique names into hash table. The M6811 instruction set
@@
-964,7
+961,7
@@
static void
print_opcode_list (void)
{
int i;
print_opcode_list (void)
{
int i;
- char *prev_name = "";
+ c
onst c
har *prev_name = "";
struct m68hc11_opcode *opcodes;
int example = flag_print_opcodes == 2;
struct m68hc11_opcode *opcodes;
int example = flag_print_opcodes == 2;
@@
-1607,7
+1604,7
@@
fixup8 (expressionS *oper, int mode, int opmode)
else
{
fixS *fixp;
else
{
fixS *fixp;
-
int
reloc;
+
bfd_reloc_code_real_type
reloc;
/* Now create an 8-bit fixup. If there was some %hi, %lo
or %page modifier, generate the reloc accordingly. */
/* Now create an 8-bit fixup. If there was some %hi, %lo
or %page modifier, generate the reloc accordingly. */
@@
-1654,7
+1651,7
@@
fixup16 (expressionS *oper, int mode, int opmode ATTRIBUTE_UNUSED)
else if (oper->X_op != O_register)
{
fixS *fixp;
else if (oper->X_op != O_register)
{
fixS *fixp;
-
int
reloc;
+
bfd_reloc_code_real_type
reloc;
if ((opmode & M6811_OP_CALL_ADDR) && (mode & M6811_OP_IMM16))
reloc = BFD_RELOC_M68HC11_LO16;
if ((opmode & M6811_OP_CALL_ADDR) && (mode & M6811_OP_IMM16))
reloc = BFD_RELOC_M68HC11_LO16;
@@
-1724,7
+1721,7
@@
fixup8_xg (expressionS *oper, int mode, int opmode)
if (oper->X_op == O_constant)
{
fixS *fixp;
if (oper->X_op == O_constant)
{
fixS *fixp;
-
int
reloc;
+
bfd_reloc_code_real_type
reloc;
if ((opmode & M6811_OP_HIGH_ADDR) || (opmode & M6811_OP_LOW_ADDR))
{
if ((opmode & M6811_OP_HIGH_ADDR) || (opmode & M6811_OP_LOW_ADDR))
{
@@
-1765,7
+1762,7
@@
fixup8_xg (expressionS *oper, int mode, int opmode)
else
{
fixS *fixp;
else
{
fixS *fixp;
-
int
reloc;
+
bfd_reloc_code_real_type
reloc;
/* Now create an 8-bit fixup. If there was some %hi, %lo
modifier, generate the reloc accordingly. */
/* Now create an 8-bit fixup. If there was some %hi, %lo
modifier, generate the reloc accordingly. */
@@
-3831,8
+3828,8
@@
tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
{
arelent *reloc;
{
arelent *reloc;
- reloc =
(arelent *) xmalloc (sizeof (arelent)
);
- reloc->sym_ptr_ptr =
(asymbol **) xmalloc (sizeof (asymbol *)
);
+ reloc =
XNEW (arelent
);
+ reloc->sym_ptr_ptr =
XNEW (asymbol *
);
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
if (fixp->fx_r_type == 0)
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
if (fixp->fx_r_type == 0)
This page took
0.027959 seconds
and
4
git commands to generate.