On 6/26/24 08:50, Andrea Parri wrote:
Tested using amo.exp with rv64gc_zalrsc, rv64id_zaamo, rv64id_zalrsc,
rv64id_zabha (using tip-of-tree qemu w/ zabha patches [2] applied for
execution tests).
My interpretation of the Zabha specification, in particular of "The Zabha
extension depends upon the Zaamo standard extension", is that rv64id_zabha
should result in a dependency violation (some compiler warning).

The changes at stake seem instead to make the Zabha extension "select" the
Zaamo extension; IOW, these changes seem to make rv64id_zabha an alias of
rv64id_zaamo_zabha: I am wondering whether this was intentional?

Hi Andrea,

Thanks for highlighting this.

This is intentional - my understanding is that GCC adds extensions if the specified extensions depend upon them.

For example in the Zvfh spec: "The Zvfh extension depends on the Zve32f and Zfhmin extensions."

In riscv_implied_info zve32f and zfhmin are implied by zvfh: {"zvfh", "zve32f"}, {"zvfh", "zfhmin"}

This can be seen here: https://godbolt.org/z/63518Wrcj in the .attribute arch string: ...zfhmin1p0_zve32f1p0_...

Side tangent: oddly enough it looks like zvfh does not require/imply the v extension?

Patrick

   Andrea

Reply via email to