mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-13 11:20:55 +08:00
* config/tc-tic4x.c (tic4x_do_align): Remove ATTRIBUTE_UNUSED on
params. Properly generate NOP pattern. Comment reason for subseg_text_p failure.
This commit is contained in:
gas
@ -1,3 +1,9 @@
|
|||||||
|
2012-02-27 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* config/tc-tic4x.c (tic4x_do_align): Remove ATTRIBUTE_UNUSED on
|
||||||
|
params. Properly generate NOP pattern. Comment reason for
|
||||||
|
subseg_text_p failure.
|
||||||
|
|
||||||
2012-02-27 Alan Modra <amodra@gmail.com>
|
2012-02-27 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* config/tc-h8300.c (constant_fits_width_p): Trim constant to 32 bits
|
* config/tc-h8300.c (constant_fits_width_p): Trim constant to 32 bits
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* tc-tic4x.c -- Assemble for the Texas Instruments TMS320C[34]x.
|
/* tc-tic4x.c -- Assemble for the Texas Instruments TMS320C[34]x.
|
||||||
Copyright (C) 1997,1998, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010
|
Copyright (C) 1997,1998, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
Free Software Foundation. Inc.
|
2012 Free Software Foundation. Inc.
|
||||||
|
|
||||||
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
|
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
|
||||||
|
|
||||||
@ -2955,13 +2955,11 @@ md_pcrel_from (fixS *fixP)
|
|||||||
/* Fill the alignment area with NOP's on .text, unless fill-data
|
/* Fill the alignment area with NOP's on .text, unless fill-data
|
||||||
was specified. */
|
was specified. */
|
||||||
int
|
int
|
||||||
tic4x_do_align (int alignment ATTRIBUTE_UNUSED,
|
tic4x_do_align (int alignment,
|
||||||
const char *fill ATTRIBUTE_UNUSED,
|
const char *fill,
|
||||||
int len ATTRIBUTE_UNUSED,
|
int len,
|
||||||
int max ATTRIBUTE_UNUSED)
|
int max)
|
||||||
{
|
{
|
||||||
unsigned long nop = TIC_NOP_OPCODE;
|
|
||||||
|
|
||||||
/* Because we are talking lwords, not bytes, adjust alignment to do words */
|
/* Because we are talking lwords, not bytes, adjust alignment to do words */
|
||||||
alignment += 2;
|
alignment += 2;
|
||||||
|
|
||||||
@ -2969,11 +2967,17 @@ tic4x_do_align (int alignment ATTRIBUTE_UNUSED,
|
|||||||
{
|
{
|
||||||
if (fill == NULL)
|
if (fill == NULL)
|
||||||
{
|
{
|
||||||
/*if (subseg_text_p (now_seg))*/ /* FIXME: doesn't work for .text for some reason */
|
/* FIXME: subseg_text_p tests SEC_CODE which isn't in allowed
|
||||||
frag_align_pattern( alignment, (const char *)&nop, sizeof(nop), max);
|
section flags. See bfd/coff-tic4x.c target vecs. */
|
||||||
return 1;
|
if (1 || subseg_text_p (now_seg))
|
||||||
/*else
|
{
|
||||||
frag_align (alignment, 0, max);*/
|
char nop[4];
|
||||||
|
|
||||||
|
md_number_to_chars (nop, TIC_NOP_OPCODE, 4);
|
||||||
|
frag_align_pattern (alignment, nop, sizeof (nop), max);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
frag_align (alignment, 0, max);
|
||||||
}
|
}
|
||||||
else if (len <= 1)
|
else if (len <= 1)
|
||||||
frag_align (alignment, *fill, max);
|
frag_align (alignment, *fill, max);
|
||||||
|
Reference in New Issue
Block a user