Page MenuHomePhabricator

[RISCV] Add Clang frontend support for Bitmanip extension

Authored by simoncook on Dec 16 2019, 8:36 AM.



This adds the __riscv_bitmanip macro and the 'b' target feature to enable it.

Event Timeline

s.egerton created this revision.Dec 16 2019, 8:36 AM

Thanks Scott, it should be relatively easy to add tests for this in 'clang/test/Preprocessor/riscv-target-features.c' if you could.

Jim added a subscriber: Jim.Dec 16 2019, 9:39 PM
s.egerton updated this revision to Diff 234308.Dec 17 2019, 7:59 AM

Add test that march 'b' flag enables __riscv_bitmanip.

lenary accepted this revision.Dec 20 2019, 3:27 AM


This revision is now accepted and ready to land.Dec 20 2019, 3:27 AM
This revision was automatically updated to reflect the committed changes.

@s.egerton Please can you revert rG57cf6ee9c84434161088c39a6f8dd2aae14eb12d - this patch has open dependencies, including on the LLVM support for RISC-V B extension. It would be confusing to users if clang 10.0 contained frontend support for the B extension, but LLVM 10.0 did not contain backend support for it.

Sorry for the confusion around marking this as approved.

Good point. It's reverted now.

lenary reopened this revision.Jan 15 2020, 3:13 AM

@s.egerton Thank you. Sorry again for the confusion.

Reverted in rGcbe681bd8339d3a018d25441a5f4ef9da2bd017d

This revision is now accepted and ready to land.Jan 15 2020, 3:13 AM
simoncook commandeered this revision.Mon, Feb 3, 8:06 AM
simoncook edited reviewers, added: s.egerton; removed: simoncook.
simoncook updated this revision to Diff 242082.Mon, Feb 3, 8:07 AM

Rebase changes on top of experimental feature support (D73891)