To Chris Giese (about old linux)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Jarek Pelczar

To Chris Giese (about old linux)

Post 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
Chris Giese

RE:To Chris Giese (about old linux)

Post 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.
Post Reply