Page MenuHomePhabricator

[PowerPC] Add support for the canonical version of tlbie
Needs ReviewPublic

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

Unit TestsFailed

TimeTest
60,130 msx64 debian > AddressSanitizer-x86_64-linux.TestCases::scariness_score_test.cpp
Script: -- : 'RUN: at line 4'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -O0 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/asan/TestCases/scariness_score_test.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/asan/X86_64LinuxConfig/TestCases/Output/scariness_score_test.cpp.tmp

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