public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rask Ingemann Lambertsen <rask@sygehus.dk>
To: "Wolfgang Mües" <wolfgang@iksw-muees.de>
Cc: gcc@gcc.gnu.org
Subject: Re: Modifying ARM code generator for elimination of 8bit writes - need help
Date: Sun, 04 Jun 2006 20:10:00 -0000	[thread overview]
Message-ID: <20060604201035.GA10795@sygehus.dk> (raw)
In-Reply-To: <200606041231.08506.wolfgang@iksw-muees.de>

On Sun, Jun 04, 2006 at 12:31:08PM +0200, Wolfgang Mües wrote:
> Hello Rask,
> 
> On Friday 02 June 2006 09:24, Rask Ingemann Lambertsen wrote:
> > There may be a faster way of seeing if the modification is going to
> > work for the DS at all. I noticed from the output template
> > "swp%?b\\t%1, %1, [%M0]" that "swp" takes three operands. I don't
> > know ARM assembler, but you may be able to choose to always clobber a
> > specific register. Make it a fixed register (see FIXED_REGISTERS),
> > refer to this register directly in the output template and don't add
> > a clobber to the movqi patterns. IMHO, that's an acceptable hack at
> > an experimental stage. If the resulting code runs correctly on the
> > DS, you can then undo the FIXED_REGISTERS change and add the clobber
> > statements.
> 
> I have tried this. No luck. Problem is the lack of addressing modes for 
> the swp instruction. Only a simple pointer in a register (no offset, no 
> auto-increment is allowed).

What about the "Q" constraint? From gcc/config/arm/constraints.md:
"In ARM state an address that is a single base register." Reload knows how
to fix up addresses in a number of cases that happen often, and I believe
this is one of them.

> Hmmm... wondering who all these xxx_operand functions are defined, and 
> where they are documented...

They are documented in section "Machine-Independent Predicates" of the
manual. I haven't checked where they are defined, but 

	grep -e '^.*_operand_p' -e '^.*_address_p' gcc/*.c

should tell you where. Note that strict_memory_address_p() is just a special
case of memory_address_p() which checks for specific hard registers as
base/index registers if the target has such requirements. This is used
starting with the reload pass.

> Is this the right way to go?

I'm pretty sure it is best to have one insn pattern with several
alternatives. Reload might change the instruction enough that it ends up
using a different alternative. For example, using a register alternative for
a constant operand because the constant isn't a valid immediate operand.

-- 
Rask Ingemann Lambertsen

  parent reply	other threads:[~2006-06-04 20:10 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-28 20:23 Wolfgang Mües
2006-05-30 20:04 ` Paul Brook
2006-05-30 21:47   ` Daniel Jacobowitz
2006-05-30 23:14     ` Paul Brook
2006-05-31 20:40     ` Wolfgang Mües
2006-05-31 20:49   ` Wolfgang Mües
2006-05-31 20:59     ` Paul Brook
2006-06-01 14:18     ` Rask Ingemann Lambertsen
2006-06-02  6:24       ` Wolfgang Mües
2006-06-02  7:24         ` Rask Ingemann Lambertsen
2006-06-04 10:31           ` Wolfgang Mües
2006-06-04 11:25             ` Paul Brook
2006-06-04 15:26               ` Wolfgang Mües
2006-06-04 15:57                 ` Paul Brook
2006-06-05 10:07                   ` Wolfgang Mües
2006-06-05 12:25                     ` Paul Brook
2006-06-04 21:22                 ` Rask Ingemann Lambertsen
2006-06-04 21:01               ` Rask Ingemann Lambertsen
2006-06-05  0:12                 ` Dave Murphy
2006-06-05 11:31                   ` Wolfgang Mües
2006-06-05 10:07                 ` Richard Earnshaw
2006-06-05 11:47                   ` Wolfgang Mües
2006-06-04 20:10             ` Rask Ingemann Lambertsen [this message]
2006-06-17  8:52           ` Rask Ingemann Lambertsen
2006-07-19  7:49             ` Wolfgang Mües
2006-07-19 12:09               ` Rask Ingemann Lambertsen
2006-07-19 13:12                 ` Rask Ingemann Lambertsen
2006-07-20 10:31                 ` Wolfgang Mües
2006-07-20 13:09                   ` Dave Korn
2006-07-20 13:28                     ` Richard Earnshaw
2006-07-20 15:58                     ` Ian Lance Taylor
2006-07-20 21:20                       ` Dave Korn
2006-07-20 14:38                   ` Rask Ingemann Lambertsen
2006-07-21 11:40                     ` Rask Ingemann Lambertsen
2006-06-04 21:36     ` Rask Ingemann Lambertsen
2006-06-05 12:20       ` Wolfgang Mües
2006-06-05 12:22         ` Richard Earnshaw
2006-06-05 15:10         ` Rask Ingemann Lambertsen
2006-06-06  6:11           ` Wolfgang Mües
2006-06-06 19:37             ` Rask Ingemann Lambertsen
2006-06-07  5:35               ` Wolfgang Mües
2006-06-07  9:38                 ` Richard Earnshaw
2006-07-20 15:14                 ` Rask Ingemann Lambertsen
2006-07-21 14:20                   ` Rask Ingemann Lambertsen
2006-08-05 19:03                     ` Wolfgang Mües
2006-08-06  0:05                       ` Rask Ingemann Lambertsen
2006-08-12 12:40                         ` Wolfgang Mües
2006-10-02 10:42                           ` Wolfgang Mües
2006-10-20 17:27                             ` Rask Ingemann Lambertsen
2006-06-06  9:45         ` Richard Sandiford
2006-06-06 18:49           ` Rask Ingemann Lambertsen
2006-06-08 18:22             ` Rask Ingemann Lambertsen
2006-06-08 21:11               ` Wolfgang Mües
2006-06-09 15:08                 ` Rask Ingemann Lambertsen

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=20060604201035.GA10795@sygehus.dk \
    --to=rask@sygehus.dk \
    --cc=gcc@gcc.gnu.org \
    --cc=wolfgang@iksw-muees.de \
    /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).