This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Add DFP format instructions definitions and MC tests
ClosedPublic

Authored by lei on Jul 4 2023, 2:43 PM.

Details

Summary

Add td definitions and asm/disasm tests for the dfp format
instructions in ISA 3.1 section 5.6.6

Diff Detail

Event Timeline

lei created this revision.Jul 4 2023, 2:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2023, 2:43 PM
lei requested review of this revision.Jul 4 2023, 2:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2023, 2:43 PM
lei updated this revision to Diff 537183.Jul 4 2023, 3:18 PM

remove unrelated new line

kamaub accepted this revision.Jul 13 2023, 9:54 AM
kamaub added a subscriber: kamaub.

This looks good to me, just some request that can be done pre-commit

llvm/lib/Target/PowerPC/PPCInstrDFP.td
104–107

I think we don't use these itineraries for these instructions at all right? Its still a bit odd to only apply the FPGeneral for the extract bias instructions only since all the others are also marked as "are treated as Floating-Point instructions in terms of resource availability.". Unless I misunderstood something about this instr specifically could you remove it here or apply it to each one, which ever you prefer.

104–125

According to isa3.1 section. 5.6.7, only the first four instruction, encoding and decoding, may raise a floating point exception, these remaining ones need to moved outside of the } // mayRaiseFPException brace I think.

This revision is now accepted and ready to land.Jul 13 2023, 9:54 AM
lei updated this revision to Diff 540167.Jul 13 2023, 1:21 PM

address review comments

lei marked 2 inline comments as done.Jul 13 2023, 1:22 PM
lei added inline comments.
llvm/lib/Target/PowerPC/PPCInstrDFP.td
104–107

removing since we have no scheduling info currently for dfp instr.

104–125

keeping the 2 instr that raises exceptions here and moving the rest below.

stefanp accepted this revision.Jul 14 2023, 6:54 AM

I only have one minor nit.
Otherwise, LGTM!

Feel free to address the nit when you commit the patch.

llvm/lib/Target/PowerPC/PPCInstrDFP.td
141

nit:
Should be f8rc:$RA.

lei updated this revision to Diff 540407.Jul 14 2023, 7:11 AM
lei marked 2 inline comments as done.

fix encoding for diexq

lei marked an inline comment as done.Jul 14 2023, 7:13 AM
This revision was landed with ongoing or failed builds.Jul 14 2023, 9:09 AM
This revision was automatically updated to reflect the committed changes.