public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Alan Lehotsky <apl@alum.mit.edu>
To: cgen@sourceware.org
Cc: Alan Lehotsky <apl@alum.mit.edu>
Subject: selecting between two forms of an instruction
Date: Sat, 15 Nov 2008 14:56:00 -0000	[thread overview]
Message-ID: <92BED2AD-18E9-4F97-A6D6-D9D9A615563E@alum.mit.edu> (raw)

Working on a port for a machine with 16 bit and 32 bit fixed length  
instructions.  The machine is somewhat like an ARM/Thumb  
architecture, but
there is no mode switch.  You use the 16 bit instructions if you have  
short displacements or only need to access a subset of all the  
registers.

It occurs to me that I could ALWAYS generate 32 bit instructions in  
the assembler and let the linker relax 32 bitters to 16 bitters based on
the actual requirements of the program.

Is there any downside to this strategy?   I've done this in the past  
for branching instructions and (on the IP2K) the insertion and  
deletion of bank switching
instructions - but never so aggressively where nearly every  
instruction has a short form.

-- Al


                 reply	other threads:[~2008-11-15 14:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=92BED2AD-18E9-4F97-A6D6-D9D9A615563E@alum.mit.edu \
    --to=apl@alum.mit.edu \
    --cc=cgen@sourceware.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).