This is an archive of the discontinued LLVM Phabricator instance.

[NFC] [Power] Fix instruction format for xsrqpi
ClosedPublic

Authored by syzaara on May 11 2018, 10:29 AM.

Details

Summary

xsrqpi is currently using Z23Form_1. The instruction format is xsrqpi R,VRT,VRB,RMC.
Rathar than bits 11-15 being used for FRA, it should have bits 11-14 reserved and bit 15 for R.
This patch adds a new class Z23Form_4 to fix the instruction format.

Diff Detail

Repository
rL LLVM

Event Timeline

syzaara created this revision.May 11 2018, 10:29 AM

Minor nit: the instructions that use this class are either Z23Form_7 ( xsrqpxp) or Z23Form_8 (xsrqpi, xsrqpix). The structure is correct but I think we should stick with the naming that matches the instruction descriptions in the ISA.

llvm/lib/Target/PowerPC/PPCInstrFormats.td
2137 ↗(On Diff #146348)

FRT --> VRT

2139 ↗(On Diff #146348)

FRB --> VRB

nemanjai accepted this revision.May 14 2018, 5:08 AM

Minor nit: the instructions that use this class are either Z23Form_7 ( xsrqpxp) or Z23Form_8 (xsrqpi, xsrqpix). The structure is correct but I think we should stick with the naming that matches the instruction descriptions in the ISA.

I agree. Even though tblgen will correctly encode things using positional matching here, it's nice from a readability perspective if the operands are named in an expected way. Feel free to fix that on the commit though.

This revision is now accepted and ready to land.May 14 2018, 5:08 AM
This revision was automatically updated to reflect the committed changes.