Mail Archives: djgpp/2000/01/24/14:12:26
Hans Yperman <hyperman AT eduserv1 DOT rug DOT ac DOT be> wrote:
> typedef unsigned char byte;
> void repstosd(byte *to,int len,int val){
> asm("rep; stosl"
> ::"a" (val),"D"(to),"c"(len)
> :"%edi","%ecx");
> }
> inlines.c:5: fixed or forbidden register 2 (cx) was spilled for class
> CREG.
> With Djgpp v2.01, this worked, but friday i downloaded the last
> version (gcc --version = 2.952) from www.delorie.com, and this happened.
It's not a question of DJGPP, but of gcc version. gcc-2.95.2 is
considerably less forgiving regarding not quite correct extended
inline assembly than old gcc-2.8.1 was. You're not allowed to mark the
same register both as 'input' and 'dirty', IIRC. The GCC home page has
more details on this.
On a side issue: why not just use plain old 'memset'? At the heart of
it, it already uses 'rep stosl', in DJGPP's libc, so there may no
really be a need to roll your own...
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -