Skip to contentSkip to conversation

Add vtype.vill FIELD macro definition

PATCH Superseded Chao Liu 2 participants 3 messages Dec 11, 2024 RISC-V

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
author
#1 lore raw

PATCH 1/1 target/riscv: add VILL field for vtype register macro definition

In reply to Chao Liu
---
 target/riscv/cpu.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
target/riscv/cpu.h +2 -1
index 284b112821..fc286484b8 100644
@@ -170,7 +170,8 @@ FIELD(VTYPE, VSEW, 3, 3)
 FIELD(VTYPE, VTA, 6, 1)
 FIELD(VTYPE, VMA, 7, 1)
 FIELD(VTYPE, VEDIV, 8, 2)
-FIELD(VTYPE, RESERVED, 10, sizeof(target_ulong) * 8 - 11)
+FIELD(VTYPE, RESERVED, 10, sizeof(target_ulong) * 8 - 12)
+FIELD(VTYPE, VILL, 63, 1)
 
 typedef struct PMUCTRState {
     /* Current value of a counter */
Signature · 1 line
2.47.0

Chao Liu

author
#0 lore raw

cover Add vtype.vill FIELD macro definition

Hi, all:

According to the "The RISC-V Instruction Set Manual Volume I: Unprivileged Architecture" Version 20240411, Section 31.3.4 "Vector type register, vtype", and Table 40 "vtype register layout", this patch adds the definition for the vill field of the vtype register. The bit position for vill is [63].

This change ensures that our implementation remains in line with the latest RISC-V specifications, thereby maintaining compatibility and correctness.

Chao Liu (1):
target/riscv: add VILL field for vtype register macro definition

 target/riscv/cpu.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.47.0
#2 lore raw

Re: [PATCH v1 1/1] target/riscv: add VILL field for vtype register macro definition

In reply to Chao Liu
Quoted 10 lines · Chao Liu
---
  target/riscv/cpu.h | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
target/riscv/cpu.h +0 -0
index 284b112821..fc286484b8 100644

target/riscv/cpu.h FIELD(VTYPE, VSEW, 3, 3) · line 174

Quoted 6 lines
target/riscv/cpu.h +2 -1
@@ -170,7 +170,8 @@ FIELD(VTYPE, VSEW, 3, 3)
  FIELD(VTYPE, VTA, 6, 1)
  FIELD(VTYPE, VMA, 7, 1)
  FIELD(VTYPE, VEDIV, 8, 2)
-FIELD(VTYPE, RESERVED, 10, sizeof(target_ulong) * 8 - 11)
+FIELD(VTYPE, RESERVED, 10, sizeof(target_ulong) * 8 - 12)
+FIELD(VTYPE, VILL, 63, 1)

It's 63 for rv64, but it's 31 for rv32.
We handle this one manually.

r~