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

tcg/riscv: Utilitizing RISC-V 'V' extension in the backend #14

Merged
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tcg/riscv/tcg-target-con-set.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ C_O1_I2(r, rZ, rZ)
C_N1_I2(r, r, rM)
C_O1_I4(r, r, rI, rM, rM)
C_O2_I4(r, r, rZ, rZ, rM, rM)
C_O1_I1(V, r)
C_O0_I2(V, r)
C_O1_I1(V, Vr)
C_O1_I2(V, r, r)
C_O1_I2(V, V, V)
C_O1_I2(V, V, r)
C_O1_I2(V, V, U)
C_O1_I2(V, r, V)
Swung0x48 marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 9 additions & 0 deletions tcg/riscv/tcg-target-con-str.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
* REGS(letter, register_mask)
*/
REGS('r', ALL_GENERAL_REGS)
REGS('v', ALL_VECTOR_REGS)
REGS('V', VECTOR_REGS_WO_V0)
/*
* Defining constraint letters for vector register grouping:
* aka. LMUL != 1
*/
REGS('d', ALL_DVECTOR_REG_GROUPS)
REGS('q', ALL_QVECTOR_REG_GROUPS)

/*
* Define constraint letters for constants:
Expand All @@ -19,3 +27,4 @@ CONST('J', TCG_CT_CONST_J12)
CONST('N', TCG_CT_CONST_N12)
CONST('M', TCG_CT_CONST_M12)
CONST('Z', TCG_CT_CONST_ZERO)
CONST('U', TCG_CT_CONST_U4)
Copy link
Collaborator

Choose a reason for hiding this comment

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

同上

Copy link
Author

@Swung0x48 Swung0x48 Jun 21, 2023

Choose a reason for hiding this comment

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

U 是用来表示 imm[4:0] 的,用在 OPIVI 格式指令中(见 Spec 5.)例如 vmv.v.i 指令(不过目前还未使用到)

Loading