Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8315652

RISC-V: Features string uses wrong separator for jtreg

XMLWordPrintable

    • b15
    • riscv

        The other platforms use space or comma space.

        The WB class CPUInfo.java gives you the features in a List<String> which is not working (as in one features per list item) on RV.

        The jtreg requires annotation allows you regexp the string of that list to determine if required feature is on current CPU.
        Without separator it is not easy to match e.g. vector.

        If we use plain space.
        "rv64 i g c v zicbop z..."
        For the requires annotation that means the string we are regexping looks like:
        [rv64, i, m, a, f, d, c, v, zicbom, zicboz, zicbop, zba, zbb, zbs, zicsr, zifencei, zic64b, zihintpause]

        We can then use required tag, such as:
         * @requires vm.cpu.features ~= ".* v,.*"
        which should only match vector.

        But that would mean CPU info/desc looks 'funny' for RV folks:
        "CPU: total 16 (initial active 16) rv64 i m a f d c v zicbom zicboz zicbop zba zbb zbs zicsr zifencei zic64b zihintpause"

              rehn Robbin Ehn
              rehn Robbin Ehn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: