-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
b77825b
to
4147636
Compare
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>
* | ||
* Description: | ||
* Given the pointer to a register save area (in A0), save the state of the | ||
* floating point registers. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vector
@anchao see my minor comment. |
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