rust-lang / rust-lang/stdarch

assert_instr calling convention for windows targets might be broken

Open
#594 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-testing
Dominant language
Rust
Stars
694
Forks
336
Avg merge
5d 14h
Merged PRs (30d)
9

Description

The objective is to force the assert_instr shim to generate the same code as on unixes and bsds. We currently use vectorcall for windows target to avoid passing vectors by memory, but as seen in #592 this is not enough. Some investigation was done there, but grep for target_os = "windows" in coresimd to find out all places in which the assert_instr tests are temporarily disabled on windows.

The list was (see: https://travis-ci.org/gnzlbg/stdsimd/jobs/453040419#L3545):

failures:
    coresimd::x86::avx2::assert__mm256_extracti128_si256_vextractf128
    coresimd::x86::avx2::assert__mm256_inserti128_si256_vinsertf128
    coresimd::x86::avx::assert__mm256_extractf128_pd_vextractf128
    coresimd::x86::avx::assert__mm256_extractf128_ps_vextractf128
    coresimd::x86::avx::assert__mm256_extractf128_si256_vextractf128
    coresimd::x86::avx::assert__mm256_insertf128_pd_vinsertf128
    coresimd::x86::avx::assert__mm256_insertf128_ps_vinsertf128
    coresimd::x86::avx::assert__mm256_insertf128_si256_vinsertf128
    coresimd::x86::fma::assert__mm_fmadd_sd_vfmadd213sd
    coresimd::x86::fma::assert__mm_fmadd_ss_vfmadd213ss
    coresimd::x86::fma::assert__mm_fmsub_sd_vfmsub213sd
    coresimd::x86::fma::assert__mm_fmsub_ss_vfmsub213ss
    coresimd::x86::fma::assert__mm_fnmadd_sd_vfnmadd213sd
    coresimd::x86::fma::assert__mm_fnmadd_ss_vfnmadd213ss
    coresimd::x86::fma::assert__mm_fnmsub_sd_vfnmsub213sd
    coresimd::x86::fma::assert__mm_fnmsub_ss_vfnmsub213ss
    coresimd::x86::sse2::assert__mm_cvtsi128_si32_movd
    coresimd::x86::sse2::assert__mm_store_sd_movlps
    coresimd::x86::sse2::assert__mm_storeh_pd_movhpd
    coresimd::x86::sse2::assert__mm_storel_pd_movlps
    coresimd::x86::sse2::assert__mm_unpacklo_epi64_movlhps
    coresimd::x86::sse2::assert__mm_unpacklo_pd_movlhps
    coresimd::x86::sse41::assert__mm_extract_epi32_extractps
    coresimd::x86::sse41::assert__mm_extract_ps_extractps
    coresimd::x86::sse::assert__mm_movehl_ps_movhlps
    coresimd::x86::sse::assert__mm_movelh_ps_movlhps
    coresimd::x86::sse::assert__mm_storeh_pi_movhps
    coresimd::x86::sse::assert__mm_storel_pi_movlps
    coresimd::x86_64::sse41::assert__mm_extract_epi64_pextrq

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the coresimd assert_instr tests by searching for target_os = "windows", then compare the Windows calling convention and generated code with the Unix and BSD paths. Run the listed x86 and x86_64 assertion tests on a Windows target; done means the affected tests produce the expected instructions without temporary Windows-specific disabling.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.