delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/24/12:30:51

From: hyperman AT eduserv1 DOT rug DOT ac DOT be (Hans Yperman)
Newsgroups: comp.os.msdos.djgpp
Subject: inline trouble
Date: 24 Jan 2000 17:07:59 GMT
Organization: University of Ghent, Belgium
Lines: 22
Message-ID: <86i0tf$jnf$1@inf6serv.rug.ac.be>
NNTP-Posting-Host: eduserv1.rug.ac.be
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

I have trouble with inline asm in gcc. I try this:

typedef unsigned char byte;
void repstosd(byte *to,int len,int val){
    asm("rep; stosl"
        ::"a" (val),"D"(to),"c"(len)
        :"%edi","%ecx");
}

And the compiler answers with this:

inlines.c:5: Invalid `asm' statement:
inlines.c:5: fixed or forbidden register 2 (cx) was spilled for class
CREG.

Line 5 is the 'clobber list':"%edi","%ecx"); When i make it empty, 
the file compiles, but it does not work.
With Djgpp v2.01, this worked, but friday i downloaded the last
version (gcc --version = 2.952) from www.delorie.com, and this happened.
What went wrong? 

The previous version of djgpp is deleted, so i expect no trouble with versions

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019