From 0aee7bf24d7f2578d3867bcfa25646cb0bd06d9a Mon Sep 17 00:00:00 2001 From: Dingli Zhang Date: Tue, 9 Sep 2025 00:38:15 +0000 Subject: [PATCH] 8367048: RISC-V: Correct pipeline descriptions of the architecture Reviewed-by: fyang, fjiang, mli --- src/hotspot/cpu/riscv/riscv.ad | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/hotspot/cpu/riscv/riscv.ad b/src/hotspot/cpu/riscv/riscv.ad index e02d781972b..eab19e74f93 100644 --- a/src/hotspot/cpu/riscv/riscv.ad +++ b/src/hotspot/cpu/riscv/riscv.ad @@ -3833,13 +3833,18 @@ opclass immIorL(immI, immL); pipeline %{ attributes %{ - // RISC-V instructions are of fixed length - fixed_size_instructions; // Fixed size instructions TODO does - max_instructions_per_bundle = 2; // Generic RISC-V 1, Sifive Series 7 2 - // RISC-V instructions come in 32-bit word units - instruction_unit_size = 4; // An instruction is 4 bytes long - instruction_fetch_unit_size = 64; // The processor fetches one line - instruction_fetch_units = 1; // of 64 bytes + // RISC-V instructions are of length 2 or 4 bytes. + variable_size_instructions; + instruction_unit_size = 2; + + // Up to 4 instructions per bundle + max_instructions_per_bundle = 4; + + // The RISC-V processor fetches 64 bytes... + instruction_fetch_unit_size = 64; + + // ...in one line. + instruction_fetch_units = 1; // List of nop instructions nops( MachNop );