This is an archive of the discontinued LLVM Phabricator instance.

[PS4 UBSAN] Emit ud2 for ubsantrap for the PS4 target.
ClosedPublic

Authored by wolfgangp on Oct 5 2021, 11:42 AM.

Details

Summary

For the PS4 target we want to emit a ud2 opcode for a ubsantrap instead of ud1.

Diff Detail

Event Timeline

wolfgangp created this revision.Oct 5 2021, 11:42 AM
wolfgangp requested review of this revision.Oct 5 2021, 11:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2021, 11:42 AM
probinson accepted this revision.Oct 6 2021, 8:28 AM

One minor thing and LGTM.

llvm/lib/Target/X86/X86ISelLowering.cpp
538

I'd prefer

if (...isPS4CPU())
  setOperationAction(..., Expand);
else
  setOperationAction(..., Legal);

as being a bit clearer.

This revision is now accepted and ready to land.Oct 6 2021, 8:28 AM
This revision was landed with ongoing or failed builds.Oct 6 2021, 11:49 AM
This revision was automatically updated to reflect the committed changes.