public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jamie Prescott <jpresss@yahoo.com>
To: Georg-Johann Lay <avr@gjlay.de>
Cc: Ian Lance Taylor <iant@google.com>, gcc@gcc.gnu.org
Subject: Re: Seeking suggestion
Date: Sun, 24 May 2009 02:18:00 -0000	[thread overview]
Message-ID: <920084.49073.qm@web111616.mail.gq1.yahoo.com> (raw)
In-Reply-To: <4A17A025.2050600@gjlay.de>


> From: Georg-Johann Lay <avr@gjlay.de>
> To: Jamie Prescott <jpresss@yahoo.com>
> Cc: Ian Lance Taylor <iant@google.com>; gcc@gcc.gnu.org
> Sent: Saturday, May 23, 2009 12:05:09 AM
> Subject: Re: Seeking suggestion
> 
> Jamie Prescott schrieb:
> 
> > Is the implementation I posted the only one, or there are shorter/better ones?
> 
> You could use insn attribute to express insns' effects on cc_status.
> Have a look at the avr backend.

AVR uses CC0, while I just switched to CCmode.
Is there a reason why something like this would not work?

(define_insn "addsi3_nc"
  [(set (match_operand:SI 0 "fullreg_operand" "=r")
        (plus:SI (match_operand:SI 1 "fullreg_operand" "r")
                 (match_operand:SI 2 "fullreg_or_imm_operand" "rn")))]
  ""
  "..."
)

(define_expand "addsi3"
  [(set (match_operand:SI 0 "fullreg_operand" "=r")
        (plus:SI (match_operand:SI 1 "fullreg_operand" "r")
                 (match_operand:SI 2 "fullreg_or_imm_operand" "rn")))]
  ""
  {
    if (!TARGET_XXX2)
      emit_clobber(gen_rtx_REG(CCmode, CC_REGNUM));
    emit_insn(gen_addsi3_nc(operands[0], operands[1], operands[2]));
    DONE;
  }
)

That would limit to two instructions per basic insns, instead of the current three.
Thanks,

- Jamie


      

  reply	other threads:[~2009-05-23 17:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-23  0:04 Jamie Prescott
2009-05-23 13:41 ` Jamie Prescott
2009-05-23 14:17   ` Ian Lance Taylor
2009-05-23 17:09     ` Jamie Prescott
2009-05-24  0:35       ` Georg-Johann Lay
2009-05-24  2:18         ` Jamie Prescott [this message]
2009-05-24 10:23           ` Georg-Johann Lay
2009-05-27 14:42           ` Jim Wilson
2009-05-27 18:56             ` Jamie Prescott
2009-05-27 19:11               ` Jamie Prescott
2009-05-27 19:28               ` Eric Botcazou
2009-05-28  4:56                 ` Jamie Prescott
2009-05-28  5:16                   ` Georg-Johann Lay
2009-05-28  5:33                     ` Jamie Prescott
2009-05-25  3:23   ` Michael Meissner
2009-05-25 22:52     ` Jamie Prescott

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=920084.49073.qm@web111616.mail.gq1.yahoo.com \
    --to=jpresss@yahoo.com \
    --cc=avr@gjlay.de \
    --cc=gcc@gcc.gnu.org \
    --cc=iant@google.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).