home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / arch / 12391 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.1 KB  |  32 lines

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