This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add support for custom instructions for Sifive S76.
ClosedPublic

Authored by garvitgupta08 on Jun 20 2023, 10:55 AM.

Details

Summary

Support for below instruction is added

  1. CFLUSH.D.L1
  2. CDISCARD.D.L1
  3. CEASE

Additionally, Zihintpause extension is added to sifive s76 for pause
instruction.

Spec - https://sifive.cdn.prismic.io/sifive/767804da-53b2-4893-97d5-b7c030ae0a94_s76mc_core_complex_manual_21G3.pdf

Diff Detail

Event Timeline

garvitgupta08 created this revision.Jun 20 2023, 10:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 10:55 AM
garvitgupta08 requested review of this revision.Jun 20 2023, 10:55 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 20 2023, 10:55 AM
craig.topper added inline comments.
llvm/lib/Support/RISCVISAInfo.cpp
136

Put this with xsfvcp

llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
566

Keep SiFive extensions together.

llvm/lib/Target/RISCV/RISCVFeatures.td
769

Keep SiFive extensions together

771

I believe the SiFive documentation uses SCIE not SFCIE?

llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td
508

I don't think these are restricted to RV64. They're in the E76 core complex manual too.

510

Don't exceed 80 columns

510

Use SF_ instead of Sfv_

Addressed the comments

garvitgupta08 marked 7 inline comments as done.Jun 22 2023, 11:47 AM
craig.topper added inline comments.Jun 22 2023, 11:47 PM
llvm/lib/Support/RISCVISAInfo.cpp
124

Alphabetize.

llvm/lib/Target/RISCV/RISCVFeatures.td
757

Drop "for S76"

garvitgupta08 marked 2 inline comments as done.Jun 23 2023, 10:59 AM
craig.topper accepted this revision.Jun 23 2023, 11:15 AM
craig.topper added inline comments.
llvm/docs/ReleaseNotes.rst
209

SCIE->CIE since the S already stands for SiFive.

llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
562

SCIE -> SiFive CIE

This revision is now accepted and ready to land.Jun 23 2023, 11:15 AM

Addressed the changes. I do not have commit access, could you please commit this differential on my behalf? Thanks.

garvitgupta08 marked 2 inline comments as done.Jun 26 2023, 12:04 AM

Addressed the changes. I do not have commit access, could you please commit this differential on my behalf? Thanks.

Yes. Can you provide the name and email address for the git log.

Addressed the changes. I do not have commit access, could you please commit this differential on my behalf? Thanks.

Yes. Can you provide the name and email address for the git log.

Name - Garvit Gupta
Email - quic_garvgupt@quicinc.com