This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/33527] GCC doesn't protect %edi when using inline assembly

------- 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]