/* Build the unwind section name by appending the (possibly stripped)
text section NAME to the unwind PREFIX. The resulting string
pointer is assigned to RESULT. The string is allocated on the
- stack, so this must be a macro... */
+ stack, so this must be a macro... */
#define make_unw_section_name(special, text_name, result) \
{ \
const char *_prefix = special_section_name[special]; \
int
ia64_elf_section_type (str, len)
- const char *str;
- size_t len;
+ const char *str;
+ size_t len;
{
#define STREQ(s) ((len == sizeof (s) - 1) && (strncmp (str, s, sizeof (s) - 1) == 0))
-
+
if (STREQ (ELF_STRING_ia64_unwind_info))
return SHT_PROGBITS;
if (STREQ ("init_array"))
return SHT_INIT_ARRAY;
-
+
if (STREQ ("fini_array"))
return SHT_FINI_ARRAY;
-
+
return -1;
#undef STREQ
}
if (x != 0)
extra = md.pointer_size - x;
- /* Add 8 for the header + a pointer for the
+ /* Add 8 for the header + a pointer for the
personality offset. */
*mem = xmalloc (size + extra + 8 + md.pointer_size);
/* Clear the padding area and personality. */
- memset (*mem + 8 + size, 0 , extra + md.pointer_size);
+ memset (*mem + 8 + size, 0, extra + md.pointer_size);
/* Initialize the header area. */
if (unwind.personality_routine)
/* Add the personality address to the image. */
if (unwind.personality_routine != 0)
{
- exp.X_op = O_symbol;
+ exp.X_op = O_symbol;
exp.X_add_symbol = unwind.personality_routine;
exp.X_add_number = 0;
else
reloc = BFD_RELOC_IA64_LTOFF_FPTR32MSB;
}
- else
+ else
{
if (md.flags & EF_IA_64_ABI64)
reloc = BFD_RELOC_IA64_LTOFF_FPTR64LSB;
}
fix_new_exp (frag_now, frag_now_fix () - md.pointer_size,
- md.pointer_size, & exp, 0, reloc);
+ md.pointer_size, &exp, 0, reloc);
unwind.personality_routine = 0;
}
}
lpc->prologue_count = count;
else
{
- label_prologue_count * new_lpc = xmalloc (sizeof (* new_lpc));
+ label_prologue_count *new_lpc = xmalloc (sizeof (* new_lpc));
new_lpc->next = unwind.saved_prologue_counts;
new_lpc->label_number = lbl;
static void
free_saved_prologue_counts ()
{
- label_prologue_count * lpc = unwind.saved_prologue_counts;
- label_prologue_count * next;
+ label_prologue_count *lpc = unwind.saved_prologue_counts;
+ label_prologue_count *next;
while (lpc != NULL)
{
lets GNU ld support programs with multiple segments
containing unwind info (as might be the case for certain
embedded applications).
-
+
(c) An error is issued if there would be a name clash.
*/
text_name = segment_name (saved_seg);
where = frag_now_fix () - (3 * md.pointer_size);
bytes_per_address = bfd_arch_bits_per_address (stdoutput) / 8;
- /* Issue the values of a) Proc Begin, b) Proc End, c) Unwind Record. */
+ /* Issue the values of a) Proc Begin, b) Proc End, c) Unwind Record. */
e.X_op = O_pseudo_fixup;
e.X_op_symbol = pseudo_func[FUNC_SEG_RELATIVE].u.sym;
e.X_add_number = 0;
case IA64_OPND_R3_2:
if (e->X_op == O_register && e->X_add_number >= REG_GR)
- {
+ {
if (e->X_add_number < REG_GR + 4)
return OPERAND_MATCH;
else if (e->X_add_number < REG_GR + 128)
&& strncmp (idesc->name, "ptr", 3) != 0
&& strncmp (idesc->name, "ptc", 3) != 0
&& strncmp (idesc->name, "probe", 5) != 0)
- return 0;
+ return 0;
}
if (prev_group->g_reg_set_conditionally[regno])
return 1;
continue; /* try next slot */
}
- {
- bfd_vma addr;
+ {
+ bfd_vma addr;
- addr = frag_now->fr_address + frag_now_fix () - 16 + i;
- dwarf2_gen_line_info (addr, &md.slot[curr].debug_line);
- }
+ addr = frag_now->fr_address + frag_now_fix () - 16 + i;
+ dwarf2_gen_line_info (addr, &md.slot[curr].debug_line);
+ }
if (errata_nop_necessary_p (md.slot + curr, insn_unit))
as_warn (_("Additional NOP may be necessary to workaround Itanium processor A/B step errata"));
}
else
{
- for (i = idesc->num_outputs;i < NELEMS (idesc->operands); i++)
+ for (i = idesc->num_outputs; i < NELEMS (idesc->operands); i++)
if (idesc->operands[i] == IA64_OPND_B1
|| idesc->operands[i] == IA64_OPND_B2)
{
&& idesc->operands[0] == IA64_OPND_PR)
{
mask = CURR_SLOT.opnd[2].X_add_number;
- if (mask & ((valueT) 1<<16))
+ if (mask & ((valueT) 1 << 16))
for (i = 16; i < 63; i++)
{
specs[count] = tmpl;
specs[count++] = tmpl;
}
else if (note == 7)
- {
- valueT mask = 0;
- if (idesc->operands[2] == IA64_OPND_IMM17)
- mask = CURR_SLOT.opnd[2].X_add_number;
- if (mask & ((valueT) 1 << 63))
+ {
+ valueT mask = 0;
+ if (idesc->operands[2] == IA64_OPND_IMM17)
+ mask = CURR_SLOT.opnd[2].X_add_number;
+ if (mask & ((valueT) 1 << 63))
specs[count++] = tmpl;
- }
+ }
else if (note == 11)
{
if ((idesc->operands[0] == IA64_OPND_P1
{
if (rsrc_write)
{
- int p1 = CURR_SLOT.opnd[0].X_add_number - REG_P;
- int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P;
+ int p1 = CURR_SLOT.opnd[0].X_add_number - REG_P;
+ int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P;
int or_andcm = strstr (idesc->name, "or.andcm") != NULL;
int and_orcm = strstr (idesc->name, "and.orcm") != NULL;
&& (idesc->operands[0] == IA64_OPND_P1
|| idesc->operands[0] == IA64_OPND_P2))
{
- specs[count] = tmpl;
+ specs[count] = tmpl;
specs[count++].cmp_type =
(or_andcm ? CMP_OR : (and_orcm ? CMP_AND : CMP_NONE));
}
&& (idesc->operands[1] == IA64_OPND_P1
|| idesc->operands[1] == IA64_OPND_P2))
{
- specs[count] = tmpl;
+ specs[count] = tmpl;
specs[count++].cmp_type =
(or_andcm ? CMP_AND : (and_orcm ? CMP_OR : CMP_NONE));
}
static int
has_suffix_p (name, suffix)
- const char *name;
- const char *suffix;
+ const char *name;
+ const char *suffix;
{
size_t namelen = strlen (name);
size_t sufflen = strlen (suffix);
break;
case 8:
- /* In 32-bit mode, data8 could mean function descriptors too. */
+ /* In 32-bit mode, data8 could mean function descriptors too. */
if (exp->X_op == O_pseudo_fixup
- && exp->X_op_symbol
- && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC
- && !(md.flags & EF_IA_64_ABI64))
- {
- if (target_big_endian)
- code = BFD_RELOC_IA64_IPLTMSB;
- else
- code = BFD_RELOC_IA64_IPLTLSB;
- exp->X_op = O_symbol;
- break;
- }
- else {
- if (target_big_endian)
- code = BFD_RELOC_IA64_DIR64MSB;
- else
- code = BFD_RELOC_IA64_DIR64LSB;
- break;
- }
+ && exp->X_op_symbol
+ && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC
+ && !(md.flags & EF_IA_64_ABI64))
+ {
+ if (target_big_endian)
+ code = BFD_RELOC_IA64_IPLTMSB;
+ else
+ code = BFD_RELOC_IA64_IPLTLSB;
+ exp->X_op = O_symbol;
+ break;
+ }
+ else
+ {
+ if (target_big_endian)
+ code = BFD_RELOC_IA64_DIR64MSB;
+ else
+ code = BFD_RELOC_IA64_DIR64LSB;
+ break;
+ }
case 16:
if (exp->X_op == O_pseudo_fixup
}
break;
- case FUNC_IPLT_RELOC:
- break;
+ case FUNC_IPLT_RELOC:
+ break;
default:
abort ();
void
md_apply_fix3 (fix, valP, seg)
fixS *fix;
- valueT * valP;
+ valueT *valP;
segT seg ATTRIBUTE_UNUSED;
{
char *fixpos;
- valueT value = * valP;
+ valueT value = *valP;
int adjust = 0;
fixpos = fix->fx_frag->fr_literal + fix->fx_where;