------- Comment #2 from ebotcazou at libertysurf dot fr 2007-09-22 10:22 ------- Subject: Re: GCC doesn't protect %edi when using inline assembly
> I've tried 'volatile', but it doesn't work. #include <stdio.h> int main(void) { char input[] = {"GCC Version Number"}; char output[30],*dummy; int length = 28; asm volatile ( "cld\n\t" "rep movsb" : "=S"(dummy),"=D"(dummy) : "c"(length), "0"(input), "1"(output)); printf("%s\n", output); return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33527