public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: James E Wilson <wilson@specifixinc.com>
To: "H. J. Lu" <hjl@lucon.org>
Cc: binutils@sources.redhat.com
Subject: Re: PATCH: Disable hint in B unit for Montecito
Date: Thu, 17 Feb 2005 03:37:00 -0000	[thread overview]
Message-ID: <1108597856.27293.70.camel@aretha.corp.specifixinc.com> (raw)
In-Reply-To: <20050216170229.GA16645@lucon.org>

On Wed, 2005-02-16 at 09:02, H. J. Lu wrote:
> +	  else if (strcmp (idesc->name, "hint") == 0)
> +	    {
> +	      if (required_unit == IA64_UNIT_B
> +		  && md.hint_b != hint_b_ok)
> +		insn_unit = IA64_UNIT_I;
> +	      else
> +		insn_unit = required_unit;
> +	    }

It isn't OK to change units like this.  This will lead to assembler
errors when explicit mode is used.  This example for instance
        .explicit
{       .bbb
        hint @pause
        hint @pause
        hint @pause
}
gives me
aretha$ ./as-new tmp.s
tmp.s: Assembler messages:
tmp.s:3: Error: `hint.i' does not fit into BBB template
which may be confusing to the end user.

Perhaps you were confused by the code for the mov case?  The unit change
there is to handle the case where we have { .mfi ld, mov }
where there is an implicit nop.f, and hence the mov really was meant to
be a .i instruction not a .f instruction.  If the bundle had 3 explicit
instructions in this case, then we would get an error, as we could not
match the user supplied template.  It is not OK to change the template
to MII or MMI to make this work.  We do not change templates behind the
user's back (except when adding a stop bit, which doesn't really change
the template).

Since b is always at the end of a template, or followed by another b,
there are no unit changes we can make here.  The only thing we can do is
emit a warning/error, same as in md_assemble, and then emit the hint.b
instruction that the user asked for.

I don't know if this effects the linux kernel compilation.  If it does,
then we might need to make this a warning instead of an error by
default.

+These options control what assembler will do when the @samp{hint.b}
+instruction is used. @code{-mhint.b=ok} will make assembler to accept
+@samp{hint.b}.  @code{-mhint.b=warning} will make assembler to issue
+a warning when @samp{hint.b} is used.  @code{-mhint.b=error} will make
+assembler to treat @samp{hint.b} as an error, which is the default.

I'd suggest:

These options control what the assembler will do when the @samp{hint.b}
instruction is used.  @code{-mhint.b=ok} will make the assembler accept
@samp{hint.b}.  @code{-mint.b=warning} will make the assembler issue a
warning when @samp{hint.b} is used.  @code{-mhint.b=error} will make the
assembler treat @samp{hint.b} as an error, which is the default.

The rest of the patch looks OK.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


  reply	other threads:[~2005-02-16 23:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-17  0:10 H. J. Lu
2005-02-17  3:37 ` James E Wilson [this message]
2005-02-17 12:37   ` H. J. Lu
2005-02-17 13:05     ` H. J. Lu
2005-02-17 21:42       ` H. J. Lu
2005-02-17 21:47         ` H. J. Lu
2005-02-18  0:13         ` James E Wilson
2005-02-18  2:05           ` H. J. Lu
2005-02-18  4:43             ` James E Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1108597856.27293.70.camel@aretha.corp.specifixinc.com \
    --to=wilson@specifixinc.com \
    --cc=binutils@sources.redhat.com \
    --cc=hjl@lucon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).