public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Nick Clifton <nickc@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: RFA: Add support for Renesas RX architecture to GCC (take 3)
Date: Fri, 23 Oct 2009 16:27:00 -0000	[thread overview]
Message-ID: <4AE1D7E8.1080408@redhat.com> (raw)
In-Reply-To: <m3my3t6pek.fsf@redhat.com>

> (define_insn "revl"
>   [(set (match_operand:SI           0 "register_operand" "=r")
>         (bswap:SI (match_operand:SI 1 "register_operand"  "r")))]
>   ""
>   "revl\t%1, %0"
>   [(set_attr "length" "3")]

bswapsi2

As a follow-up, consider defining bswaphi2 with revw.

> ;; Note - the zero_extends are to distinguish this pattern from the
> ;; mulsidi3 pattern.  Immediate mode addressing is not supported
> ;; because gcc cannot handle the expression: (zero_extend (const_int)).
> (define_insn "umulsidi3"

FWIW, gcc isn't supposed to handle the express (sign_extend (const_int))
either.  I think the best way to handle this is to define two separate
patterns

   (set (match_operand:DI 0)
        (mult:DI (zero_extend:DI (match_operand:SI 1)
		(match_operand:DI 2 "const_int_with_range_constraint")))

and similar for mulsidi3.  You can leave this for a follow-on patch.

> (define_insn "addsf3"
>   [(set (match_operand:SF          0 "register_operand"  "=r,r,r")
>         (plus:SF (match_operand:SF 1 "register_operand"  "%0,0,0")
>                  (match_operand:SF 2 "rx_source_operand"  "r,F,Q")))]
>   "fast_math_flags_set_p ()"

All instances of fast_math_flags_set_p should be testing the single flag
flag_unsafe_math_optimizations.  I also highly recommend that you put
this in a macro in rx.h, because as I said before, the proper thing to
test would be a new flag_normal_math_only that specifies that subnormal
math is not needed.

> mieee
> Target Mask(64BIT_DOUBLES) MaskExists
> Conform to the IEEE754 standard for floating point arithmetic.

This can be removed.

>                   warning (0, "no fixed registers available "
> "for use by fast interrupt handler");

Indent the second line properly.

Ok with those changes.


r~

  reply	other threads:[~2009-10-23 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-15  9:06 Nick Clifton
2009-10-23 16:27 ` Richard Henderson [this message]
2009-10-23 18:13   ` Joseph S. Myers

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=4AE1D7E8.1080408@redhat.com \
    --to=rth@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).