Skip to content
Open
Changes from all 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
6 changes: 3 additions & 3 deletions fuzzer/generator/instr_generator/formats.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generated Instruction Formats

INSTRUCTION_FORMATS = {
"rv_zifencei": {
"RV_ZIFENCEI": {
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

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

These extension keys were changed to uppercase, but several call sites and configuration lists still use the lowercase forms (e.g., fuzzer/generator/asm_template_manager/ext_list/allowed_ext.py contains "rv_zifencei"). Some code (e.g., core/generator/generate_instrs.py) indexes INSTRUCTION_FORMATS using the extension string without normalizing case, so rv_zifencei will no longer be found and the extension’s instructions may be silently skipped. Please standardize extension identifiers across the repo (update allowed_ext/special_probabilities/sets keys as needed) or add a backwards-compatible alias / normalization layer (e.g., normalize ext = ext.upper() before lookup).

Copilot uses AI. Check for mistakes.
"fence.i": {
"format": "fence.i",
"variables": [],
Expand Down Expand Up @@ -95,7 +95,7 @@
}
},
# rv32
"rv_zbs": {
"RV_ZBS": {
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

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

This key rename to uppercase needs to be kept consistent with the extension strings used elsewhere (e.g., allowed_ext.py / special_probabilities.py currently include "rv_zbs"). Since some generation paths use the raw extension string for INSTRUCTION_FORMATS[ext] (without .upper()), this change can prevent Zbs instructions from ever being selected/generated. Please update all extension identifiers or normalize/alias extension names at lookup time.

Copilot uses AI. Check for mistakes.
"bclr": {
"format": "bclr {RD}, {RS1}, {RS2}",
"variables": [
Expand Down Expand Up @@ -134,7 +134,7 @@
}
},
# rv32
"rv_32B":{
"RV_32B":{
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

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

Changing this extension key to RV_32B can break lookups from callers/config that still use rv_32B (see asm_template_manager/ext_list/allowed_ext.py). Some code paths index INSTRUCTION_FORMATS using the extension value as-is, so rv_32B will no longer match and these instructions can be skipped. Please ensure extension names are normalized consistently (or add an alias from the old key).

Copilot uses AI. Check for mistakes.
"slo": {
"format": "slo {RD}, {RS1}, {RS2}",
"variables": [
Expand Down
Loading