This is an archive of the discontinued LLVM Phabricator instance.

[X32][CET] Fix handling of indirect branches
ClosedPublic

Authored by hvdijk on Apr 28 2021, 4:59 PM.

Details

Summary

As X32 uses 32-bit pointers without having 32-bit indirect branch instructions, we need to fix up indirect branches by extending the branch targets to 64 bits. This was already done for BRIND but not yet for NT_BRIND. The same logic works for both, so this applies that existing logic to NT_BRIND as well.

Diff Detail

Event Timeline

hvdijk created this revision.Apr 28 2021, 4:59 PM
hvdijk requested review of this revision.Apr 28 2021, 4:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2021, 4:59 PM
MaskRay accepted this revision.Apr 28 2021, 5:07 PM

LGTM.

This revision is now accepted and ready to land.Apr 28 2021, 5:07 PM
This revision was automatically updated to reflect the committed changes.