🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #493

Re: Problem compiling inline assembler

#493
From: John_D._Sybalsky.MV
Date: Thu, 15 Oct 1992 06:24
10 lines
829 bytes
You'll need to change the format of the inline assembler code.  The gcc manual
is fairly good on this; roughly, you'll want something like:

extern inline ushort ntohs(register ushort val)
 {
    asm("rolw $8,%0" : (val) "=r" : (val) "0");
    return val;
  }

I'm sure I spazzed the format of the asm statement, but you get the idea....
Technical Details
Message-ID: <92Oct14.233649pdt.13023@alpha.xerox.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!envos.xerox.COM!John_D._Sybalsky.MV
References: John_D._Sybalsky.MV@envos.xerox.COM

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!envos.xerox.COM!John_D._Sybalsky.MV
From: John_D._Sybalsky.MV@envos.xerox.COM
Subject: Re: Problem compiling inline assembler
Message-ID: <92Oct14.233649pdt.13023@alpha.xerox.com>
Sender: daemon@cis.ohio-state.edu
Organization: GNUs Not Usenet
References: John_D._Sybalsky.MV@envos.xerox.COM
Distribution: gnu
Date: Thu, 15 Oct 1992 06:24:00 GMT
Lines: 10