This is an archive of the discontinued LLVM Phabricator instance.

[X86] Fix prolog/epilog mismatch for stack protectors on win32-macho.
ClosedPublic

Authored by aemerson on Dec 5 2019, 3:53 PM.

Details

Summary

The xor'ing behaviour is only used for msvc/crt environments, when we're targeting macho the guard load code doesn't know about the xor in the epilog. Disable xor'ing when targeting win32-macho to be consistent.

Diff Detail

Event Timeline

aemerson created this revision.Dec 5 2019, 3:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 5 2019, 3:53 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
thegameg accepted this revision.Dec 5 2019, 4:12 PM

LGTM

llvm/test/CodeGen/X86/stack-protector-strong-macho-win32-xor.ll
46

I would remove the attributes/annotations that aren't needed.

This revision is now accepted and ready to land.Dec 5 2019, 4:12 PM
This revision was automatically updated to reflect the committed changes.