projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for .extInstruction pseudo-op.
[deliverable/binutils-gdb.git]
/
gas
/
config
/
tc-aarch64.c
diff --git
a/gas/config/tc-aarch64.c
b/gas/config/tc-aarch64.c
index b455dc8c80325802dc240e0704ca02771b7f950a..8fb93ee2b6234f5d0d2707728555c63ea23eab71 100644
(file)
--- a/
gas/config/tc-aarch64.c
+++ b/
gas/config/tc-aarch64.c
@@
-573,7
+573,7
@@
my_get_expression (expressionS * ep, char **str, int prefix_mode,
of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
-char *
+c
onst c
har *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
@@
-1241,7
+1241,7
@@
create_register_alias (char *newname, char *p)
nlen = strlen (newname);
#endif
nlen = strlen (newname);
#endif
- nbuf =
alloca
(nlen + 1);
+ nbuf =
xmalloc
(nlen + 1);
memcpy (nbuf, newname, nlen);
nbuf[nlen] = '\0';
memcpy (nbuf, newname, nlen);
nbuf[nlen] = '\0';
@@
-1265,7
+1265,10
@@
create_register_alias (char *newname, char *p)
the artificial FOO alias because it has already been created by the
first .req. */
if (insert_reg_alias (nbuf, old->number, old->type) == NULL)
the artificial FOO alias because it has already been created by the
first .req. */
if (insert_reg_alias (nbuf, old->number, old->type) == NULL)
- return TRUE;
+ {
+ free (nbuf);
+ return TRUE;
+ }
}
for (p = nbuf; *p; p++)
}
for (p = nbuf; *p; p++)
@@
-1275,6
+1278,7
@@
create_register_alias (char *newname, char *p)
insert_reg_alias (nbuf, old->number, old->type);
}
insert_reg_alias (nbuf, old->number, old->type);
}
+ free (nbuf);
return TRUE;
}
return TRUE;
}
@@
-4047,9
+4051,7
@@
add_operand_error_record (const operand_error_record* new_record)
/* Get one empty record. */
if (free_opnd_error_record_nodes == NULL)
{
/* Get one empty record. */
if (free_opnd_error_record_nodes == NULL)
{
- record = xmalloc (sizeof (operand_error_record));
- if (record == NULL)
- abort ();
+ record = XNEW (operand_error_record);
}
else
{
}
else
{
@@
-6098,8
+6100,7
@@
md_assemble (char *str)
store the instruction information for the future fix-up. */
struct aarch64_inst *copy;
gas_assert (inst.reloc.type != BFD_RELOC_UNUSED);
store the instruction information for the future fix-up. */
struct aarch64_inst *copy;
gas_assert (inst.reloc.type != BFD_RELOC_UNUSED);
- if ((copy = xmalloc (sizeof (struct aarch64_inst))) == NULL)
- abort ();
+ copy = XNEW (struct aarch64_inst);
memcpy (copy, &inst.base, sizeof (struct aarch64_inst));
output_inst (copy);
}
memcpy (copy, &inst.base, sizeof (struct aarch64_inst));
output_inst (copy);
}
@@
-6318,7
+6319,7
@@
aarch64_handle_align (fragS * fragP)
{
/* NOP = d503201f */
/* AArch64 instructions are always little-endian. */
{
/* NOP = d503201f */
/* AArch64 instructions are always little-endian. */
- static char const aarch64_noop[4] = { 0x1f, 0x20, 0x03, 0xd5 };
+ static
unsigned
char const aarch64_noop[4] = { 0x1f, 0x20, 0x03, 0xd5 };
int bytes, fix, noop_size;
char *p;
int bytes, fix, noop_size;
char *p;
@@
-7194,9
+7195,9
@@
tc_gen_reloc (asection * section, fixS * fixp)
arelent *reloc;
bfd_reloc_code_real_type code;
arelent *reloc;
bfd_reloc_code_real_type code;
- reloc =
xmalloc (sizeof (arelent)
);
+ reloc =
XNEW (arelent
);
- reloc->sym_ptr_ptr =
xmalloc (sizeof (asymbol *)
);
+ 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;
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
@@
-7537,8
+7538,7
@@
get_upper_str (const char *str)
{
char *ret;
size_t len = strlen (str);
{
char *ret;
size_t len = strlen (str);
- if ((ret = xmalloc (len + 1)) == NULL)
- abort ();
+ ret = XNEWVEC (char, len + 1);
convert_to_upper (ret, str, len);
return ret;
}
convert_to_upper (ret, str, len);
return ret;
}
@@
-7715,8
+7715,8
@@
size_t md_longopts_size = sizeof (md_longopts);
struct aarch64_option_table
{
struct aarch64_option_table
{
- c
har *option;
/* Option name to match. */
- c
har *help;
/* Help information. */
+ c
onst char *option;
/* Option name to match. */
+ c
onst char *help;
/* Help information. */
int *var; /* Variable to change. */
int value; /* What to change it to. */
char *deprecated; /* If non-null, print this message. */
int *var; /* Variable to change. */
int value; /* What to change it to. */
char *deprecated; /* If non-null, print this message. */
@@
-7738,7
+7738,7
@@
static struct aarch64_option_table aarch64_opts[] = {
struct aarch64_cpu_option_table
{
struct aarch64_cpu_option_table
{
- char *name;
+ c
onst c
har *name;
const aarch64_feature_set value;
/* The canonical name of the CPU, or NULL to use NAME converted to upper
case. */
const aarch64_feature_set value;
/* The canonical name of the CPU, or NULL to use NAME converted to upper
case. */
@@
-7780,7
+7780,7
@@
static const struct aarch64_cpu_option_table aarch64_cpus[] = {
struct aarch64_arch_option_table
{
struct aarch64_arch_option_table
{
- char *name;
+ c
onst c
har *name;
const aarch64_feature_set value;
};
const aarch64_feature_set value;
};
@@
-7797,7
+7797,7
@@
static const struct aarch64_arch_option_table aarch64_archs[] = {
/* ISA extensions. */
struct aarch64_option_cpu_value_table
{
/* ISA extensions. */
struct aarch64_option_cpu_value_table
{
- char *name;
+ c
onst c
har *name;
const aarch64_feature_set value;
};
const aarch64_feature_set value;
};
@@
-7819,14
+7819,14
@@
static const struct aarch64_option_cpu_value_table aarch64_features[] = {
struct aarch64_long_option_table
{
struct aarch64_long_option_table
{
- c
har *option;
/* Substring to match. */
- c
har *help;
/* Help information. */
- int (*func) (c
har *subopt);
/* Function to decode sub-option. */
+ c
onst char *option;
/* Substring to match. */
+ c
onst char *help;
/* Help information. */
+ int (*func) (c
onst char *subopt);
/* Function to decode sub-option. */
char *deprecated; /* If non-null, print this message. */
};
static int
char *deprecated; /* If non-null, print this message. */
};
static int
-aarch64_parse_features (char *str, const aarch64_feature_set **opt_p,
+aarch64_parse_features (c
onst c
har *str, const aarch64_feature_set **opt_p,
bfd_boolean ext_only)
{
/* We insist on extensions being added before being removed. We achieve
bfd_boolean ext_only)
{
/* We insist on extensions being added before being removed. We achieve
@@
-7834,7
+7834,7
@@
aarch64_parse_features (char *str, const aarch64_feature_set **opt_p,
adding an extension (1) or removing it (0) and only allowing it to
change in the order -1 -> 1 -> 0. */
int adding_value = -1;
adding an extension (1) or removing it (0) and only allowing it to
change in the order -1 -> 1 -> 0. */
int adding_value = -1;
- aarch64_feature_set *ext_set =
xmalloc (sizeof (aarch64_feature_set)
);
+ aarch64_feature_set *ext_set =
XNEW (aarch64_feature_set
);
/* Copy the feature set, so that we can modify it. */
*ext_set = **opt_p;
/* Copy the feature set, so that we can modify it. */
*ext_set = **opt_p;
@@
-7843,7
+7843,7
@@
aarch64_parse_features (char *str, const aarch64_feature_set **opt_p,
while (str != NULL && *str != 0)
{
const struct aarch64_option_cpu_value_table *opt;
while (str != NULL && *str != 0)
{
const struct aarch64_option_cpu_value_table *opt;
- char *ext = NULL;
+ c
onst c
har *ext = NULL;
int optlen;
if (!ext_only)
int optlen;
if (!ext_only)
@@
-7913,10
+7913,10
@@
aarch64_parse_features (char *str, const aarch64_feature_set **opt_p,
}
static int
}
static int
-aarch64_parse_cpu (char *str)
+aarch64_parse_cpu (c
onst c
har *str)
{
const struct aarch64_cpu_option_table *opt;
{
const struct aarch64_cpu_option_table *opt;
- char *ext = strchr (str, '+');
+ c
onst c
har *ext = strchr (str, '+');
size_t optlen;
if (ext != NULL)
size_t optlen;
if (ext != NULL)
@@
-7945,10
+7945,10
@@
aarch64_parse_cpu (char *str)
}
static int
}
static int
-aarch64_parse_arch (char *str)
+aarch64_parse_arch (c
onst c
har *str)
{
const struct aarch64_arch_option_table *opt;
{
const struct aarch64_arch_option_table *opt;
- char *ext = strchr (str, '+');
+ c
onst c
har *ext = strchr (str, '+');
size_t optlen;
if (ext != NULL)
size_t optlen;
if (ext != NULL)
@@
-7979,7
+7979,7
@@
aarch64_parse_arch (char *str)
/* ABIs. */
struct aarch64_option_abi_value_table
{
/* ABIs. */
struct aarch64_option_abi_value_table
{
- char *name;
+ c
onst c
har *name;
enum aarch64_abi_type value;
};
enum aarch64_abi_type value;
};
@@
-7990,7
+7990,7
@@
static const struct aarch64_option_abi_value_table aarch64_abis[] = {
};
static int
};
static int
-aarch64_parse_abi (char *str)
+aarch64_parse_abi (c
onst c
har *str)
{
const struct aarch64_option_abi_value_table *opt;
size_t optlen = strlen (str);
{
const struct aarch64_option_abi_value_table *opt;
size_t optlen = strlen (str);
@@
-8025,7
+8025,7
@@
static struct aarch64_long_option_table aarch64_long_opts[] = {
};
int
};
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, c
onst c
har *arg)
{
struct aarch64_option_table *opt;
struct aarch64_long_option_table *lopt;
{
struct aarch64_option_table *opt;
struct aarch64_long_option_table *lopt;
This page took
0.026289 seconds
and
4
git commands to generate.