Skip to content

definedBy shall be defined separately for RV32/RV64 in instruction yaml (e.g. ld.yaml)Β #986

@FanShupei

Description

@FanShupei

Current value and location
Look at a concrete case spec/std/isa/inst/I/ld.yaml:

name: ld
long_name: Load doubleword
description: |
  For RV64, load 64 bits of data into register `xd` from an
  address formed by adding `xs1` to a signed offset.
  <% if ext?(:Zilsd) %>
  For RV32, Loads a 64-bit value into registers xd and xd+1.
  The effective address is obtained by adding
  register xs1 to the sign-extended 12-bit offset.
  <% end %>

definedBy:
  anyOf: [I, Zilsd]

It implies RV32I defines ld instructions. This is absolutely inaccurate.

Expected value

I believe the root cause is current schema forces us to have one "definedBy" for both rv32/rv64. I propose we should extend to schema to allow define different "definedBy" for rv32/64, like the "encoding" field.

Here is an expected "definedBy" for "ld" if the proposal is accepted.

definedBy:
  RV32: Zilsd
  RV64: I

Metadata

Metadata

Assignees

No one assigned

    Labels

    data errorAn error in the database data

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions