home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / arch / 12380 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.3 KB

  1. Path: sparky!uunet!olivea!inews.Intel.COM!ilx018.intel.com!gss
  2. From: gss@ilx018.intel.com (Shavit Amir)
  3. Newsgroups: comp.arch
  4. Subject: Re: Machines with cond. assignment instruction?
  5. Message-ID: <1k0840INNjk0@ilx018.intel.com>
  6. Date: 25 Jan 93 08:24:32 GMT
  7. References: <1993Jan21.163607.31684@watson.ibm.com>
  8. Organization: Intel Israel (74) Ltd.
  9. Lines: 27
  10. NNTP-Posting-Host: ilx061.intel.com
  11. X-Newsreader: TIN [version 1.1 PL8]
  12.  
  13. Pradeep Dubey (pradeep@watson.ibm.com) wrote:
  14. : Hello Everyone,
  15. : Are there announced machines (specially micros) with
  16. : some conditional assignment instruction.  I mean
  17. : instruction such as the following:
  18.  
  19. : MovCond R1, R2, R3 /* if (c1) R1 <- R2 else R1 <- R3 */
  20.  
  21. : where, c1 refers to some result of some previous compare.
  22.  
  23. : Any pointers to such machines or any quantitative evaluation
  24. : of usefulness of this instruction in the specific context
  25. : of some machine would be appreciated.
  26.  
  27. : Thanks,
  28. : Pradeep
  29.  
  30. The above instruction is a 4 operand instruction, as the condition code is
  31. another implicit source operand. The best way to perform a conditional move
  32. is to have compares set or clear all the bits in a register.
  33. Once that is done, conditional moves are simple.
  34.  
  35. AND R1, R2 -> R4    /* R1 containes the condition code */
  36. ANDNOT R1,R3 -> R4
  37.  
  38.  
  39. Gad
  40.