| delorie.com/archives/browse.cgi | search |
| From: | eplmst AT lu DOT erisoft DOT se (Martin Stromberg) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Quest about inline asm... |
| Date: | 13 Dec 2002 08:20:24 GMT |
| Organization: | Ericsson Erisoft AB, Sweden |
| Lines: | 25 |
| Message-ID: | <atc588$m3m$3@antares.lu.erisoft.se> |
| References: | <uvhqfmcgbgs2f2 AT corp DOT supernews DOT com> |
| NNTP-Posting-Host: | lws256.lu.erisoft.se |
| X-Newsreader: | TIN [version 1.2 PL2] |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
lewi9908 (lewi9908 AT ghc DOT ctc DOT edu) wrote:
: int ResultsMod;
: ... //Set ResultsMod...
: //Old borland inline asm
: /*asm {
: push ResultsMod
: }*/
: //New GCC inline asm...
: __asm__("pushl %eax"
: : /*No output*/
: :"a"(ResultsMod)
: :"%eax");
: ...
: ... : Invalid 'asm' statement:
: ... : fixed or forbidden register 0 (ax) was spilled for class AREG.
I think you need to remove "%eax" from the clobber list.
Right,
MartinS
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |