[Bug c/33527] GCC doesn't protect %edi when using inline assembly
ebotcazou at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Sep 22 07:27:00 GMT 2007
------- Comment #1 from ebotcazou at gcc dot gnu dot org 2007-09-22 07:27 -------
> The problem is, movsb changes the value of %esi and %edi, and I told the
> compiler about this in the "input" section in the asm directive.
No, you didn't, you only told that %esi and %edi should be loaded on entry.
See section 5.35 of the manual, especially the paragraph starting with "Some
instructions clobber specific hard registers". Note that the provision "You
may not write a clobber description in a way that overlaps with an input or
output operand" will apply in this case, so 'volatile' will be required.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33527
More information about the Gcc-bugs
mailing list