/* tc-microblaze.c -- Assemble code for Xilinx MicroBlaze
- Copyright 2009, 2010 Free Software Foundation.
+ Copyright 2009, 2010, 2012 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
/* Find the op code end. */
for (op_start = op_end = str;
- * op_end && nlen < 20 && !is_end_of_line [(int)*op_end] && *op_end != ' ';
+ *op_end && !is_end_of_line[(unsigned char) *op_end] && *op_end != ' ';
op_end++)
{
name[nlen] = op_start[nlen];
nlen++;
+ if (nlen == sizeof (name) - 1)
+ break;
}
name [nlen] = 0;
else if (streq (fragP->fr_opcode, str_microblaze_ro_anchor))
{
/* It is accessed using the small data read only anchor. */
- if ((S_GET_SEGMENT (fragP->fr_symbol) == &bfd_com_section)
+ if ((S_GET_SEGMENT (fragP->fr_symbol) == bfd_com_section_ptr)
|| (S_GET_SEGMENT (fragP->fr_symbol) == sdata2_segment)
|| (S_GET_SEGMENT (fragP->fr_symbol) == sbss2_segment)
|| (! S_IS_DEFINED (fragP->fr_symbol)))
}
else if (streq (fragP->fr_opcode, str_microblaze_rw_anchor))
{
- if ((S_GET_SEGMENT (fragP->fr_symbol) == &bfd_com_section)
+ if ((S_GET_SEGMENT (fragP->fr_symbol) == bfd_com_section_ptr)
|| (S_GET_SEGMENT (fragP->fr_symbol) == sdata_segment)
|| (S_GET_SEGMENT (fragP->fr_symbol) == sbss_segment)
|| (!S_IS_DEFINED (fragP->fr_symbol)))