public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Stan Cox <scox@redhat.com>
To: cgen@sources.redhat.com
Subject: x86-like target
Date: Mon, 25 Oct 2004 15:58:00 -0000	[thread overview]
Message-ID: <y0xis8yvlix.fsf@scox.laptop> (raw)


What is the best way to handle an x86 like target wrt endianness?  By
x86 like I mean: 
1. instructions are variable length "big endian" bytestreams
2. immediate and address fields within instructions are little endian
3. the processor is little endian

Defining as:
  (default-insn-bitsize 32)
  (base-insn-bitsize 32)
  (default-insn-word-bitsize 32)
  derived/anyof operands
  big endian bfd
  pass CGEN_ENDIAN_BIG to m16c_cgen_cpu_open  
assembles instructions correctly except immediates and displacements
are, of course, big endian.  Changing:
  little endian bfd
  pass CGEN_ENDIAN_BIG to m16c_cgen_cpu_open  
  set BFD_ENDIAN_BIG in disassemble.c
assembles instructions correctly except immediates and displacements
are still not correct and relocations cannot be handled by
the generic relocation handler since instruction bytes are now fetched
in little endian order. 

What is the best way to support this so that immediates from cgen,
addresses from gas, and addresses and relocations from ld are all handled
correctly? 


             reply	other threads:[~2004-10-25 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-25 15:58 Stan Cox [this message]
2004-10-25 16:02 ` Frank Ch. Eigler

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=y0xis8yvlix.fsf@scox.laptop \
    --to=scox@redhat.com \
    --cc=cgen@sources.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).