This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Add support for the canonical version of tlbie
AbandonedPublic

Authored by void on Mar 3 2022, 2:35 PM.

Details

Reviewers
nickdesaulniers
nathanchance
shchenz
jsji
Group Reviewers
Restricted Project
Summary

The tlbie instruction's canonical form accepts five operands, with the
extended form accepts two operands. Make the 2-operand form an alias of
the canonical form.

A single operand form isn't described, but it's accepted by GAS, so
accept it here as an alias.

This is related to https://reviews.llvm.org/D92156.

Diff Detail

Event Timeline

void created this revision.Mar 3 2022, 2:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 2:35 PM
void requested review of this revision.Mar 3 2022, 2:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 2:35 PM
void updated this revision to Diff 412846.Mar 3 2022, 3:12 PM

Don't allow 1-op form.

void updated this revision to Diff 412863.Mar 3 2022, 4:21 PM

Add comment about POWER6 and tlbie with one operand.

void updated this revision to Diff 412864.Mar 3 2022, 4:23 PM

Accidental update fixed.

jsji added reviewers: shchenz, Restricted Project.Mar 3 2022, 7:30 PM

I made a search in Power6 ~ Power10 ISAs, the instruction format for tlbie is like:
1: Power10/Power9:

tlbie RB,RS,RIC,PRS,R

Extended mnemonic for tlbie:
tlbie RB,RS -> tlbie RB,RS,0,0,0

2: Power7/Power8:

tlbie RB,RS

3: Power6:

tlbie RB,L   (L is 1bit as 0 or 1, but it is also an operand).

These formats should all be backward compatible.

So for this patch, can we use different instruction definitions for different Power versions?

llvm/lib/Target/PowerPC/PPCInstrInfo.td
4628

This seems not right. Power7/Power8 does not have 5 operands tlbie? They only support the left one.

jsji resigned from this revision.Jun 2 2022, 7:50 AM
void abandoned this revision.Apr 6 2023, 2:30 PM