linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: "Stephane Marchesin" <marchesin@icps.u-strasbg.fr>
Cc: linuxppc-dev@ozlabs.org, henrik.sorensen@gmail.com,
	paulus@samba.org, David Woodhouse <dwmw2@infradead.org>
Subject: Re: V4L2: __ucmpdi2 undefined on ppc
Date: Sun, 2 Mar 2008 22:53:12 +0100	[thread overview]
Message-ID: <15d7ac5a7542b05fb9b9abb5d4c7a22d@kernel.crashing.org> (raw)
In-Reply-To: <6a89f9d50802060639j4b3a8b7u4e4e596b010ee353@mail.gmail.com>

>> +/*
>> + * __ucmpdi2: 64-bit comparison
>> + *
>> + * R3/R4 has 64 bit value A
>> + * R5/R6 has 64 bit value B
>> + * result in R3: 0 for A < B
>> + *              1 for A == B
>> + *              2 for A > B
>> + */
>> +_GLOBAL(__ucmpdi2)
>> +       cmplw   r7,r3,r5        # compare high words
>> +       li      r3,0
>> +       blt     r7,2f           # a < b ... return 0
>> +       bgt     r7,1f           # a > b ... return 2
>> +       cmplw   r6,r4,r6        # compare low words
>> +       blt     r6,2f           # a < b ... return 0
>> +       li      r3,1
>> +       ble     r6,2f           # a = b ... return 1
>> +1:     li      r3,2
>> +2:     blr

Every occurrence of r7 here is wrong (and some of the r6).  Is there
any reason to do this in assembler code at all?


Segher

  parent reply	other threads:[~2008-03-02 21:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.SOC.4.61.0612131359430.10721@math.ut.ee>
     [not found] ` <1166053317.909.19.camel@praia>
     [not found]   ` <20061214195842.GA14041@athena.road.mcmartin.ca>
2006-12-17 13:29     ` V4L2: __ucmpdi2 undefined on ppc David Woodhouse
2008-02-06 14:39       ` Stephane Marchesin
2008-03-02 18:48         ` Stephane Marchesin
2008-03-02 21:53         ` Segher Boessenkool [this message]
2008-03-04 16:37           ` David Woodhouse
2008-03-04 16:58             ` Scott Wood
2008-03-04 20:32             ` Segher Boessenkool
2008-03-04 21:44           ` Paul Mackerras
2008-03-04 21:47             ` Scott Wood
2008-03-04 22:43             ` Segher Boessenkool

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=15d7ac5a7542b05fb9b9abb5d4c7a22d@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dwmw2@infradead.org \
    --cc=henrik.sorensen@gmail.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=marchesin@icps.u-strasbg.fr \
    --cc=paulus@samba.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 NNTP newsgroup(s).