diff options
author | Jim Wilson <wilson@tuliptree.org> | 2005-04-02 00:43:48 +0000 |
---|---|---|
committer | Jim Wilson <wilson@tuliptree.org> | 2005-04-02 00:43:48 +0000 |
commit | f6fe78d68c664e09c0d43de2fd17a6f49eee93f9 (patch) | |
tree | d928ad6ef37d72aafdc691daaf05d846dfa49275 /gas | |
parent | 1fb1ca27820f5247042cb786acd8f0a7a8455cc6 (diff) | |
download | gdb-f6fe78d68c664e09c0d43de2fd17a6f49eee93f9.zip gdb-f6fe78d68c664e09c0d43de2fd17a6f49eee93f9.tar.gz gdb-f6fe78d68c664e09c0d43de2fd17a6f49eee93f9.tar.bz2 |
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.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-ia64.c | 30 |
2 files changed, 29 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 2e3cd7d..00c3552 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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 diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index d96d6f6..f458550 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 (".<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; |