Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitmanip and Scalar Crypto Intrinsics in GCC #37

Closed
2 of 13 tasks
pz9115 opened this issue Oct 24, 2023 · 13 comments
Closed
2 of 13 tasks

Bitmanip and Scalar Crypto Intrinsics in GCC #37

pz9115 opened this issue Oct 24, 2023 · 13 comments
Assignees

Comments

@pz9115
Copy link

pz9115 commented Oct 24, 2023

Technical Group

Crypto TG

ratification-pkg

Scalar Crypto & Bitmanip extensions

Technical Liaison

[email protected]

Task Category

Compilers/Toolchain

Task Sub Category

  • gcc
  • binutils
  • gdb
  • intrinsics
  • Java
  • KVM
  • ld
  • llvm
  • Linux kernel
  • QEMU
  • Spike

Ratification Target

2021

Statement of Work (SOW)

Component names: gcc

Requirements:
riscv-non-isa/riscv-c-api-doc#44 merged

Deliverables:

  • gcc patches

Acceptance Criteria:

  • gcc support Bitmanip and Scalar Crypto extension intrinsic format in GCC upstream

Projected timeframe:

  • Supports Bitmanip intrinsics in gcc within Nov 2023
  • Supports Scalar Crypto intrinsics in gcc within Dec 2023

SOW Signoffs:

  • Task group liaison sign-off
  • Development partner sign-off
  • Toolchains & Runtimes sign-off (if gcc, LLVM, binutils, gdb work)

Waiver

  • Freeze
  • Ratification

Pull Request Details

riscv-non-isa/riscv-c-api-doc#44 finished review in the last week,
Now we are preparing to support this new feature in gcc upstream.

@jjscheel jjscheel changed the title Intrinsics support for Bitmanip and Scalar Crypto extension in GCC Bitmanip and Scalar Crypto Intrinsics in GCC Oct 24, 2023
@cmuellner
Copy link

@pz9115, thank you very much for picking this up!

@jjscheel
Copy link
Contributor

IYes, @pz9115, thank you!!!

A couple questions to consider as you plan this work:

  1. What size is this (S, M, ...)? See the field values for month estimates.
  2. By what date do target having PR(s) accepted upstream?

I'm sure I'll have more questions, but these would be good to understand first.

@pz9115
Copy link
Author

pz9115 commented Nov 20, 2023

Still WIP, plan to send patches within this month.

@pz9115
Copy link
Author

pz9115 commented Nov 28, 2023

Sent the Scalar Crypto intrinsic implement to GCC upstream, Bitmanip part is still debugging, plan to send patch within this week.

https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638238.html

@cmuellner
Copy link

I reviewed the initial patch from Nov 28 and we identified that we need to change some of the way the intrinsics are implemented.

The first complete patchset of scalar crypto and bitmanip intrinsics has been published on Dec 5: https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639371.html

I reviewed and identified a few things that need to be improved (e.g. extend test coverage to also test with -O0 and implement intrinsics with immediates such that the compiler will always "see" this value).

A second patchset has been published yesterday, on Dec 7: https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639725.html

I also reviewed this patch set and identified that the tests were not passing.
So, another revision is needed.

@pz9115
Copy link
Author

pz9115 commented Dec 12, 2023

WIP, Shihua is updating the patch following Christoph's comments.

@pz9115
Copy link
Author

pz9115 commented Jan 9, 2024

Shihua resends his third version patches and waits for a new cycle review.

https://gcc.gnu.org/pipermail/gcc-patches/2023-December/641432.html

@pz9115
Copy link
Author

pz9115 commented Jan 30, 2024

Merged into upstream:

https://gcc.gnu.org/git?p=gcc.git;a=commit;h=c7ad6bf5b9e478d87294230318db675d7c8f3ce4

@jjscheel
Copy link
Contributor

jjscheel commented Feb 1, 2024

Thanks, Jiawei. Does this mean that all work for this SOW is complete?

@pz9115
Copy link
Author

pz9115 commented Feb 1, 2024

Yes, it does. We can close this issue :)

@jjscheel
Copy link
Contributor

jjscheel commented Feb 1, 2024

Great news, @pz9115. I've updated the State correctly and consider.

@cmuellner, would you mind confirming that we can sign-off of this as our TG rep for me?

@cmuellner
Copy link

Yes, I am happy to confirm that bitmanip and scalar crypto intrinsics are specified and available in LLVM and GCC.
To all involved people: thank you very much (especially Craig and @pz9115).

@jjscheel
Copy link
Contributor

Complete. Nice work, @pz9115!!! Thanks for your help @cmuellner!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: As-planned
Development

No branches or pull requests

3 participants