public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* open ia64 issues
@ 2005-02-14 12:42 Jan Beulich
  2005-02-15 14:30 ` James E Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2005-02-14 12:42 UTC (permalink / raw)
  To: wilson; +Cc: binutils

Jim,

assuming the remaining pending patches get either accepted or rejected
for an understandable (to me) reason, and beyond the .xdata issue
mentioned in an earlier mail today and the pc-relative one talked about
before (for which I'm in the process of creating a fix), I currently see
two open issues, addressing of which however seems to be more intrusive
so I'd like to check whether there are objections to fix these prior to
starting to work on them:

(1) While the just approved and commited 'pound' patch makes the
situation with handling # suffixes better, things are still fairly
broken. According to the specification, # is an operator, not part of
the symbol name. This means ias (a) doesn't accept two of them in a row
(and I believe this is the correct behavior), (b) there is a strict
separation that it may (must) appear in symbols used as operands (of
opcodes or directives), but not in labels. The latter also implies that
you cannot use un-suffixed reserved symbols in directives (i.e. .global
@pause ought to be invalid).
Fixing this requires that no directive ever tries to parse an operand
which may/must be a symbol by using get_symbol_end; instead, this must
always be parsed as an expression (to allow the tc-ia64 routines to
filter out reserved symbols and deal with the # suffix). Consequently, a
lot of common code will need to be changed.

(2) In order to allow the creation of instruction-like macros (i.e. to
account for the lack of quite a number of pseudo ops in the Intel
language spec, but also to hide things like replacing zxt4 with the more
efficient addp4) it would be necessary to weaken the rejection of
'orphan' qualifying predicates: Currently, as soon as the next input
line is seen, any unused qp gets a diagnostic (and gets cleared out).
Obviously, if you place a (qp) in front of a macro invocation, it thus
won't apply to the instruction(s) resulting from the macro expansion.
The change I have in mind is to make the diagnostic/clearing dependent
upon macro nesting depth; of course, if a macro expansion itself uses
any (qp), then the macro invocation cannot be predicated (this should be
simple to catch).

Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: open ia64 issues
@ 2005-02-15 16:06 Jan Beulich
  2005-02-17  5:03 ` James E Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2005-02-15 16:06 UTC (permalink / raw)
  To: wilson; +Cc: binutils

>There has been a bit of talk about making a branch for the binutils-2.16
>release.  If we know that we need an intrusive change, it should
>probably wait until after the branch is made.  That would give us
>roughly a year to work out problems before it appears in an official
>release.  It would also avoid unnecessary delays with the binutils-2.16
>release.  There might be an issue if HJ tries to create a release from a
>snapshot of mainline, but that would be HJ's problem.

OK, then I'll put this on my mid-term todo list. Once the branch is done (and I have time), I'll see how invasive the change would be.

>> opcodes or directives), but not in labels. The latter also implies that
>> you cannot use un-suffixed reserved symbols in directives (i.e. .global
>> @pause ought to be invalid).
>
>I don't see how this follows from what you said.  However, in the
>section on name spaces, it says that a symbol can not occur more than
>once in any name space, and in the section on symbols, it says things
>like @pause are reserved symbols.  That means that both .global @pause
>and .global @pause# should be invalid.

That's at least not the way ias seems to behave; I don't think separating register and symbol name spaces makes a lot of sense, and from ias behavior it doesn't seem like they do it.

>If we do have to change how directives work, then we could always add
>them to md_pseudo_table in tc-ia64.c to avoid changing common code. 
>This might create long term maintenance problems though, as then
>tc-ia64.c would have to change every time the list of supported
>directives changed, which would be a hassle.  Not clear if this is a
>better solution.

I was specifically intending to avoid this, for exactly these foreseeable maintenance problems.

>It isn't clear why we can't just change ia64_canonicalize_symbol_name to
>reject reserved symbol names.  That seems like a simpler solution, and
>no less efficient.  Hmm, the new @mutex, @clear, and @imply reserved
>names probably need to be put into the pseudo_func array to make this
>work.  The rest of the @ reserved words should already be in there.

It could reject reserved symbols, but as I said above that's not how ias appears to behave; instead the # operator seems to be taken as an escape from the reserved set of symbols (not from the register name space, since otherwise you had no way to refer to registers defined through .rotX and colliding with predefined register names; see the pound testcase, which works fine with ias).
However, the current way ia64_canonicalize_symbol_name gets used is improper for another reason, which I tried to point to before., but perhaps wasn't clear enough: This gets called (a) perhaps multiple times on a symbol and (b) regardless of whether the symbol appeared as an operand or a label.

>The asm language manual does allow newline white space in between a qp
>and an instruction mnemonic, so this is something we should accept.

Right. But it doesn't know about macros, so the effect of a (qp) followed by a macro invocation can't be defined there. We need to try to make the most sense of it. What I'd like to see is that the (qp) applies to all instructions generated by the macro (provided the expansion contains nothing disallowing the (continued) use of a (qp), like as you point out a label, tag, or stop, and of course no other (qp); I'm not sure whether directives should generally be excluded here, I would think only those that can alter the current location should be * exclusion of conditionals would be especially bad).

Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-02-17  0:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-14 12:42 open ia64 issues Jan Beulich
2005-02-15 14:30 ` James E Wilson
2005-02-15 14:35   ` H. J. Lu
2005-02-15 16:06 Jan Beulich
2005-02-17  5:03 ` James E Wilson

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).