Patch from David Mosberger, to avoid nop.f on Itanium2.

* config/tc-ia64.c (ia64_handle_align): Move le_nop and
le_nop_stop arrays and initializers to file scope.
(md_begin): When generating code for anything other than
Itanium 1, use MMI instead of MFI NOP bundles as a filler.
This commit is contained in:
Jim Wilson 2005-04-02 00:43:48 +00:00
parent 1fb1ca2782
commit f6fe78d68c
2 changed files with 29 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2005-04-01 David Mosberger <davidm@hpl.hp.com>
* config/tc-ia64.c (ia64_handle_align): Move le_nop and
le_nop_stop arrays and initializers to file scope.
(md_begin): When generating code for anything other than
Itanium 1, use MMI instead of MFI NOP bundles as a filler.
2005-04-01 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (output_imm): Also set sign flag for 64-bit push

View File

@ -328,6 +328,21 @@ static struct
}
md;
/* These are not const, because they are modified to MMI for non-itanium1
targets below. */
/* MFI bundle of nops. */
static unsigned char le_nop[16] =
{
0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00
};
/* MFI bundle of nops with stop-bit. */
static unsigned char le_nop_stop[16] =
{
0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00
};
/* application registers: */
#define AR_K0 0
@ -7259,6 +7274,13 @@ md_begin ()
symbol_new (".<iplt>", undefined_section, FUNC_IPLT_RELOC,
&zero_address_frag);
if (md.tune != itanium1)
{
/* Convert MFI NOPs bundles into MMI NOPs bundles. */
le_nop[0] = 0x8;
le_nop_stop[0] = 0x9;
}
/* Compute the table of best templates. We compute goodness as a
base 4 value, in which each match counts for 3. Match-failures
result in NOPs and we use extra_goodness() to pick the execution
@ -11516,14 +11538,6 @@ void
ia64_handle_align (fragp)
fragS *fragp;
{
/* Use mfi bundle of nops with no stop bits. */
static const unsigned char le_nop[]
= { 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00};
static const unsigned char le_nop_stop[]
= { 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00};
int bytes;
char *p;
const unsigned char *nop;