home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- Path: sparky!uunet!charon.amdahl.com!netcomsv!metaflow!rschnapp
- From: rschnapp@metaflow.com (Russ Schnapp)
- Subject: Re: Machines with cond. assignment instruction?
- Message-ID: <C1FK9u.I0J@metaflow.com>
- Sender: usenet@metaflow.com
- Nntp-Posting-Host: habu
- Organization: Metaflow Technologies Inc.
- References: <1993Jan21.163607.31684@watson.ibm.com> <1k0840INNjk0@ilx018.intel.com>
- Date: Mon, 25 Jan 1993 22:10:41 GMT
- Lines: 19
-
- In article <1k0840INNjk0@ilx018.intel.com>, gss@ilx018.intel.com (Shavit Amir) writes:
- |> The best way to perform a conditional move
- |> is to have compares set or clear all the bits in a register.
- |> Once that is done, conditional moves are simple.
- |>
- |> AND R1, R2 -> R4 /* R1 containes the condition code */
- |> ANDNOT R1,R3 -> R4
- |>
- |>
- |> Gad
-
- A conditional move is "if (cond) a = b;"
- while your solution is "if (cond) a = b else a = 0"
- --
-
- ...Russ Schnapp
- Email: netcom!metaflow!rschnapp or rschnapp@Metaflow.com or rschnapp@BIX.com
- Metaflow Technologies Voice: 619/452-6608x230; FAX: 619/452-0401
- La Jolla, California Unless otw specified, I`m speaking only for myself!
-