Skip to content

Support custom immediate sizes #168

Description

@PhilippvK

Currently, we only allow immediate bit widths, which are already supported by LLVM + uimm12, which needs a hardcoded patch file.

Tasks:

  • Define the list of supported imm field types (per LLVM version)
  • Throw an error if a non-supported immediate width is detected
  • Collect all used immediate withs (per-instruction, per-set, per-model, global)
  • Generate patches for custom immediates
  • Add example instructions using custom imm width
  • Add example instructions using multiple immediate fields
  • Optional: Automatically infer the existing immediate types from the LLVM codebase
  • Handle _lsb0, _lsb00,... immediate operand suffixes
  • Support more complex immediate types such as uimmlog2xlennonzero

One alternative would be to introduce a new custom field type for every immediate to not conflict with the existing ones. Example: seal5_uimm5 instead of just uimm5

Challenge: It will be difficult to combine the information about the required imm types over multiple modes which is required to avoid duplicates.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions