-
Notifications
You must be signed in to change notification settings - Fork 3
Update instruction format keys to uppercase #8
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
Updates instruction-extension dictionary keys in the instruction format table to use uppercase identifiers.
Changes:
- Renamed
INSTRUCTION_FORMATStop-level keys forrv_zifencei,rv_zbs, andrv_32Bto uppercase equivalents. - Aligns these specific extension identifiers with the uppercase pattern used by many other entries.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| # rv32 | ||
| "rv_32B":{ | ||
| "RV_32B":{ |
Copilot
AI
Jan 24, 2026
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.
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).
|
|
||
| INSTRUCTION_FORMATS = { | ||
| "rv_zifencei": { | ||
| "RV_ZIFENCEI": { |
Copilot
AI
Jan 24, 2026
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.
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).
| }, | ||
| # rv32 | ||
| "rv_zbs": { | ||
| "RV_ZBS": { |
Copilot
AI
Jan 24, 2026
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.
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.
|
Thanks for the PR! Please refer to the Copilot feedback above. Before merging, the backward compatibility issues mentioned there need to be addressed. Once those points are resolved, we can move forward with the merge. |
No description provided.