public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@redhat.com>
To: Daniel Jacobowitz <dan@debian.org>
Cc: gcc@gcc.gnu.org, binutils@sources.redhat.com
Subject: Re: MIPS gas relaxation still doesn't work
Date: Tue, 15 Oct 2002 15:23:00 -0000	[thread overview]
Message-ID: <xwu1y6rxub5.fsf@tonopah.toronto.redhat.com> (raw)
In-Reply-To: <20021015200451.GA11252@nevyn.them.org>

>While I agree with you in theory, how would GCC handle user-written
>asm("") blocks without an assemble-time jump relaxation of some sort?

That is a problem I haven't considered in detail.

We don't have to worry about handling branches inside the extended asm.  Gcc
doesn't allow branching into or outof an extended asm.  So we only have to
worry about branches across the asm.

Gcc knows how many individual instructions are in an extended asm.  We count
the separators, which is usually a ';', though this is configurable.  Then we
multiply by the architecture defined default instruction size.  We can make
this an arbitrarily large value for extended asms if we want.  We could set
this to the size of the largest macro expansion, which would solve the general
case.  If we assume that asms are rare, then there should be very little
performance loss from this over general assumption.

It has always been the case that extended asms are a hook to gcc internals
which work only if you know how gcc internals work.  So we could perhaps try
to define away the problem by saying that extended asms that use macro
instructions are no longer supported.  Some people might not like that,
but if we explain that it is necessary to improve gcc performance then
perhaps they will understand.

Worst case, we change the extended asm syntax so that people can specify the
worst case size of them.  I'd rather not do that though.

Jim

  parent reply	other threads:[~2002-10-15 21:32 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20021012113423.A27894@lucon.org>
     [not found] ` <20021013145423.A10174@lucon.org>
2002-10-14  9:23   ` H. J. Lu
2002-10-14  9:35     ` Richard Sandiford
2002-10-14  9:37       ` H. J. Lu
2002-10-14 10:04         ` Richard Sandiford
2002-10-14 10:43           ` H. J. Lu
2002-10-14 10:50             ` David S. Miller
2002-10-14 10:53               ` H. J. Lu
2002-10-14 11:13             ` Alexandre Oliva
2002-10-14 11:21               ` H. J. Lu
2002-10-14 12:28                 ` Alexandre Oliva
2002-10-14 12:37                   ` H. J. Lu
2002-10-14 12:58                     ` Alexandre Oliva
2002-10-14 13:00                       ` H. J. Lu
2002-10-14 13:08                         ` David S. Miller
2002-10-14 13:23                           ` H. J. Lu
2002-10-14 14:04                             ` David S. Miller
2002-10-14 14:14                               ` H. J. Lu
2002-10-14 14:17                                 ` Alexandre Oliva
2002-10-14 14:18                                   ` H. J. Lu
2002-10-14 15:37                                     ` Alexandre Oliva
2002-10-14 15:40                                       ` H. J. Lu
2002-10-15  1:08                                         ` Alexandre Oliva
2002-10-15  2:53                                           ` Dominic Sweetman
2002-10-15  8:12                                             ` Alexandre Oliva
2002-10-15 14:18                                             ` Jim Wilson
2002-10-15 13:27                                           ` Maciej W. Rozycki
2002-10-15 16:37                                             ` Jim Wilson
2002-10-16  6:39                                               ` Maciej W. Rozycki
2002-10-16 10:38                                                 ` Jim Wilson
2002-10-15 18:40                                             ` Alexandre Oliva
2002-10-16  7:01                                               ` Maciej W. Rozycki
2002-10-16  7:47                                                 ` Alexandre Oliva
2002-10-16  8:06                                                   ` Maciej W. Rozycki
2002-10-14 17:02                                     ` Eric Christopher
2002-10-15  1:15                                       ` Alexandre Oliva
2002-10-14 14:44                                   ` Michael Matz
2002-10-15 13:28                         ` Jim Wilson
2002-10-15 13:45                           ` Paul Koning
2002-10-15 14:32                             ` Maciej W. Rozycki
2002-10-15 15:33                               ` Alexandre Oliva
2002-10-16  5:32                                 ` Maciej W. Rozycki
2002-10-15 14:00                           ` Daniel Jacobowitz
2002-10-15 14:56                             ` Eric Christopher
2002-10-15 15:05                               ` Daniel Jacobowitz
2002-10-16  7:53                                 ` Paul Koning
2002-10-16  8:11                                   ` Maciej W. Rozycki
2002-10-15 15:23                             ` Jim Wilson [this message]
2002-10-16  5:38                               ` Maciej W. Rozycki
2002-10-16 10:37                                 ` Jim Wilson
2002-10-16 11:04                                   ` Maciej W. Rozycki
2002-10-15 16:54                         ` Richard Henderson
2002-10-14  9:40     ` Alexandre Oliva
2002-10-14  9:44       ` H. J. Lu

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=xwu1y6rxub5.fsf@tonopah.toronto.redhat.com \
    --to=wilson@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=dan@debian.org \
    --cc=gcc@gcc.gnu.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).