gcc-2.95 asm bug

Alexander Sokolov robocop@amur.rosnet.ru
Fri Jun 25 18:24:00 GMT 1999


I have the problem compiling the following code with gcc-2.95 19990623

long rol(long data, long count)
{
        asm (
                "roll %%cl,%0"
                : "=r" (data)
                : "0" (data), "c" (count)
                : "ecx"
        );
        return data;
}

Compilation fails with the following error

rol.c: In function `rol':
rol.c:8: Invalid `asm' statement:
rol.c:8: fixed or forbidden register 2 (cx) was spilled for class CREG.

egcs-1.1.2 compiles it with no errors

--
Alexander Sokolov
System Administrator
ROSNET Komsomolsk-na-Amure
Tel./Fax: +7-095-737-6260



More information about the Gcc mailing list