public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@wasabisystems.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: Fri, 29 Oct 2004 13:59:00 -0000	[thread overview]
Message-ID: <m3pt31y69y.fsf@gossamer.airs.com> (raw)
In-Reply-To: <02e501c4bdb0$9f530b50$180f81a4@uk.w2k.superh.com>

Andrew STUBBS <andrew.stubbs@st.com> writes:

> Each and every instruction has to be introduced in one single architecture
> (albeit imaginary) and then be inherited by each and every one of its
> descendents. If this condition is not met then the algorithms in cpu-sh.c
> won't work and you find yourself forced to use the --isa option to sort out
> the mess.
> 
> With the |s in place as they are the assembler _may_ work ok, but when it
> comes to save the file it has to translate that into an elf flag. When there
> are actually two architectures chosen (using | in the opcode table) then it
> can only choose one and the other information is lost. Therefore, when the
> file is loaded, the linker will not believe that it can link it against half
> the architectures it actually could link against. This is why you are forced
> to tell it which half manually using the -isa option.

To make this work, it sounds like you will need to change the ELF
header flags, and thus will lose some degree of backward
compatibility.  If you have to do that anyhow, why not change the ELF
flags to more appropriately reflect the situation?  Instead of trying
to represent all information with a single processor field, partition
the instruction set into groups, and use bitfields to indicate which
groups are represented in the object file.  It would probably be
appropriate to continue to have a processor field, to capture certain
large groups in a single number.  Then add a bit for, e.g., FPU
instructions.

I don't know how the SH architecture has evolved.  Would this sort of
approach be possible?

Ian

  parent reply	other threads:[~2004-10-29 13:59 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 [this message]
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
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=m3pt31y69y.fsf@gossamer.airs.com \
    --to=ian@wasabisystems.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).