This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add support for XCVbitmanip extension in CV32E40P
ClosedPublic

Authored by melonedo on Jun 14 2023, 6:46 AM.

Details

Summary

Implement XCVbitmanip intrinsics for CV32E40P according to the specification.

This commit is part of a patch-set to upstream the 7 vendor specific extensions of CV32E40P.

Contributors: @CharKeaney, @jeremybennett, @lewis-revill, @liaolucy, @simoncook, @xmj.

Spec: https://github.com/openhwgroup/cv32e40p/blob/62bec66b36182215e18c9cf10f723567e23878e9/docs/source/instruction_set_extensions.rst

Diff Detail

Event Timeline

melonedo created this revision.Jun 14 2023, 6:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2023, 6:46 AM
melonedo requested review of this revision.Jun 14 2023, 6:46 AM
melonedo updated this revision to Diff 531316.Jun 14 2023, 7:18 AM

Add usage, merge tests and ensure 80-char limit

melonedo updated this revision to Diff 531319.Jun 14 2023, 7:24 AM

Remove excessive test header

melonedo updated this revision to Diff 531324.Jun 14 2023, 7:29 AM

[RISCV] Add support for XCVbitmanip extension in CV32E40P

Implement XCVbitmanip intrinsics for CV32E40P according to the specification.

This commit is part of a patch-set to upstream the 7 vendor specific extensions of CV32E40P.

Contributors: @CharKeaney, @jeremybennett, @lewis-revill, @liaolucy, @simoncook

Spec: https://github.com/openhwgroup/cv32e40p/blob/62bec66b36182215e18c9cf10f723567e23878e9/docs/source/instruction_set_extensions.rst

craig.topper added inline comments.Jun 14 2023, 8:46 AM
llvm/lib/Target/RISCV/RISCVInstrInfo.td
1926

I think we're doing one file per vendor

melonedo updated this revision to Diff 531368.Jun 14 2023, 8:57 AM

Switch to one file per vendor

melonedo updated this revision to Diff 531997.Jun 15 2023, 11:43 PM

Add contributor

melonedo edited the summary of this revision. (Show Details)Jun 15 2023, 11:44 PM
melonedo added a subscriber: xmj.
craig.topper added inline comments.Jun 16 2023, 12:54 PM
llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
16

I think you can use RVInstI and a let imm12 = {funct2, is3, is2};

35

I think you can use RVInstR?

52

I think you can use RVInstR and a let rs2 = 0b00000

71

I think you can use RVInstR and merge the remaining fields of RVInstBitManipRR here?

86

Is the only difference between this and CVBitManipRII the uimm2 for $is3? Maybe you could make that a template argument to CVBitManipRII that defaults to uimm5, but can be changed.

94

I think it's usual to put $rd first in ins?

97

Same here

melonedo updated this revision to Diff 532369.Jun 16 2023, 11:47 PM

Reuse RVInstI/R and enable test for disassembler

This revision is now accepted and ready to land.Jun 17 2023, 6:45 PM