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

arch/risc-v: add support of save/restore vector registers #12184

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

anchao
Copy link
Contributor

@anchao anchao commented Apr 19, 2024

Summary

arch/risc-v: add support of save/restore vector registers

Reference:
https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc
https://github.com/torvalds/linux/blob/master/arch/riscv/include/asm/vector.h

Signed-off-by: chao an anchao@lixiang.com

Impact

N/A

Testing

qemu rv-virt smp64

@anchao anchao marked this pull request as draft April 19, 2024 09:07
@anchao anchao marked this pull request as ready for review April 22, 2024 02:11
@anchao anchao force-pushed the 24041904 branch 3 times, most recently from b77825b to 4147636 Compare April 22, 2024 11:28
@acassis acassis merged commit 28044f7 into apache:master Apr 23, 2024
26 checks passed
*
* Description:
* Given the pointer to a register save area (in A0), save the state of the
* floating point registers.
Copy link
Contributor

Choose a reason for hiding this comment

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

floating->vector

* Name: riscv_savevpu
*
* Description:
* Given the pointer to a register save area (in A0), save the state of the
Copy link
Contributor

Choose a reason for hiding this comment

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

A0->A1

* floating point registers.
*
* C Function Prototype:
* void riscv_savevpu(uintptr_t *regs, uintptr_t *fregs);
Copy link
Contributor

Choose a reason for hiding this comment

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

fregs->vregs

*
* Input Parameters:
* regs - A pointer to the integer registers that contain the status
* fregs - A pointer to the register save area in which to save the
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

* Input Parameters:
* regs - A pointer to the integer registers that contain the status
* fregs - A pointer to the register save area in which to save the
* floating point registers
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

*
* Input Parameters:
* regs - A pointer to the integer registers that contain the status
* fregs - A pointer to the register save area containing the floating
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

*
* Description:
* Given the pointer to a register save area (in A0), restore the state of
* the floating point registers.
Copy link
Contributor

Choose a reason for hiding this comment

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

vector

@xiaoxiang781216
Copy link
Contributor

@anchao see my minor comment.

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.

4 participants