This is an archive of the discontinued LLVM Phabricator instance.

Assure calling cld instruction in prologue of interrupt handler function
ClosedPublic

Authored by aaboud on Apr 2 2016, 10:22 AM.

Details

Summary

Interrupt handling function cannot assume anything about the direction flag (DF in EFLAGS register), and it must clear it using "cld" instruction in these cases:

  1. The interrupt handling function uses any of the "rep" instructions.
  2. Interrupt handling function calls another function.

However, to simplify the implementation we just create "cld" instruction in each prologue of interrupt handler function.

Diff Detail

Event Timeline

aaboud updated this revision to Diff 52466.Apr 2 2016, 10:22 AM
aaboud retitled this revision from to Assure calling cld instruction in prologue of interrupt handler function.
aaboud updated this object.
aaboud added a subscriber: llvm-commits.

Can anybody take a look on this change and approve it?
It is a fix for https://llvm.org/bugs/show_bug.cgi?id=26406

Thanks

qcolombet accepted this revision.Apr 21 2016, 11:18 AM
qcolombet edited edge metadata.
This revision is now accepted and ready to land.Apr 21 2016, 11:18 AM
This revision was automatically updated to reflect the committed changes.