/* tc-microblaze.c -- Assemble code for Xilinx MicroBlaze
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#define IMM_MAX 9
struct imm_type {
- char *isuffix; /* Suffix String */
+ const char *isuffix; /* Suffix String */
int itype; /* Suffix Type */
int otype; /* Offset Type */
};
as_fatal (_("operand must be a constant or a label"));
else if (e->X_op == O_constant)
{
- /* Special case: sign extend negative 32-bit values to 64-bits. */
+ /* Special case: sign extend negative 32-bit values to offsetT size. */
if ((e->X_add_number >> 31) == 1)
- e->X_add_number |= -(1 << 31);
+ e->X_add_number |= -((addressT) (1U << 31));
if (e->X_add_number < min || e->X_add_number > max)
{
machine dependent instruction. This function is supposed to emit
the frags/bytes it assembles to. */
-static char * str_microblaze_ro_anchor = "RO";
-static char * str_microblaze_rw_anchor = "RW";
+static const char * str_microblaze_ro_anchor = "RO";
+static const char * str_microblaze_rw_anchor = "RW";
static bfd_boolean
check_spl_reg (unsigned * reg)
if (exp.X_op != O_constant)
{
- char *opc;
+ const char *opc;
relax_substateT subtype;
if (streq (name, "lmi"))
subtype, /* PC-relative or not. */
exp.X_add_symbol,
exp.X_add_number,
- opc);
+ (char *) opc);
immed = 0;
}
else
segT segment)
{
char * buf = fixP->fx_where + fixP->fx_frag->fr_literal;
- char * file = fixP->fx_file ? fixP->fx_file : _("unknown");
+ const char * file = fixP->fx_file ? fixP->fx_file : _("unknown");
const char * symname;
/* Note: use offsetT because it is signed, valueT is unsigned. */
offsetT val = (offsetT) * valp;
{
/* Variable not in small data read only segment accessed
using small data read only anchor. */
- char *file = fragP->fr_file ? fragP->fr_file : _("unknown");
+ const char *file = fragP->fr_file ? fragP->fr_file : _("unknown");
as_bad_where (file, fragP->fr_line,
_("Variable is accessed using small data read "
}
else
{
- char *file = fragP->fr_file ? fragP->fr_file : _("unknown");
+ const char *file = fragP->fr_file ? fragP->fr_file : _("unknown");
as_bad_where (file, fragP->fr_line,
_("Variable is accessed using small data read "
}
int
-md_parse_option (int c, char * arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED)
{
switch (c)
{