From: Jim Wilson Date: Sat, 2 Apr 2005 00:43:48 +0000 (+0000) Subject: Patch from David Mosberger, to avoid nop.f on Itanium2. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6fe78d68c664e09c0d43de2fd17a6f49eee93f9;p=binutils-gdb.git 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 2e3cd7d371d..00c35526d02 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2005-04-01 David Mosberger + + * 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 * config/tc-i386.c (output_imm): Also set sign flag for 64-bit push diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index d96d6f613e7..f458550e2dd 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -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 (".", 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;