Page 1 of 1

To Chris Giese (about old linux)

Posted: Tue Aug 26, 2003 11:00 pm
by Jarek Pelczar
Hi !

I know what you've been doing wrong
while fixing asm clobbers in linux 0.0.1.

For example:
__asm__(
    "cld;rep;movsl"
    ::"S"(src),"D"(dst),"c"(count)
    :"si","di","cx");

should be converted to

int d0,d1,d2;
__asm__ __volatile__(
    "cld;rep;movsl"
    :"=&c"(d0),"=&D"(d1),"=&S"(d2)
    :"0"(count),"1"(dst),"2"(src));

instead of simple removing clobbers,
because GCC simply thinks that these
registers are not touched and uses
them to optimize code by not loading
variables again.

Best regards
Jarek Pelczar

RE:To Chris Giese (about old linux)

Posted: Wed Aug 27, 2003 11:00 pm
by Chris Giese
>I know what you've been doing wrong while fixing asm clobbers in linux 0.0.1.

Over a year ago, I gave up trying to make it work. I made a small Minix partition on the hard drive of my old PC for it. It would boot, but I couldn't find a small, statically-linked shell for it to run.

If you do get it to work, I bet the people on the Linux kernel mailing list would be interested.