This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] The BL8_NOTOC_RM instruction needs to produce a notoc relocation.
ClosedPublic

Authored by stefanp on Mar 18 2022, 8:27 AM.

Details

Summary

The BL8_NOTOC_RM instruction was incorrectly producing a relocation that reqired
a TOC restore after the call. This patch fixes that issue and the notoc
relocation is now used.

Diff Detail

Event Timeline

stefanp created this revision.Mar 18 2022, 8:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2022, 8:27 AM
stefanp requested review of this revision.Mar 18 2022, 8:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2022, 8:27 AM
stefanp added a reviewer: Restricted Project.Mar 18 2022, 8:28 AM
jsji added a subscriber: jsji.Mar 18 2022, 9:51 AM
jsji added inline comments.
llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
53

Can we somehow set flag in td eg: set TSFlags in IForm_notoc, then use it for all NOTOC opcode, and check the flag in MC so that we won't miss if we add new variation based on BL8_NOTOC?

jsji accepted this revision as: jsji.EditedMar 21 2022, 12:12 PM

LGTM as long as we have followup patch to prevent similar things happen again. Thanks.

This revision is now accepted and ready to land.Mar 21 2022, 12:12 PM
This revision was landed with ongoing or failed builds.Mar 23 2022, 5:01 PM
This revision was automatically updated to reflect the committed changes.