/* tc-epiphany.c -- Assembler for the Adapteva EPIPHANY
- Copyright (C) 2009-2020 Free Software Foundation, Inc.
+ Copyright (C) 2009-2021 Free Software Foundation, Inc.
Contributed by Embecosm on behalf of Adapteva, Inc.
This file is part of GAS, the GNU Assembler.
/* Flag to detect when switching to code section where insn alignment is
implied. */
-static bfd_boolean force_code_align = FALSE;
+static bool force_code_align = false;
static void
epiphany_elf_section_rtn (int i)
if (force_code_align)
{
do_align (1, NULL, 0, 0);
- force_code_align = FALSE;
+ force_code_align = false;
}
}
obj_elf_text (i);
do_align (1, NULL, 0, 0);
- force_code_align = FALSE;
+ force_code_align = false;
}
/* The target specific pseudo-ops which we support. */
/* Set the machine type. */
bfd_default_set_arch_mach (stdoutput, bfd_arch_epiphany, bfd_mach_epiphany32);
- literal_prefix_dollar_hex = TRUE;
+ literal_prefix_dollar_hex = true;
}
valueT
executable section specifier we set an internal flag to denote when
word alignment should be forced. */
if (flags & SEC_CODE)
- force_code_align = TRUE;
+ force_code_align = true;
return flags;
}
#define GOT_NAME "_GLOBAL_OFFSET_TABLE_"
static symbolS * GOT_symbol;
-static inline bfd_boolean
+static inline bool
epiphany_PIC_related_p (symbolS *sym)
{
expressionS *exp;
if (! sym)
- return FALSE;
+ return false;
if (sym == GOT_symbol)
- return TRUE;
+ return true;
exp = symbol_get_value_expression (sym);
int regmask=0, push=0, pop=0;
/* Special-case push/pop instruction macros. */
- if (0 == strncmp (str, "push {", 6))
+ if (startswith (str, "push {"))
{
char * s = str + 6;
push = 1;
pperr = parse_reglist (s, ®mask);
}
- else if (0 == strncmp (str, "pop {", 5))
+ else if (startswith (str, "pop {"))
{
char * s = str + 5;
pop = 1;
if (push && regmask)
{
- char buff[20];
+ char buff[32];
int i,p ATTRIBUTE_UNUSED;
epiphany_assemble ("mov r15,4");
}
else if (pop && regmask)
{
- char buff[20];
+ char buff[32];
int i,p;
epiphany_assemble ("mov r15,4");
const char *
md_atof (int type, char *litP, int *sizeP)
{
- return ieee_md_atof (type, litP, sizeP, FALSE);
+ return ieee_md_atof (type, litP, sizeP, false);
}
/* Return true if can adjust the reloc to be relative to its section
(such as .data) instead of relative to some symbol. */
-bfd_boolean
+bool
epiphany_fix_adjustable (fixS *fixP)
{
bfd_reloc_code_real_type reloc_type;
reloc_type = fixP->fx_r_type;
if (fixP->fx_addsy == NULL)
- return TRUE;
+ return true;
/* Prevent all adjustments to global symbols. */
if (S_IS_EXTERNAL (fixP->fx_addsy))
- return FALSE;
+ return false;
if (S_IS_WEAK (fixP->fx_addsy))
- return FALSE;
+ return false;
if (pic_code
&& (reloc_type == BFD_RELOC_EPIPHANY_SIMM24
|| reloc_type == BFD_RELOC_EPIPHANY_SIMM8
|| reloc_type == BFD_RELOC_EPIPHANY_HIGH
|| reloc_type == BFD_RELOC_EPIPHANY_LOW))
- return FALSE;
+ return false;
/* Since we don't use partial_inplace, we must not reduce symbols in
mergeable sections to their section symbol. */
if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0)
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
void