home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #23 / NN_1992_23.iso / spool / gnu / gcc / help / 2328 < prev    next >
Encoding:
Text File  |  1992-10-15  |  807 b   |  23 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!envos.xerox.COM!John_D._Sybalsky.MV
  3. From: John_D._Sybalsky.MV@envos.xerox.COM
  4. Subject: Re: Problem compiling inline assembler
  5. Message-ID: <92Oct14.233649pdt.13023@alpha.xerox.com>
  6. Sender: daemon@cis.ohio-state.edu
  7. Organization: GNUs Not Usenet
  8. References: John_D._Sybalsky.MV@envos.xerox.COM
  9. Distribution: gnu
  10. Date: Thu, 15 Oct 1992 06:24:00 GMT
  11. Lines: 10
  12.  
  13. You'll need to change the format of the inline assembler code.  The gcc manual
  14. is fairly good on this; roughly, you'll want something like:
  15.  
  16. extern inline ushort ntohs(register ushort val)
  17.  {
  18.     asm("rolw $8,%0" : (val) "=r" : (val) "0");
  19.     return val;
  20.   }
  21.  
  22. I'm sure I spazzed the format of the asm statement, but you get the idea....
  23.