/* TI C6X assembler.
- Copyright 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2015 Free Software Foundation, Inc.
Contributed by Joseph Myers <joseph@codesourcery.com>
Bernd Schmidt <bernds@codesourcery.com>
}
p = frag_more (4);
+ memset (p, 0, 4);
fix_new_exp (frag_now, p - frag_now->fr_literal, 4,
&exp, 0, BFD_RELOC_C6000_EHTYPE);
go through the error checking in tic6x_fix_new_exp. */
void
-tic6x_cons_fix_new (fragS *frag, int where, int size, expressionS *exp)
+tic6x_cons_fix_new (fragS *frag, int where, int size, expressionS *exp,
+ bfd_reloc_code_real_type r_type)
{
- bfd_reloc_code_real_type r_type;
-
switch (size)
{
case 1:
case BFD_RELOC_C6000_PCR_H16:
case BFD_RELOC_C6000_PCR_L16:
return 0;
-
+
default:
return 1;
}
if (value < -0x80 || value > 0xff)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("value too large for 1-byte field"));
- md_number_to_chars (buf, value, 1);
+ *buf = value;
}
break;
static const int
-tic6x_unwind_frame_regs[TIC6X_NUM_UNWIND_REGS] =
+tic6x_unwind_frame_regs[TIC6X_NUM_UNWIND_REGS] =
/* A15 B15 B14 B13 B12 B11 B10 B3 A14 A13 A12 A11 A10. */
{ 15, 31, 30, 29, 28, 27, 26, 19, 14, 13, 12, 11, 10 };
/* Register save offsets for __c6xabi_push_rts. */
static const int
-tic6x_pop_rts_offset_little[TIC6X_NUM_UNWIND_REGS] =
+tic6x_pop_rts_offset_little[TIC6X_NUM_UNWIND_REGS] =
/* A15 B15 B14 B13 B12 B11 B10 B3 A14 A13 A12 A11 A10. */
{ -1, 1, 0, -3, -4, -7, -8,-11, -2, -5, -6, -9,-10};
static const int
-tic6x_pop_rts_offset_big[TIC6X_NUM_UNWIND_REGS] =
+tic6x_pop_rts_offset_big[TIC6X_NUM_UNWIND_REGS] =
/* A15 B15 B14 B13 B12 B11 B10 B3 A14 A13 A12 A11 A10. */
{ -2, 1, 0, -4, -3, -8, -7,-12, -1, -6, -5,-10, -9};
record_alignment (now_seg, 2);
ptr = frag_more (8);
+ memset (ptr, 0, 8);
where = frag_now_fix () - 8;
/* Self relative offset of the function start. */
continue;
unwind->saved_reg_count++;
- /* Encoding uses 4 bits per word, so size of unwinding opcode data
+ /* Encoding uses 4 bits per word, so size of unwinding opcode data
limits the save area size. The exact cap will be figured out
later due to overflow, the 0x800 here is just a quick sanity
check to weed out obviously excessive offsets. */