public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Joern RENNECKE <joern.rennecke@st.com>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: "'Nick Clifton'" <nickc@redhat.com>,
	"'Alexandre Oliva'" <aoliva@redhat.com>,
	binutils@sources.redhat.com
Subject: Re: Broken SH2a patches
Date: Mon, 10 Jan 2005 13:31:00 -0000	[thread overview]
Message-ID: <41E283BA.90300@st.com> (raw)
In-Reply-To: <01bb01c4f4b8$4de416d0$0d0f81a4@uk.w2k.superh.com>

Andrew STUBBS wrote:

>	 Ideally, if there was an extra section involved, we would also
>store information about the ABI used in the file, as mixing these is more
>serious than mixing architectures. 	
>
While mixing compatible architectures is fine, mixing processors from 
the sh2e branch
with ones from the sh-dsp branch of the family is an absoilute no-no.  
Unless someone
comes up with a mode-switched processor that can run both instruction 
sets ;-) .

On the other hand, mixing code with different ABIs in one executable can 
make perfect
sense, if you have some single-fp heavy code and some double-fp heavy 
code.  You
just to make sure that you use proper symbol wrapping for __fpscr_values 
and use
appropriate glue for calling between different ABIs.  In fact, we could 
make gcc do
the interlinking automatically with machine specific attributes, if that 
seems worthwhile.

   

> An alternative approach would be to list all the architectures it 
> cannot run

> on. This would have the effect that old programs would be concidered 
> to run
>
>on new architectures, even if they are unsuitable. Perhaps something more
>intellegent could be done if both sets were known.
>

Something that will allow a bit more upward compatibility is to list all 
architectures
the code can run on that are not a proper superset of any other listed one.
This would be equivalent in terms of described sets and future upward 
compatibility to
the current scheme (the fake nodes stand for intersections of 
instruction sets of
actual processors, just as the architecture lists do).

>We would also have to consider the -isa option. Currently it allows
>individual architectures, which need not change, but also a -up for each,
>which might no longer make sense. Also, the -isa option is significant
>because it allows the assembler to use architecture specific relaxation
>optimisations (which it could not do if it were not certain of the
>architcture).
>

More exactly, the assembler encodes this information in the object file 
so that the
linker can then do these relaxations.  The linker both needs to know 
about what
instructions are available - e.g. braf is only available from SH2 
upwards - as well
as about what relaxations make sense at all - e.g. the instruction 
reordering done
for SH2 memory access scheduling hurts SH4, and the algorith can also 
confuse
integer and floating point registers.
   

  reply	other threads:[~2005-01-10 13:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-13 17:00 Andrew STUBBS
2004-10-28 20:33 ` Alexandre Oliva
2004-10-29 10:39   ` Nick Clifton
2004-10-29 12:11     ` Andrew STUBBS
2004-10-29 12:28       ` [OT] " Dave Korn
2004-10-29 12:59         ` Andrew STUBBS
2004-10-29 13:03           ` Dave Korn
2004-10-29 13:21             ` Andrew STUBBS
2004-10-29 13:59       ` Ian Lance Taylor
2004-10-29 14:35         ` Andrew STUBBS
2004-10-29 14:58           ` Ian Lance Taylor
2004-10-29 15:44             ` Andrew STUBBS
2004-11-08  9:04       ` Nick Clifton
2004-11-08 15:12         ` Andrew STUBBS
2004-11-08 16:27           ` Joern RENNECKE
2004-11-08 16:36           ` Joern RENNECKE
2004-12-15 17:11           ` Nick Clifton
2004-12-16 13:24             ` Andrew STUBBS
2004-12-20 17:18               ` Nick Clifton
2005-01-05 13:27                 ` Andrew STUBBS
2005-01-06 11:28                 ` Andrew STUBBS
2005-01-12 16:23                   ` Nick Clifton
2005-01-07 12:55                 ` Andrew STUBBS
2005-01-10 13:31                   ` Joern RENNECKE [this message]
2005-01-11 18:01                 ` Andrew STUBBS
2004-12-02 12:19 Andrew STUBBS

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=41E283BA.90300@st.com \
    --to=joern.rennecke@st.com \
    --cc=andrew.stubbs@st.com \
    --cc=aoliva@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=nickc@redhat.com \
    /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).