To Chris Giese (about old linux)
Posted: Tue Aug 26, 2003 11:00 pm
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
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