Skip to content

riscv_use_real_ext_names_on_testcases

Tsukasa OI edited this page Nov 19, 2022 · 4 revisions

GAS Testsuite: Use real extension names (B / K)

Issue Solved

Most of the RISC-V GAS testsuite uses real extension names but there are a few counterexamples. I will talk about following tests:

  • b-ext and b-ext-64, for Zb* except Zbk*
  • k-ext and k-ext-64, for Zk* and Zbk*

They:

To avoid confusion and test individual extensions separately, this patchset provides per-extension testcases and removes b-ext{,-64} and k-ext{,-64}.

There's another effect. Splitting B testcases will clarify that zext.h and zext.w (seemingly similar) instructions belong to different extension:

  • zext.h (RV32/64_Zbb)
  • zext.w (RV64_Zba) ← not Zbb!

Changes

  • Split b-ext and b-ext-64 to:
    • zba{,-64}
    • zbb{,-64}
    • zbc
    • zbs{,-64}
  • Reuse existing zk* and zbk* testcases because they are fine as is,
  • Add new testcases for separate extension:
    • zkr (along with Zicsr, to test seed CSR accessibility)
    • zkt (just to test extension support)
  • Remove:
    • b-ext{,-64}
    • k-ext{,-64}

For vector-insn*, I'll leave this for now but it might possible to split (e.g. to three testcases for two instruction classes and INSN_V_EEW64). Still, I think this is not as important as b-ext{,-64} and k-ext{,-64} and I don't complain about using vector-insn* names themselves.

Clone this wiki locally