home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1349 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  41 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: chang.unx.sas.com!walker
  3. From: walker@chang.unx.sas.com (Doug Walker)
  4. Subject: Re: PPC compilers
  5. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  6. Message-ID: <DL8CHv.JCv@unx.sas.com>
  7. Date: Mon, 15 Jan 1996 16:01:07 GMT
  8. X-Nntp-Posting-Host: chang.unx.sas.com
  9. References: <john.hendrikx.40ka@grafix.xs4all.nl> <4cuhng$dmn@maureen.teleport.com> <jasonb.821247870@cs.uwa.edu.au> <4d359i$ii7$1@sydney.DIALix.oz.au>
  10. Organization: SAS Institute Inc.
  11.  
  12. In article <4d359i$ii7$1@sydney.DIALix.oz.au>,
  13. Troy Till <accolyte@sydney.DIALix.oz.au> wrote:
  14. >Bear with me here, 'cause I don't know the second thing about C..
  15. >
  16. >can you do something to the equivalent of:
  17. >
  18. >  addx.l d0,d1
  19. >  move.w d1,d2
  20. >
  21. >Which is treating d1 as a long word, then a word. How would you implement 
  22. >this in C?
  23.  
  24.     register long a;
  25.     register long b;
  26.     register short c;
  27.  
  28.     c = a + b;
  29.  
  30. The compiler realizes that the destination is a short, so it converts
  31. the long to short automatically.
  32.  
  33. -- 
  34.   *****                    / walker@unx.sas.com
  35.  *|_o_o|\\     Doug Walker<  BIX, Portal: djwalker
  36.  *|. o.| ||                \ AOL: weissblau
  37.   | o  |//     
  38.   ====== 
  39. Any opinions expressed are mine, not those of SAS Institute, Inc.
  40.  
  41.