public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mohamed Shafi <shafitvm@gmail.com>
To: Richard Henderson <rth@redhat.com>
Cc: GCC <gcc@gcc.gnu.org>
Subject: Re: Supporting FP cmp lib routines
Date: Fri, 23 Oct 2009 14:32:00 -0000	[thread overview]
Message-ID: <ba0bd44d0910230704p6939b1d2t7b7cf29043b1d1b@mail.gmail.com> (raw)
In-Reply-To: <4AAE695A.1030405@redhat.com>

2009/9/14 Richard Henderson <rth@redhat.com>:
> Another thing to look at, since you have hand-written routines and may be
> able to specify that e.g. only a subset of the normal call clobbered
> registers are actually modified, is to leave the call as a "compare" insn.
>  Something like
>
> (define_insn "*cmpsf"
>  [(set (reg:CC status-reg)
>        (compare:CC
>          (match_operand:SF 0 "register_operand" "R0")
>          (match_operand:SF 1 "register_operand" "R1")))
>   (clobber (reg:SI r2))
>   (clobber (reg:SI r3))]
>  ""
>  "call __compareSF"
>  [(set_attr "type" "call")])
>
> Where the R0 and R1 constraints resolve to the input registers for the
> routine.  Depending on your ISA and ABI, you may not even need to split this
> pattern post-reload.
>

I have implemented the above solution and it works. I have to support
the same for DF also. But with DF i have a problem with the
constraints. My target generates code for both big and little endian.
The ABI specifies that when a 64bit value is passed as an argument
they are passed in R6 and R7, R6 containing the most significant  long
word and R7 containing the least significant long word, regardless of
the  endianess mode. How can i do this in the DF compare pattern?

Regards,
Shafi

  reply	other threads:[~2009-10-23 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14 13:59 Mohamed Shafi
2009-09-14 14:49 ` Richard Henderson
2009-09-14 16:03   ` Richard Henderson
2009-10-23 14:32     ` Mohamed Shafi [this message]
2009-10-23 14:40       ` Joern Rennecke

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=ba0bd44d0910230704p6939b1d2t7b7cf29043b1d1b@mail.gmail.com \
    --to=shafitvm@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=rth@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).