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

i#3544 RV64 vector part2: Add basic vector support to the core #6848

Merged
merged 8 commits into from
Jun 27, 2024

Conversation

ksco
Copy link
Contributor

@ksco ksco commented Jun 17, 2024

This is a follow-up patch of adding RISC-V vector (RVV) extension support to the core, part1 in PR #6810 (f1ce1bc).

This patch:

  1. fixes several issues in the codec introduced in part1, codec unit tests will be submitted separately in follow-up PRs;
  2. rename and reuse SVE vector length getter/setter functions to be more concise on APIs for vector extensions;
  3. adds RISC-V vector support to drdisas;
  4. support code cache and clean call context switch;

For now, we support RISC-V vector lengths up to 256 bits, longer vector lengths will exceed the limit of DynamoRIO stack size and 12-bit signed immediate range.

Issue: #3544

@ksco ksco requested a review from derekbruening June 17, 2024 09:06
@derekbruening
Copy link
Contributor

(May not get to this for another day)

Copy link
Contributor

@derekbruening derekbruening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main concern is the 8-vector-reg stride on all the loops: is that right?

core/arch/riscv64/emit_utils.c Show resolved Hide resolved
core/arch/riscv64/emit_utils.c Show resolved Hide resolved
core/arch/riscv64/emit_utils.c Show resolved Hide resolved
core/arch/riscv64/emit_utils.c Show resolved Hide resolved
core/arch/proc_api.h Outdated Show resolved Hide resolved
core/ir/opnd_api.h Show resolved Hide resolved
core/ir/riscv64/codec.py Outdated Show resolved Hide resolved
core/ir/riscv64/codec.py Outdated Show resolved Hide resolved
core/lib/globals_api.h Show resolved Hide resolved
core/lib/globals_api.h Outdated Show resolved Hide resolved
@derekbruening
Copy link
Contributor

May want to have the Arm folks have a look mostly as a heads up on the vector length API name changes: I'll add @AssadHashmi

@ksco ksco requested a review from derekbruening June 25, 2024 09:56
Copy link
Contributor

@derekbruening derekbruening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm missing something, the reg_get_size_lmul looks incorrect.

core/ir/opnd_api.h Outdated Show resolved Hide resolved
core/ir/opnd_shared.c Outdated Show resolved Hide resolved
core/ir/opnd_shared.c Outdated Show resolved Hide resolved
core/lib/globals_api.h Outdated Show resolved Hide resolved
@ksco ksco requested a review from derekbruening June 26, 2024 16:35
core/ir/opnd_shared.c Outdated Show resolved Hide resolved
core/ir/opnd_shared.c Outdated Show resolved Hide resolved
@ksco ksco requested a review from derekbruening June 26, 2024 18:31
core/ir/encode_api.h Show resolved Hide resolved
core/ir/encode_api.h Show resolved Hide resolved
@ksco ksco merged commit 59d0360 into DynamoRIO:master Jun 27, 2024
17 checks passed
@ksco ksco deleted the v branch June 27, 2024 05:56
@AssadHashmi
Copy link
Contributor

May want to have the Arm folks have a look mostly as a heads up on the vector length API name changes: I'll add @AssadHashmi

I have been on vacation. The name changes are fine with us.

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

Successfully merging this pull request may close these issues.

None yet

3 participants