Skip to content

Conversation

@uweigand
Copy link
Member

This patch implements a number of changes relating to s390x HW facilities and facility detection:

  • Fix a mis-named facility: the z15 (arch13) CPU introduced the Miscellaneous-Instruction-Extensions Facility 3 (not 2). Rename "mie2" to "mie3" throughout the code base.

  • Now that we can use inline asm, use the STORE FACILITY LIST EXTENDED instruction rather than HWCAP to detect facilities at run time. This eliminates the libc crate dependency, and allows for more fine-grained feature detection.

  • Add support for the z16 (arch14) CPU names (these do not provide any facilities that would be relevant to cranelift, but it should be possible to use these names as synonyms to z15 at least).

  • Add support for the z17 (arch15) CPU names, and two new facilities provided at this level: the Miscellaneous-Instruction-Extensions Facility 4 and the Vector-Enhancements Facility 3. (Note that no code to exploit these facilities is present in this patch; that will be provided later.)

This patch implements a number of changes relating to s390x HW
facilities and facility detection:

- Fix a mis-named facility: the z15 (arch13) CPU introduced the
  Miscellaneous-Instruction-Extensions Facility *3* (not 2).
  Rename "mie2" to "mie3" throughout the code base.

- Now that we can use inline asm, use the STORE FACILITY LIST
  EXTENDED instruction rather than HWCAP to detect facilities
  at run time.  This eliminates the libc crate dependency,
  and allows for more fine-grained feature detection.

- Add support for the z16 (arch14) CPU names (these do not provide
  any facilities that would be relevant to cranelift, but it should
  be possible to use these names as synonyms to z15 at least).

- Add support for the z17 (arch15) CPU names, and two new facilities
  provided at this level: the Miscellaneous-Instruction-Extensions
  Facility 4 and the Vector-Enhancements Facility 3.  (Note that no
  code to exploit these facilities is present in this patch; that
  will be provided later.)
@uweigand uweigand requested review from a team as code owners July 11, 2025 15:17
@uweigand uweigand requested review from cfallin and dicej and removed request for a team July 11, 2025 15:17
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@cfallin cfallin enabled auto-merge July 11, 2025 15:21
@cfallin cfallin added this pull request to the merge queue Jul 11, 2025
Merged via the queue into bytecodealliance:main with commit 037a6ed Jul 11, 2025
72 checks passed
bongjunj pushed a commit to prosyslab/wasmtime that referenced this pull request Oct 20, 2025
This patch implements a number of changes relating to s390x HW
facilities and facility detection:

- Fix a mis-named facility: the z15 (arch13) CPU introduced the
  Miscellaneous-Instruction-Extensions Facility *3* (not 2).
  Rename "mie2" to "mie3" throughout the code base.

- Now that we can use inline asm, use the STORE FACILITY LIST
  EXTENDED instruction rather than HWCAP to detect facilities
  at run time.  This eliminates the libc crate dependency,
  and allows for more fine-grained feature detection.

- Add support for the z16 (arch14) CPU names (these do not provide
  any facilities that would be relevant to cranelift, but it should
  be possible to use these names as synonyms to z15 at least).

- Add support for the z17 (arch15) CPU names, and two new facilities
  provided at this level: the Miscellaneous-Instruction-Extensions
  Facility 4 and the Vector-Enhancements Facility 3.  (Note that no
  code to exploit these facilities is present in this patch; that
  will be provided later.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants