public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rohit Arul Raj <rohitarulraj@gmail.com>
To: gcc <gcc@gcc.gnu.org>
Subject: Re: clobber CC for arithmetic instructions
Date: Fri, 12 Aug 2011 09:48:00 -0000	[thread overview]
Message-ID: <CAPVMLfWg62FGcJisdeEi7GvbGMgq3SV7xVt0tYVJ2TspOBasVA@mail.gmail.com> (raw)
In-Reply-To: <CAPVMLfVMYJwwBzWtnWjoECfzp49t_EPSC_RvjradOTAyBOULAw@mail.gmail.com>

On Fri, Aug 12, 2011 at 12:17 PM, Rohit Arul Raj <rohitarulraj@gmail.com> wrote:
> Hello All,
>
> I am working on 32-bit target with gcc 4.6.0. I need some help on the following:
>
> For my target, If my CCR register is set, all the arithmetic
> instructions update the CC register else the don't update.
> Setting the CCR register is done by a built-in function.
>
> Can any one help how to proceed with this? or any other target where a
> similar case has been implemented?
>
> Thanks,
> Rohit
>

Adding more info:

Note: There is 2 cycle latency between compare and branch instructions.

A) Without CCR register being set.

     cmp insn
     branch insn

     Here i can insert any arithmetic instruction e.g. 'addsi'
in-between 'cmp' and 'branch' as the CC register doesn't get modified.

B) With CCR register being set.

     Here i cannot insert any arithmetic instruction e.g. 'addsi'
in-between 'cmp' and 'branch' as the CC register will get modified.

~Rohit

  reply	other threads:[~2011-08-12  9:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12  6:48 Rohit Arul Raj
2011-08-12  9:48 ` Rohit Arul Raj [this message]
2011-08-12 10:21   ` Richard Guenther
2011-08-12 23:51   ` Hans-Peter Nilsson
2011-08-13  0:18     ` Hans-Peter Nilsson
2011-08-17  5:59     ` Rohit Arul Raj
2011-08-17  6:57       ` Hans-Peter Nilsson

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=CAPVMLfWg62FGcJisdeEi7GvbGMgq3SV7xVt0tYVJ2TspOBasVA@mail.gmail.com \
    --to=rohitarulraj@gmail.com \
    --cc=gcc@gcc.gnu.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).