зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1521249 part 2 - Make packed_simd compile with Rust 1.32 and later. r=glandium
This adds the Firefox-required build.rs hack and reverts the commit that added bitmasks in a way that depends on Rust 1.34 compiler internals. Depends on D20288 Differential Revision: https://phabricator.services.mozilla.com/D20289 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7d1d8a5c3c
Коммит
935b754f86
|
@ -22,5 +22,10 @@ git = "https://github.com/glandium/cc-rs"
|
|||
branch = "1.0.23-clang-cl-aarch64"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."https://github.com/rust-lang-nursery/packed_simd"]
|
||||
git = "https://github.com/hsivonen/packed_simd"
|
||||
branch = "rust_1_32"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = '@top_srcdir@/third_party/rust'
|
||||
|
|
|
@ -971,7 +971,7 @@ version = "0.8.16"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"packed_simd 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"packed_simd 0.3.3 (git+https://github.com/hsivonen/packed_simd?branch=rust_1_32)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2040,7 +2040,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "packed_simd"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
source = "git+https://github.com/hsivonen/packed_simd?branch=rust_1_32#3541e3818fdc7c2a24f87e3459151a4ce955a67a"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -3627,7 +3627,7 @@ dependencies = [
|
|||
"checksum ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2f0015e9e8e28ee20c581cfbfe47c650cedeb9ed0721090e0b7ebb10b9cdbcc2"
|
||||
"checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063"
|
||||
"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13"
|
||||
"checksum packed_simd 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a85ea9fc0d4ac0deb6fe7911d38786b32fc11119afd9e9d38b84ff691ce64220"
|
||||
"checksum packed_simd 0.3.3 (git+https://github.com/hsivonen/packed_simd?branch=rust_1_32)" = "<none>"
|
||||
"checksum parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "69376b761943787ebd5cc85a5bc95958651a22609c5c1c2b65de21786baec72b"
|
||||
"checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa"
|
||||
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
|
||||
|
|
|
@ -61,3 +61,4 @@ libudev-sys = { path = "dom/webauthn/libudev-sys" }
|
|||
serde_derive = { git = "https://github.com/servo/serde", branch = "deserialize_from_enums9" }
|
||||
winapi = { git = "https://github.com/froydnj/winapi-rs", branch = "aarch64" }
|
||||
cc = { git = "https://github.com/glandium/cc-rs", branch = "1.0.23-clang-cl-aarch64" }
|
||||
packed_simd = { git = "https://github.com/hsivonen/packed_simd", branch = "rust_1_32" }
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
matrix:
|
||||
allow_failures:
|
||||
# FIXME: https://github.com/rust-lang-nursery/packed_simd/issues/72
|
||||
- TARGET: i686-pc-windows-msvc
|
||||
- TARGET: i686-pc-windows-gnu
|
||||
- TARGET: x86_64-pc-windows-gnu
|
||||
fast_finish: true
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- TARGET: x86_64-pc-windows-msvc
|
||||
MSYSTEM: MINGW64
|
||||
NOVERIFY: "1"
|
||||
- TARGET: x86_64-pc-windows-msvc
|
||||
MSYSTEM: MINGW64
|
||||
RUSTFLAGS: "-C target-feature=+sse4.2"
|
||||
NOVERIFY: "1"
|
||||
- TARGET: x86_64-pc-windows-msvc
|
||||
MSYSTEM: MINGW64
|
||||
RUSTFLAGS: "-C target-feature=+avx"
|
||||
NOVERIFY: "1"
|
||||
- TARGET: x86_64-pc-windows-msvc
|
||||
MSYSTEM: MINGW64
|
||||
RUSTFLAGS: "-C target-feature=+avx2"
|
||||
NOVERIFY: "1"
|
||||
|
||||
- TARGET: i686-pc-windows-msvc
|
||||
MSYSTEM: MINGW32
|
||||
NOVERIFY: "1"
|
||||
- TARGET: i686-pc-windows-msvc
|
||||
MSYSTEM: MINGW32
|
||||
RUSTFLAGS: "-C target-feature=+sse4.2"
|
||||
NOVERIFY: "1"
|
||||
- TARGET: i686-pc-windows-msvc
|
||||
MSYSTEM: MINGW32
|
||||
RUSTFLAGS: "-C target-feature=+avx"
|
||||
NOVERIFY: "1"
|
||||
- TARGET: i686-pc-windows-msvc
|
||||
MSYSTEM: MINGW32
|
||||
RUSTFLAGS: "-C target-feature=+avx2"
|
||||
NOVERIFY: "1"
|
||||
|
||||
- TARGET: x86_64-pc-windows-gnu
|
||||
MSYSTEM: MINGW64
|
||||
|
||||
- TARGET: i686-pc-windows-gnu
|
||||
MSYSTEM: MINGW32
|
||||
- TARGET: x86_64-pc-windows-gnu
|
||||
MSYSTEM: MINGW64
|
||||
install:
|
||||
- ps: if (ls -r . -fi "*.rs" | sls "`t") { throw "Found tab character" }
|
||||
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" -FileName "rust-install.exe"
|
||||
- ps: .\rust-install.exe /VERYSILENT /NORESTART /DIR="C:\rust" | Out-Null
|
||||
- ps: $env:PATH="$env:PATH;C:\rust\bin"
|
||||
- set PATH=c:\msys64\%MSYSTEM%\bin;c:\msys64\usr\bin;%PATH%
|
||||
- rustc -vV
|
||||
- cargo -vV
|
||||
build: false
|
||||
test_script: bash -c "ci/run.sh"
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -0,0 +1,308 @@
|
|||
language: rust
|
||||
sudo: false
|
||||
rust: nightly
|
||||
|
||||
stages:
|
||||
- tools
|
||||
- linux-tier1
|
||||
- osx-tier1
|
||||
- osx-tier2
|
||||
- linux-tier2
|
||||
- android
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
# Android:
|
||||
- env: TARGET=x86_64-linux-android NOVERIFY=1
|
||||
name: "x86_64-unknown-linux-android + SSE2"
|
||||
stage: android
|
||||
- env: TARGET=arm-linux-androideabi
|
||||
name: "arm-linux-androideabi"
|
||||
stage: android
|
||||
- env: TARGET=arm-linux-androideabi RUSTFLAGS="-C target-feature=+v7,+neon"
|
||||
name: "arm-linux-androideabi + NEON"
|
||||
stage: android
|
||||
- env: TARGET=aarch64-linux-android
|
||||
name: "aarch64-unknown-linux-android"
|
||||
stage: android
|
||||
- env: TARGET=aarch64-linux-android RUSTFLAGS="-C target-feature=+neon"
|
||||
name: "aarch64-unknown-linux-android + NEON"
|
||||
stage: android
|
||||
- env: TARGET="thumbv7neon-linux-androideabi"
|
||||
name: "thumbv7neon-linux-androideabi"
|
||||
stage: android
|
||||
# Linux:
|
||||
- env: TARGET=i586-unknown-linux-gnu
|
||||
name: "i586-unknown-linux-gnu"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=i586-unknown-linux-gnu RUSTFLAGS="-C target-feature=+sse"
|
||||
name: "i586-unknown-linux-gnu + SSE"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=i586-unknown-linux-gnu RUSTFLAGS="-C target-feature=+sse2"
|
||||
name: "i586-unknown-linux-gnu + SSE2"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=i686-unknown-linux-gnu
|
||||
name: "i686-unknown-linux-gnu + SSE2"
|
||||
stage: linux-tier1
|
||||
- env: TARGET=i686-unknown-linux-gnu RUSTFLAGS="-C target-feature=+sse4.2"
|
||||
name: "i686-unknown-linux-gnu + SSE4.2"
|
||||
stage: linux-tier1
|
||||
- env: TARGET=i686-unknown-linux-gnu RUSTFLAGS="-C target-feature=+avx2"
|
||||
name: "i686-unknown-linux-gnu + AVX2"
|
||||
stage: linux-tier1
|
||||
- env: TARGET=x86_64-unknown-linux-gnu
|
||||
name: "x86_64-unknown-linux-gnu + SSE2"
|
||||
install: rustup component add rustfmt-preview
|
||||
stage: linux-tier1
|
||||
- env: TARGET=x86_64-unknown-linux-gnu RUSTFLAGS="-C target-feature=+sse4.2"
|
||||
name: "x86_64-unknown-linux-gnu + SSE4.2"
|
||||
install: rustup component add rustfmt-preview
|
||||
stage: linux-tier1
|
||||
- env: TARGET=x86_64-unknown-linux-gnu RUSTFLAGS="-C target-feature=+avx"
|
||||
name: "x86_64-unknown-linux-gnu + AVX"
|
||||
install: rustup component add rustfmt-preview
|
||||
stage: linux-tier1
|
||||
- env: TARGET=x86_64-unknown-linux-gnu RUSTFLAGS="-C target-feature=+avx2"
|
||||
name: "x86_64-unknown-linux-gnu + AVX2"
|
||||
install: rustup component add rustfmt-preview
|
||||
stage: linux-tier1
|
||||
- env: TARGET=x86_64-unknown-linux-gnu-emulated
|
||||
name: "Intel SDE + SSE2"
|
||||
install: true
|
||||
stage: linux-tier1
|
||||
- env: TARGET=x86_64-unknown-linux-gnu-emulated RUSTFLAGS="-C target-feature=+sse4.2"
|
||||
name: "Intel SDE + SSE4.2"
|
||||
install: true
|
||||
stage: linux-tier1
|
||||
- env: TARGET=x86_64-unknown-linux-gnu-emulated RUSTFLAGS="-C target-feature=+avx"
|
||||
name: "Intel SDE + AVX"
|
||||
install: true
|
||||
stage: linux-tier1
|
||||
- env: TARGET=x86_64-unknown-linux-gnu-emulated RUSTFLAGS="-C target-feature=+avx2"
|
||||
name: "Intel SDE + AVX2"
|
||||
install: true
|
||||
stage: linux-tier1
|
||||
- env: TARGET=x86_64-unknown-linux-gnu-emulated RUSTFLAGS="-C target-feature=+avx-512f"
|
||||
name: "Intel SDE + AVX-512"
|
||||
install: true
|
||||
stage: linux-tier1
|
||||
- env: TARGET=arm-unknown-linux-gnueabi
|
||||
name: "arm-unknown-linux-gnueabi"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=arm-unknown-linux-gnueabi RUSTFLAGS="-C target-feature=+v7,+neon"
|
||||
name: "arm-unknown-linux-gnueabi + NEON"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=arm-unknown-linux-gnueabihf
|
||||
name: "arm-unknown-linux-gnueabihf"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=arm-unknown-linux-gnueabihf RUSTFLAGS="-C target-feature=+v7,+neon"
|
||||
name: "arm-unknown-linux-gnueabihf + NEON"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=armv7-unknown-linux-gnueabihf
|
||||
name: "armv7-unknown-linux-gnueabihf"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=armv7-unknown-linux-gnueabihf RUSTFLAGS="-C target-feature=+neon"
|
||||
name: "armv7-unknown-linux-gnueabihf + NEON"
|
||||
stage: linux-tier2
|
||||
- env: TARGET="thumbv7neon-unknown-linux-gnueabihf"
|
||||
name: "thumbv7neon-unknown-linux-gnueabihf"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=aarch64-unknown-linux-gnu
|
||||
name: "aarch64-unknown-linux-gnu"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=aarch64-unknown-linux-gnu RUSTFLAGS="-C target-feature=+neon"
|
||||
name: "aarch64-unknown-linux-gnu + NEON"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=mips-unknown-linux-gnu
|
||||
name: "mips-unknown-linux-gnu"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=mipsel-unknown-linux-musl
|
||||
name: "mipsel-unknown-linux-musl"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=mips64-unknown-linux-gnuabi64
|
||||
name: "mips64-unknown-linux-gnuabi64"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=mips64el-unknown-linux-gnuabi64
|
||||
name: "mips64el-unknown-linux-gnuabi64"
|
||||
stage: linux-tier2
|
||||
# FIXME: https://github.com/rust-lang-nursery/packed_simd/issues/18
|
||||
# env: TARGET=mips64el-unknown-linux-gnuabi64 RUSTFLAGS="-C target-feature=+msa -C target-cpu=mips64r6"
|
||||
- env: TARGET=powerpc-unknown-linux-gnu
|
||||
name: "powerpc-unknown-linux-gnu"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=powerpc64-unknown-linux-gnu
|
||||
name: "powerpc64-unknown-linux-gnu"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=powerpc64le-unknown-linux-gnu
|
||||
name: "powerpc64le-unknown-linux-gnu"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=powerpc64le-unknown-linux-gnu RUSTFLAGS="-C target-feature=+altivec"
|
||||
name: "powerpc64le-unknown-linux-gnu + ALTIVEC"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=powerpc64le-unknown-linux-gnu RUSTFLAGS="-C target-feature=+vsx"
|
||||
name: "powerpc64le-unknown-linux-gnu + VSX"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=s390x-unknown-linux-gnu
|
||||
name: "s390x-unknown-linux-gnu"
|
||||
stage: linux-tier2
|
||||
- env: TARGET=sparc64-unknown-linux-gnu
|
||||
name: "sparc64-unknown-linux-gnu"
|
||||
stage: linux-tier2
|
||||
# WebAssembly:
|
||||
- env: TARGET=wasm32-unknown-unknown
|
||||
name: "wasm32-unknown-unknown"
|
||||
stage: osx-tier1 # For now
|
||||
# MacOSX:
|
||||
- os: osx
|
||||
env: TARGET=i686-apple-darwin
|
||||
name: "i686-apple-darwin + SSE2"
|
||||
script: ci/run.sh
|
||||
osx_image: xcode10
|
||||
stage: osx-tier1
|
||||
- os: osx
|
||||
env: TARGET=i686-apple-darwin RUSTFLAGS="-C target-feature=+sse4.2"
|
||||
name: "i686-apple-darwin + SSE4.2"
|
||||
script: ci/run.sh
|
||||
osx_image: xcode10
|
||||
stage: osx-tier1
|
||||
# Travis-CI OSX build bots do not support AVX2:
|
||||
- os: osx
|
||||
env: TARGET=i686-apple-darwin RUSTFLAGS="-C target-feature=+avx"
|
||||
name: "i686-apple-darwin + AVX"
|
||||
script: ci/run.sh
|
||||
osx_image: xcode10
|
||||
stage: osx-tier1
|
||||
- os: osx
|
||||
env: TARGET=x86_64-apple-darwin
|
||||
name: "x86_64-apple-darwin + SSE2"
|
||||
install: true
|
||||
script: ci/run.sh
|
||||
osx_image: xcode10
|
||||
stage: osx-tier1
|
||||
- os: osx
|
||||
env: TARGET=x86_64-apple-darwin RUSTFLAGS="-C target-feature=+sse4.2"
|
||||
name: "x86_64-apple-darwin + SSE4.2"
|
||||
install: true
|
||||
script: ci/run.sh
|
||||
osx_image: xcode10
|
||||
stage: osx-tier1
|
||||
# Travis-CI OSX build bots do not support AVX2:
|
||||
- os: osx
|
||||
env: TARGET=x86_64-apple-darwin RUSTFLAGS="-C target-feature=+avx"
|
||||
name: "x86_64-apple-darwin + AVX"
|
||||
install: true
|
||||
script: ci/run.sh
|
||||
osx_image: xcode10
|
||||
stage: osx-tier1
|
||||
# *BSDs:
|
||||
#- env: TARGET=i686-unknown-freebsd NORUN=1
|
||||
# script: ci/run.sh
|
||||
#- env: TARGET=x86_64-unknown-freebsd NORUN=1
|
||||
# script: ci/run.sh
|
||||
#- env: TARGET=x86_64-unknown-netbsd NORUN=1
|
||||
# script: ci/run.sh
|
||||
# Solaris:
|
||||
#- env: TARGET=x86_64-sun-solaris NORUN=1
|
||||
# script: ci/run.sh
|
||||
# iOS:
|
||||
- os: osx
|
||||
env: TARGET=i386-apple-ios
|
||||
name: "i386-apple-ios"
|
||||
script: ci/run.sh
|
||||
osx_image: xcode9.4
|
||||
stage: osx-tier2
|
||||
- os: osx
|
||||
env: TARGET=x86_64-apple-ios
|
||||
name: "x86_64-apple-ios + SSE2"
|
||||
script: ci/run.sh
|
||||
osx_image: xcode9.4
|
||||
stage: osx-tier2
|
||||
- os: osx
|
||||
env: TARGET=armv7-apple-ios NORUN=1
|
||||
name: "armv7-apple-ios [Build only]"
|
||||
script: ci/run.sh
|
||||
osx_image: xcode9.4
|
||||
stage: osx-tier2
|
||||
- os: osx
|
||||
env: TARGET=aarch64-apple-ios NORUN=1
|
||||
name: "aarch64-apple-ios [Build only]"
|
||||
script: ci/run.sh
|
||||
osx_image: xcode9.4
|
||||
stage: osx-tier2
|
||||
# BENCHMARKS:
|
||||
- name: "Benchmarks - x86_64-unknown-linux-gnu"
|
||||
install: TARGET=x86_64-unknown-linux-gnu ./ci/setup_benchmarks.sh
|
||||
script: PATH=$(pwd):$PATH NORUN=1 VERIFY=1 FEATURES=core_arch,ispc,sleef-sys ci/benchmark.sh
|
||||
stage: tools
|
||||
- name: "Benchmarks - x86_64-apple-darwin"
|
||||
install: TARGET=x86_64-apple-darwin ./ci/setup_benchmarks.sh
|
||||
script: PATH=$(pwd):$PATH NORUN=1 VERIFY=1 FEATURES=core_arch,ispc,sleef-sys ci/benchmark.sh
|
||||
os: osx
|
||||
osx_image: xcode9.4
|
||||
stage: tools
|
||||
# TOOLS:
|
||||
- name: "Documentation"
|
||||
install: cargo install mdbook
|
||||
script: ci/dox.sh
|
||||
stage: tools
|
||||
- name: "rustfmt"
|
||||
install: true
|
||||
before_script: rustup component add rustfmt-preview
|
||||
script: ci/all.sh check_fmt || true
|
||||
stage: tools
|
||||
- name: "clippy"
|
||||
install: true
|
||||
before_script: rustup component add clippy-preview
|
||||
script: ci/all.sh clippy
|
||||
stage: tools
|
||||
|
||||
allow_failures:
|
||||
# FIXME: ISPC cannot be found?
|
||||
- name: "Benchmarks - x86_64-apple-darwin"
|
||||
# FIXME: TBD
|
||||
- env: TARGET=powerpc-unknown-linux-gnu
|
||||
- env: TARGET=powerpc64-unknown-linux-gnu
|
||||
- env: TARGET=powerpc64le-unknown-linux-gnu
|
||||
- env: TARGET=powerpc64le-unknown-linux-gnu RUSTFLAGS="-C target-feature=+altivec"
|
||||
- env: TARGET=powerpc64le-unknown-linux-gnu RUSTFLAGS="-C target-feature=+vsx"
|
||||
#- env: TARGET=i686-unknown-freebsd NORUN=1
|
||||
#- env: TARGET=x86_64-unknown-freebsd NORUN=1
|
||||
#- env: TARGET=x86_64-unknown-netbsd NORUN=1
|
||||
#- env: TARGET=x86_64-sun-solaris NORUN=1
|
||||
|
||||
# FIXME: TBD
|
||||
- env: TARGET=arm-linux-androideabi
|
||||
- env: TARGET=arm-linux-androideabi RUSTFLAGS="-C target-feature=+v7,+neon"
|
||||
- env: TARGET=aarch64-linux-android
|
||||
- env: TARGET=aarch64-linux-android RUSTFLAGS="-C target-feature=+neon"
|
||||
|
||||
# FIXME: iOS
|
||||
# https://github.com/rust-lang-nursery/packed_simd/issues/26
|
||||
- env: TARGET=i386-apple-ios
|
||||
- env: TARGET=x86_64-apple-ios
|
||||
|
||||
# FIXME: https://github.com/rust-lang-nursery/packed_simd/issues/182
|
||||
- env: TARGET=arm-unknown-linux-gnueabi RUSTFLAGS="-C target-feature=+v7,+neon"
|
||||
- env: TARGET=arm-unknown-linux-gnueabihf RUSTFLAGS="-C target-feature=+v7,+neon"
|
||||
- env: TARGET=armv7-unknown-linux-gnueabihf RUSTFLAGS="-C target-feature=+neon"
|
||||
|
||||
# FIXME: https://github.com/rust-lang-nursery/packed_simd/issues/183
|
||||
- env: TARGET=wasm32-unknown-unknown
|
||||
|
||||
install: travis_retry rustup target add $TARGET
|
||||
before_script: cargo generate-lockfile
|
||||
script: travis_wait 50 ci/run-docker.sh
|
||||
after_script: sleep 5
|
||||
|
||||
env:
|
||||
global:
|
||||
secure: "lPHv7s6+AxQYNaFncycVFQt++Y1asQmMhOikQU1ztlP8CK7+hn2m98cg/euOJyzIOb2iJ3ZX4cGZkzw4lc59MQBByb1GtDbazQoUOzVDbVfe9BDD2f8JVoIFh1CMfjPKQ7Gg/rJqWlwrUlSd5GNxPCutKjY7qZhJuR6SQbJjlWaGN2Vd4fVCzKXz8fHRXgMEZS+d+CR4Nsrkb83J3Z4s5kSdJmhYxJ61AWjuzJVwUh4l3/HEYlSL5XXpuh5R2i7W16h1PlNdaTUgkZli1lHzO8+6Q8LzX9+XiLIEVX9lw3A2NdIKGz8E/+7Qs5oYOkwYhjROsDQxIK7xkSM30bQuN7cwMBybAVIyOPJkqXQ1dQyp83KSdsOj7JMyDDRvcEDLI6ehRlm5EcdH7YrReuboN81iUo0Sa7VsuUmgj5hjERCt9r30f9aWuitABai7vKRtjglg7Sp5CrEVPA4PQs6PqKCCRogoggbXJ/Z5Dyw/RZaXPeNR9+qIKN1Vjm9Gew1sRN2JK/3+vXTKtyJXH/uBxgJt4jQlbuShOJuF+BSfTF88sMe67a/357SSOIb4JkaCyd0flDCWYE8576kaHPlVVMT2peXee0LeRXm1e13nG3Na0t3LS/orJLPHOShNQGoDj7qAP5aEKggRya896JGwtvlaBHHTmSQh65G7cyNErZo="
|
||||
branches:
|
||||
only:
|
||||
- staging # bors r+
|
||||
- trying # bors try
|
||||
- master
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
|
@ -1,67 +1,42 @@
|
|||
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
||||
#
|
||||
# When uploading crates to the registry Cargo will automatically
|
||||
# "normalize" Cargo.toml files for maximal compatibility
|
||||
# with all versions of Cargo and also rewrite `path` dependencies
|
||||
# to registry (e.g. crates.io) dependencies
|
||||
#
|
||||
# If you believe there's an error in this file please file an
|
||||
# issue against the rust-lang/cargo repository. If you're
|
||||
# editing this file be aware that the upstream Cargo.toml
|
||||
# will likely look very different (and much more reasonable)
|
||||
|
||||
[package]
|
||||
edition = "2018"
|
||||
name = "packed_simd"
|
||||
version = "0.3.3"
|
||||
authors = ["Gonzalo Brito Gadeschi <gonzalobg88@gmail.com>"]
|
||||
build = "build.rs"
|
||||
description = "Portable Packed SIMD vectors"
|
||||
homepage = "https://github.com/rust-lang-nursery/packed_simd"
|
||||
documentation = "https://docs.rs/crate/packed_simd/"
|
||||
homepage = "https://github.com/rust-lang-nursery/packed_simd"
|
||||
repository = "https://github.com/rust-lang-nursery/packed_simd"
|
||||
keywords = ["simd", "vector", "portability"]
|
||||
categories = ["hardware-support", "concurrency", "no-std", "data-structures"]
|
||||
license = "MIT/Apache-2.0"
|
||||
repository = "https://github.com/rust-lang-nursery/packed_simd"
|
||||
[dependencies.cfg-if]
|
||||
version = "^0.1"
|
||||
build = "build.rs"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies.core_arch]
|
||||
version = "^0.1.3"
|
||||
optional = true
|
||||
[dev-dependencies.arrayvec]
|
||||
version = "^0.4"
|
||||
default-features = false
|
||||
[badges]
|
||||
appveyor = { repository = "rust-lang-nursery/packed_simd" }
|
||||
travis-ci = { repository = "rust-lang-nursery/packed_simd" }
|
||||
codecov = { repository = "rust-lang-nursery/packed_simd" }
|
||||
is-it-maintained-issue-resolution = { repository = "rust-lang-nursery/packed_simd" }
|
||||
is-it-maintained-open-issues = { repository = "rust-lang-nursery/packed_simd" }
|
||||
maintenance = { status = "experimental" }
|
||||
|
||||
[dev-dependencies.paste]
|
||||
version = "^0.1.3"
|
||||
[dependencies]
|
||||
cfg-if = "^0.1.6"
|
||||
core_arch = { version = "^0.1.3", optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
into_bits = []
|
||||
libcore_neon = []
|
||||
[target."cfg(target_arch = \"x86_64\")".dependencies.sleef-sys]
|
||||
|
||||
[dev-dependencies]
|
||||
paste = "^0.1.3"
|
||||
arrayvec = { version = "^0.4", default-features = false }
|
||||
|
||||
[target.'cfg(target_arch = "x86_64")'.dependencies.sleef-sys]
|
||||
version = "^0.1.2"
|
||||
optional = true
|
||||
[target.wasm32-unknown-unknown.dev-dependencies.wasm-bindgen]
|
||||
version = "=0.2.19"
|
||||
|
||||
[target.wasm32-unknown-unknown.dev-dependencies.wasm-bindgen-test]
|
||||
version = "=0.2.19"
|
||||
[badges.appveyor]
|
||||
repository = "rust-lang-nursery/packed_simd"
|
||||
|
||||
[badges.codecov]
|
||||
repository = "rust-lang-nursery/packed_simd"
|
||||
|
||||
[badges.is-it-maintained-issue-resolution]
|
||||
repository = "rust-lang-nursery/packed_simd"
|
||||
|
||||
[badges.is-it-maintained-open-issues]
|
||||
repository = "rust-lang-nursery/packed_simd"
|
||||
|
||||
[badges.maintenance]
|
||||
status = "experimental"
|
||||
|
||||
[badges.travis-ci]
|
||||
repository = "rust-lang-nursery/packed_simd"
|
||||
[target.wasm32-unknown-unknown.dev-dependencies]
|
||||
wasm-bindgen = "=0.2.19"
|
||||
wasm-bindgen-test = "=0.2.19"
|
|
@ -1,4 +1,5 @@
|
|||
fn main() {
|
||||
println!("cargo:rustc-env=RUSTC_BOOTSTRAP=1");
|
||||
let target = std::env::var("TARGET")
|
||||
.expect("TARGET environment variable not defined");
|
||||
if target.contains("neon") {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
set -ex
|
||||
|
||||
: ${1?"The all.sh script requires one argument."}
|
||||
: "${1?The all.sh script requires one argument.}"
|
||||
|
||||
op=$1
|
||||
|
||||
|
@ -54,11 +54,18 @@ $CMD
|
|||
for dir in examples/*/
|
||||
do
|
||||
dir=${dir%*/}
|
||||
cd ${dir%*/}
|
||||
$CMD
|
||||
cd -
|
||||
(
|
||||
cd "${dir%*/}"
|
||||
$CMD
|
||||
)
|
||||
done
|
||||
|
||||
cd verify/verify
|
||||
$CMD
|
||||
cd -
|
||||
(
|
||||
cd verify/verify
|
||||
$CMD
|
||||
)
|
||||
|
||||
(
|
||||
cd micro_benchmarks
|
||||
$CMD
|
||||
)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/book
|
|
@ -97,6 +97,7 @@ the full testsuite passes on the target.
|
|||
| `powerpc64le-unknown-linux-gnu` | ✗ | ✗ |
|
||||
| `s390x-unknown-linux-gnu` | ✓ | ✓* |
|
||||
| `sparc64-unknown-linux-gnu` | ✓ | ✓* |
|
||||
| `thumbv7neon-unknown-linux-gnueabihf` | ✓ | ✓ |
|
||||
| **MacOSX targets:** | **build** | **run** |
|
||||
| `x86_64-apple-darwin` | ✓ | ✓ |
|
||||
| `i686-apple-darwin` | ✓ | ✓ |
|
||||
|
@ -111,6 +112,7 @@ the full testsuite passes on the target.
|
|||
| `x86_64-linux-android` | ✓ | ✓ |
|
||||
| `arm-linux-androideabi` | ✓ | ✓ |
|
||||
| `aarch64-linux-android` | ✓ | ✗ |
|
||||
| `thumbv7neon-linux-androideabi` | ✓ | ✓ |
|
||||
| **iOS targets:** | **build** | **run** |
|
||||
| `i386-apple-ios` | ✓ | ✗ |
|
||||
| `x86_64-apple-ios` | ✓ | ✗ |
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
nightly
|
|
@ -1,7 +1,5 @@
|
|||
//! Implements the Simd<[T; N]> APIs
|
||||
|
||||
#[macro_use]
|
||||
mod bitmask;
|
||||
crate mod cast;
|
||||
#[macro_use]
|
||||
mod cmp;
|
||||
|
@ -41,7 +39,7 @@ crate mod into_bits;
|
|||
|
||||
macro_rules! impl_i {
|
||||
([$elem_ty:ident; $elem_n:expr]: $tuple_id:ident, $mask_ty:ident
|
||||
| $ielem_ty:ident, $ibitmask_ty:ident | $test_tt:tt | $($elem_ids:ident),*
|
||||
| $ielem_ty:ident | $test_tt:tt | $($elem_ids:ident),*
|
||||
| From: $($from_vec_ty:ident),* | $(#[$doc:meta])*) => {
|
||||
impl_minimal_iuf!([$elem_ty; $elem_n]: $tuple_id | $ielem_ty | $test_tt
|
||||
| $($elem_ids),* | $(#[$doc])*);
|
||||
|
@ -95,7 +93,6 @@ macro_rules! impl_i {
|
|||
);
|
||||
impl_cmp_partial_ord!([$elem_ty; $elem_n]: $tuple_id | $test_tt);
|
||||
impl_cmp_ord!([$elem_ty; $elem_n]: $tuple_id | $test_tt | (0, 1));
|
||||
impl_bitmask!($tuple_id | $ibitmask_ty | (-1, 0) | $test_tt);
|
||||
|
||||
test_select!($elem_ty, $mask_ty, $tuple_id, (1, 2) | $test_tt);
|
||||
test_cmp_partial_ord_int!([$elem_ty; $elem_n]: $tuple_id | $test_tt);
|
||||
|
@ -105,7 +102,7 @@ macro_rules! impl_i {
|
|||
|
||||
macro_rules! impl_u {
|
||||
([$elem_ty:ident; $elem_n:expr]: $tuple_id:ident, $mask_ty:ident
|
||||
| $ielem_ty:ident, $ibitmask_ty:ident | $test_tt:tt | $($elem_ids:ident),*
|
||||
| $ielem_ty:ident | $test_tt:tt | $($elem_ids:ident),*
|
||||
| From: $($from_vec_ty:ident),* | $(#[$doc:meta])*) => {
|
||||
impl_minimal_iuf!([$elem_ty; $elem_n]: $tuple_id | $ielem_ty | $test_tt
|
||||
| $($elem_ids),* | $(#[$doc])*);
|
||||
|
@ -158,8 +155,6 @@ macro_rules! impl_u {
|
|||
);
|
||||
impl_cmp_partial_ord!([$elem_ty; $elem_n]: $tuple_id | $test_tt);
|
||||
impl_cmp_ord!([$elem_ty; $elem_n]: $tuple_id | $test_tt | (0, 1));
|
||||
impl_bitmask!($tuple_id | $ibitmask_ty | ($ielem_ty::max_value(), 0) |
|
||||
$test_tt);
|
||||
|
||||
test_select!($elem_ty, $mask_ty, $tuple_id, (1, 2) | $test_tt);
|
||||
test_cmp_partial_ord_int!([$elem_ty; $elem_n]: $tuple_id | $test_tt);
|
||||
|
@ -227,8 +222,7 @@ macro_rules! impl_f {
|
|||
}
|
||||
|
||||
macro_rules! impl_m {
|
||||
([$elem_ty:ident; $elem_n:expr]: $tuple_id:ident
|
||||
| $ielem_ty:ident, $ibitmask_ty:ident
|
||||
([$elem_ty:ident; $elem_n:expr]: $tuple_id:ident | $ielem_ty:ident
|
||||
| $test_tt:tt | $($elem_ids:ident),* | From: $($from_vec_ty:ident),*
|
||||
| $(#[$doc:meta])*) => {
|
||||
impl_minimal_mask!(
|
||||
|
@ -271,7 +265,6 @@ macro_rules! impl_m {
|
|||
[$elem_ty; $elem_n]: $tuple_id | $test_tt | (false, true)
|
||||
);
|
||||
impl_shuffle1_dyn!([$elem_ty; $elem_n]: $tuple_id | $test_tt);
|
||||
impl_bitmask!($tuple_id | $ibitmask_ty | (true, false) | $test_tt);
|
||||
|
||||
test_cmp_partial_ord_mask!([$elem_ty; $elem_n]: $tuple_id | $test_tt);
|
||||
test_shuffle1_dyn_mask!([$elem_ty; $elem_n]: $tuple_id | $test_tt);
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
//! Bitmask API
|
||||
|
||||
macro_rules! impl_bitmask {
|
||||
($id:ident | $ibitmask_ty:ident | ($set:expr, $clear:expr)
|
||||
| $test_tt:tt) => {
|
||||
impl $id {
|
||||
/// Creates a bitmask with the MSB of each vector lane.
|
||||
///
|
||||
/// If the vector has less than 8 lanes, the bits that do not
|
||||
/// correspond to any vector lanes are cleared.
|
||||
#[inline]
|
||||
pub fn bitmask(self) -> $ibitmask_ty {
|
||||
unsafe { codegen::llvm::simd_bitmask(self.0) }
|
||||
}
|
||||
}
|
||||
|
||||
test_if! {
|
||||
$test_tt:
|
||||
paste::item! {
|
||||
#[cfg(not(any(
|
||||
// FIXME: https://github.com/rust-lang-nursery/packed_simd/issues/210
|
||||
all(target_arch = "mips", target_endian = "big"),
|
||||
all(target_arch = "mips64", target_endian = "big"),
|
||||
target_arch = "sparc64",
|
||||
target_arch = "s390x",
|
||||
)))]
|
||||
pub mod [<$id _bitmask>] {
|
||||
use super::*;
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)]
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
fn bitmask() {
|
||||
// clear all lanes
|
||||
let vec = $id::splat($clear as _);
|
||||
let bitmask: $ibitmask_ty = 0;
|
||||
assert_eq!(vec.bitmask(), bitmask);
|
||||
|
||||
// set even lanes
|
||||
let mut vec = $id::splat($clear as _);
|
||||
for i in 0..$id::lanes() {
|
||||
if i % 2 == 0 {
|
||||
vec = vec.replace(i, $set as _);
|
||||
}
|
||||
}
|
||||
// create bitmask with even lanes set:
|
||||
let mut bitmask: $ibitmask_ty = 0;
|
||||
for i in 0..$id::lanes() {
|
||||
if i % 2 == 0 {
|
||||
bitmask |= 1 << i;
|
||||
}
|
||||
}
|
||||
assert_eq!(vec.bitmask(), bitmask);
|
||||
|
||||
|
||||
// set odd lanes
|
||||
let mut vec = $id::splat($clear as _);
|
||||
for i in 0..$id::lanes() {
|
||||
if i % 2 != 0 {
|
||||
vec = vec.replace(i, $set as _);
|
||||
}
|
||||
}
|
||||
// create bitmask with odd lanes set:
|
||||
let mut bitmask: $ibitmask_ty = 0;
|
||||
for i in 0..$id::lanes() {
|
||||
if i % 2 != 0 {
|
||||
bitmask |= 1 << i;
|
||||
}
|
||||
}
|
||||
assert_eq!(vec.bitmask(), bitmask);
|
||||
|
||||
// set all lanes
|
||||
let vec = $id::splat($set as _);
|
||||
let mut bitmask: $ibitmask_ty = 0;
|
||||
for i in 0..$id::lanes() {
|
||||
bitmask |= 1 << i;
|
||||
}
|
||||
assert_eq!(vec.bitmask(), bitmask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
|
@ -1,11 +1,5 @@
|
|||
//! Implementation of `FromCast` and `IntoCast`.
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(
|
||||
clippy::module_name_repetitions,
|
||||
clippy::stutter
|
||||
)
|
||||
)]
|
||||
#![allow(clippy::module_name_repetitions)]
|
||||
|
||||
/// Numeric cast from `T` to `Self`.
|
||||
///
|
||||
|
|
|
@ -7,7 +7,7 @@ macro_rules! impl_cmp_partial_eq {
|
|||
($true:expr, $false:expr)
|
||||
) => {
|
||||
// FIXME: https://github.com/rust-lang-nursery/rust-clippy/issues/2892
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::partialeq_ne_impl))]
|
||||
#[allow(clippy::partialeq_ne_impl)]
|
||||
impl crate::cmp::PartialEq<$id> for $id {
|
||||
#[inline]
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
@ -20,7 +20,7 @@ macro_rules! impl_cmp_partial_eq {
|
|||
}
|
||||
|
||||
// FIXME: https://github.com/rust-lang-nursery/rust-clippy/issues/2892
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::partialeq_ne_impl))]
|
||||
#[allow(clippy::partialeq_ne_impl)]
|
||||
impl crate::cmp::PartialEq<LexicographicallyOrdered<$id>>
|
||||
for LexicographicallyOrdered<$id>
|
||||
{
|
||||
|
@ -34,12 +34,13 @@ macro_rules! impl_cmp_partial_eq {
|
|||
}
|
||||
}
|
||||
|
||||
test_if!{
|
||||
test_if! {
|
||||
$test_tt:
|
||||
paste::item! {
|
||||
pub mod [<$id _cmp_PartialEq>] {
|
||||
use super::*;
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)]
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
fn partial_eq() {
|
||||
let a = $id::splat($false);
|
||||
let b = $id::splat($true);
|
||||
|
|
|
@ -3,11 +3,10 @@
|
|||
macro_rules! impl_fmt_binary {
|
||||
([$elem_ty:ident; $elem_count:expr]: $id:ident | $test_tt:tt) => {
|
||||
impl crate::fmt::Binary for $id {
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy", allow(clippy::missing_inline_in_public_items)
|
||||
)]
|
||||
fn fmt(&self, f: &mut crate::fmt::Formatter<'_>)
|
||||
-> crate::fmt::Result {
|
||||
#[allow(clippy::missing_inline_in_public_items)]
|
||||
fn fmt(
|
||||
&self, f: &mut crate::fmt::Formatter<'_>,
|
||||
) -> crate::fmt::Result {
|
||||
write!(f, "{}(", stringify!($id))?;
|
||||
for i in 0..$elem_count {
|
||||
if i > 0 {
|
||||
|
@ -18,12 +17,13 @@ macro_rules! impl_fmt_binary {
|
|||
write!(f, ")")
|
||||
}
|
||||
}
|
||||
test_if!{
|
||||
test_if! {
|
||||
$test_tt:
|
||||
paste::item! {
|
||||
pub mod [<$id _fmt_binary>] {
|
||||
use super::*;
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)]
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
fn binary() {
|
||||
use arrayvec::{ArrayString,ArrayVec};
|
||||
type TinyString = ArrayString<[u8; 512]>;
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
|
||||
macro_rules! impl_fmt_debug_tests {
|
||||
([$elem_ty:ty; $elem_count:expr]: $id:ident | $test_tt:tt) => {
|
||||
test_if!{
|
||||
test_if! {
|
||||
$test_tt:
|
||||
paste::item! {
|
||||
pub mod [<$id _fmt_debug>] {
|
||||
use super::*;
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)]
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
fn debug() {
|
||||
use arrayvec::{ArrayString,ArrayVec};
|
||||
type TinyString = ArrayString<[u8; 512]>;
|
||||
|
@ -42,10 +43,7 @@ macro_rules! impl_fmt_debug_tests {
|
|||
macro_rules! impl_fmt_debug {
|
||||
([$elem_ty:ty; $elem_count:expr]: $id:ident | $test_tt:tt) => {
|
||||
impl crate::fmt::Debug for $id {
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(clippy::missing_inline_in_public_items)
|
||||
)]
|
||||
#[allow(clippy::missing_inline_in_public_items)]
|
||||
fn fmt(
|
||||
&self, f: &mut crate::fmt::Formatter<'_>,
|
||||
) -> crate::fmt::Result {
|
||||
|
|
|
@ -3,11 +3,10 @@
|
|||
macro_rules! impl_fmt_lower_hex {
|
||||
([$elem_ty:ident; $elem_count:expr]: $id:ident | $test_tt:tt) => {
|
||||
impl crate::fmt::LowerHex for $id {
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy", allow(clippy::missing_inline_in_public_items)
|
||||
)]
|
||||
fn fmt(&self, f: &mut crate::fmt::Formatter<'_>)
|
||||
-> crate::fmt::Result {
|
||||
#[allow(clippy::missing_inline_in_public_items)]
|
||||
fn fmt(
|
||||
&self, f: &mut crate::fmt::Formatter<'_>,
|
||||
) -> crate::fmt::Result {
|
||||
write!(f, "{}(", stringify!($id))?;
|
||||
for i in 0..$elem_count {
|
||||
if i > 0 {
|
||||
|
@ -18,12 +17,13 @@ macro_rules! impl_fmt_lower_hex {
|
|||
write!(f, ")")
|
||||
}
|
||||
}
|
||||
test_if!{
|
||||
test_if! {
|
||||
$test_tt:
|
||||
paste::item! {
|
||||
pub mod [<$id _fmt_lower_hex>] {
|
||||
use super::*;
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)]
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
fn lower_hex() {
|
||||
use arrayvec::{ArrayString,ArrayVec};
|
||||
type TinyString = ArrayString<[u8; 512]>;
|
||||
|
|
|
@ -3,11 +3,10 @@
|
|||
macro_rules! impl_fmt_octal {
|
||||
([$elem_ty:ident; $elem_count:expr]: $id:ident | $test_tt:tt) => {
|
||||
impl crate::fmt::Octal for $id {
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy", allow(clippy::missing_inline_in_public_items)
|
||||
)]
|
||||
fn fmt(&self, f: &mut crate::fmt::Formatter<'_>)
|
||||
-> crate::fmt::Result {
|
||||
#[allow(clippy::missing_inline_in_public_items)]
|
||||
fn fmt(
|
||||
&self, f: &mut crate::fmt::Formatter<'_>,
|
||||
) -> crate::fmt::Result {
|
||||
write!(f, "{}(", stringify!($id))?;
|
||||
for i in 0..$elem_count {
|
||||
if i > 0 {
|
||||
|
@ -18,12 +17,13 @@ macro_rules! impl_fmt_octal {
|
|||
write!(f, ")")
|
||||
}
|
||||
}
|
||||
test_if!{
|
||||
test_if! {
|
||||
$test_tt:
|
||||
paste::item! {
|
||||
pub mod [<$id _fmt_octal>] {
|
||||
use super::*;
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)]
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
fn octal_hex() {
|
||||
use arrayvec::{ArrayString,ArrayVec};
|
||||
type TinyString = ArrayString<[u8; 512]>;
|
||||
|
|
|
@ -3,11 +3,10 @@
|
|||
macro_rules! impl_fmt_upper_hex {
|
||||
([$elem_ty:ident; $elem_count:expr]: $id:ident | $test_tt:tt) => {
|
||||
impl crate::fmt::UpperHex for $id {
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy", allow(clippy::missing_inline_in_public_items)
|
||||
)]
|
||||
fn fmt(&self, f: &mut crate::fmt::Formatter<'_>)
|
||||
-> crate::fmt::Result {
|
||||
#[allow(clippy::missing_inline_in_public_items)]
|
||||
fn fmt(
|
||||
&self, f: &mut crate::fmt::Formatter<'_>,
|
||||
) -> crate::fmt::Result {
|
||||
write!(f, "{}(", stringify!($id))?;
|
||||
for i in 0..$elem_count {
|
||||
if i > 0 {
|
||||
|
@ -18,12 +17,13 @@ macro_rules! impl_fmt_upper_hex {
|
|||
write!(f, ")")
|
||||
}
|
||||
}
|
||||
test_if!{
|
||||
test_if! {
|
||||
$test_tt:
|
||||
paste::item! {
|
||||
pub mod [<$id _fmt_upper_hex>] {
|
||||
use super::*;
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)]
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
fn upper_hex() {
|
||||
use arrayvec::{ArrayString,ArrayVec};
|
||||
type TinyString = ArrayString<[u8; 512]>;
|
||||
|
|
|
@ -18,8 +18,7 @@ macro_rules! impl_minimal_iuf {
|
|||
/// Creates a new instance with each vector elements initialized
|
||||
/// with the provided values.
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::too_many_arguments))]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub const fn new($($elem_name: $elem_ty),*) -> Self {
|
||||
Simd(codegen::$id($($elem_name as $ielem_ty),*))
|
||||
}
|
||||
|
|
|
@ -16,16 +16,14 @@ macro_rules! impl_minimal_mask {
|
|||
/// Creates a new instance with each vector elements initialized
|
||||
/// with the provided values.
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::too_many_arguments))]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub const fn new($($elem_name: bool),*) -> Self {
|
||||
Simd(codegen::$id($(Self::bool_to_internal($elem_name)),*))
|
||||
}
|
||||
|
||||
/// Converts a boolean type into the type of the vector lanes.
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::indexing_slicing))]
|
||||
#[allow(clippy::indexing_slicing)]
|
||||
const fn bool_to_internal(x: bool) -> $ielem_ty {
|
||||
[0 as $ielem_ty, !(0 as $ielem_ty)][x as usize]
|
||||
}
|
||||
|
|
|
@ -19,8 +19,7 @@ macro_rules! impl_minimal_p {
|
|||
/// Creates a new instance with each vector elements initialized
|
||||
/// with the provided values.
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::too_many_arguments))]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub const fn new($($elem_name: $elem_ty),*) -> Self {
|
||||
Simd(codegen::$id($($elem_name),*))
|
||||
}
|
||||
|
@ -89,8 +88,7 @@ macro_rules! impl_minimal_p {
|
|||
it returns a new vector with the value at `index` \
|
||||
replaced by `new_value`d"
|
||||
]
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::not_unsafe_ptr_arg_deref))]
|
||||
#[allow(clippy::not_unsafe_ptr_arg_deref)]
|
||||
pub fn replace(self, index: usize, new_value: $elem_ty) -> Self {
|
||||
assert!(index < $elem_count);
|
||||
unsafe { self.replace_unchecked(index, new_value) }
|
||||
|
@ -210,8 +208,7 @@ macro_rules! impl_minimal_p {
|
|||
}
|
||||
|
||||
impl<T> crate::fmt::Debug for $id<T> {
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::missing_inline_in_public_items))]
|
||||
#[allow(clippy::missing_inline_in_public_items)]
|
||||
fn fmt(&self, f: &mut crate::fmt::Formatter<'_>)
|
||||
-> crate::fmt::Result {
|
||||
write!(
|
||||
|
@ -424,7 +421,7 @@ macro_rules! impl_minimal_p {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::partialeq_ne_impl))]
|
||||
#[allow(clippy::partialeq_ne_impl)]
|
||||
impl<T> crate::cmp::PartialEq<$id<T>> for $id<T> {
|
||||
#[inline]
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
@ -437,7 +434,7 @@ macro_rules! impl_minimal_p {
|
|||
}
|
||||
|
||||
// FIXME: https://github.com/rust-lang-nursery/rust-clippy/issues/2892
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::partialeq_ne_impl))]
|
||||
#[allow(clippy::partialeq_ne_impl)]
|
||||
impl<T> crate::cmp::PartialEq<LexicographicallyOrdered<$id<T>>>
|
||||
for LexicographicallyOrdered<$id<T>>
|
||||
{
|
||||
|
@ -621,8 +618,7 @@ macro_rules! impl_minimal_p {
|
|||
#[inline]
|
||||
pub unsafe fn from_slice_aligned_unchecked(slice: &[$elem_ty])
|
||||
-> Self {
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::cast_ptr_alignment))]
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
*(slice.get_unchecked(0) as *const $elem_ty as *const Self)
|
||||
}
|
||||
|
||||
|
@ -840,8 +836,7 @@ macro_rules! impl_minimal_p {
|
|||
pub unsafe fn write_to_slice_aligned_unchecked(
|
||||
self, slice: &mut [$elem_ty],
|
||||
) {
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::cast_ptr_alignment))]
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
*(slice.get_unchecked_mut(0) as *mut $elem_ty as *mut Self) =
|
||||
self;
|
||||
}
|
||||
|
@ -1225,8 +1220,7 @@ macro_rules! impl_minimal_p {
|
|||
/// are difficult to satisfy. The only advantage of this method is
|
||||
/// that it enables more aggressive compiler optimizations.
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::should_implement_trait))]
|
||||
#[allow(clippy::should_implement_trait)]
|
||||
pub unsafe fn add(self, count: $usize_ty) -> Self {
|
||||
self.offset(count.cast())
|
||||
}
|
||||
|
@ -1271,8 +1265,7 @@ macro_rules! impl_minimal_p {
|
|||
/// are difficult to satisfy. The only advantage of this method is
|
||||
/// that it enables more aggressive compiler optimizations.
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::should_implement_trait))]
|
||||
#[allow(clippy::should_implement_trait)]
|
||||
pub unsafe fn sub(self, count: $usize_ty) -> Self {
|
||||
let x: $isize_ty = count.cast();
|
||||
// note: - is currently wrapping_neg
|
||||
|
|
|
@ -20,12 +20,13 @@ macro_rules! impl_reduction_mask {
|
|||
}
|
||||
}
|
||||
|
||||
test_if!{
|
||||
test_if! {
|
||||
$test_tt:
|
||||
paste::item! {
|
||||
pub mod [<$id _reduction>] {
|
||||
use super::*;
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)]
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
fn all() {
|
||||
let a = $id::splat(true);
|
||||
assert!(a.all());
|
||||
|
@ -43,7 +44,8 @@ macro_rules! impl_reduction_mask {
|
|||
}
|
||||
}
|
||||
}
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)]
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
fn any() {
|
||||
let a = $id::splat(true);
|
||||
assert!(a.any());
|
||||
|
@ -61,7 +63,8 @@ macro_rules! impl_reduction_mask {
|
|||
}
|
||||
}
|
||||
}
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
#[cfg_attr(not(target_arch = "wasm32"), test)]
|
||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
|
||||
fn none() {
|
||||
let a = $id::splat(true);
|
||||
assert!(!a.none());
|
||||
|
|
|
@ -53,10 +53,7 @@ macro_rules! impl_slice_from_slice {
|
|||
0
|
||||
);
|
||||
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(clippy::cast_ptr_alignment)
|
||||
)]
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
*(target_ptr as *const Self)
|
||||
}
|
||||
|
||||
|
|
|
@ -55,20 +55,10 @@ macro_rules! impl_slice_write_to_slice {
|
|||
0
|
||||
);
|
||||
|
||||
#[cfg_attr(feature = "cargo-clippy",
|
||||
allow(clippy::cast_ptr_alignment))]
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(clippy::cast_ptr_alignment)
|
||||
)]
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(clippy::cast_ptr_alignment)
|
||||
)]
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(clippy::cast_ptr_alignment)
|
||||
)]
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
*(target_ptr as *mut Self) = self;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,6 +96,4 @@ extern "platform-intrinsic" {
|
|||
|
||||
crate fn simd_gather<T, P, M>(value: T, pointers: P, mask: M) -> T;
|
||||
crate fn simd_scatter<T, P, M>(value: T, pointers: P, mask: M);
|
||||
|
||||
crate fn simd_bitmask<T, U>(value: T) -> U;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//! Vertical floating-point math operations.
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::useless_transmute))]
|
||||
#![allow(clippy::useless_transmute)]
|
||||
|
||||
#[macro_use]
|
||||
crate mod macros;
|
||||
|
|
|
@ -24,7 +24,7 @@ macro_rules! impl_swap_bytes {
|
|||
$(
|
||||
impl SwapBytes for $id {
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::useless_transmute))]
|
||||
#[allow(clippy::useless_transmute)]
|
||||
fn swap_bytes(self) -> Self {
|
||||
unsafe {
|
||||
let bytes: u8x4 = crate::mem::transmute(self);
|
||||
|
@ -39,7 +39,7 @@ macro_rules! impl_swap_bytes {
|
|||
$(
|
||||
impl SwapBytes for $id {
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::useless_transmute))]
|
||||
#[allow(clippy::useless_transmute)]
|
||||
fn swap_bytes(self) -> Self {
|
||||
unsafe {
|
||||
let bytes: u8x8 = crate::mem::transmute(self);
|
||||
|
@ -56,7 +56,7 @@ macro_rules! impl_swap_bytes {
|
|||
$(
|
||||
impl SwapBytes for $id {
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::useless_transmute))]
|
||||
#[allow(clippy::useless_transmute)]
|
||||
fn swap_bytes(self) -> Self {
|
||||
unsafe {
|
||||
let bytes: u8x16 = crate::mem::transmute(self);
|
||||
|
@ -74,7 +74,7 @@ macro_rules! impl_swap_bytes {
|
|||
$(
|
||||
impl SwapBytes for $id {
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::useless_transmute))]
|
||||
#[allow(clippy::useless_transmute)]
|
||||
fn swap_bytes(self) -> Self {
|
||||
unsafe {
|
||||
let bytes: u8x32 = crate::mem::transmute(self);
|
||||
|
@ -94,7 +94,7 @@ macro_rules! impl_swap_bytes {
|
|||
$(
|
||||
impl SwapBytes for $id {
|
||||
#[inline]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::useless_transmute))]
|
||||
#[allow(clippy::useless_transmute)]
|
||||
fn swap_bytes(self) -> Self {
|
||||
unsafe {
|
||||
let bytes: u8x64 = crate::mem::transmute(self);
|
||||
|
|
|
@ -214,25 +214,17 @@
|
|||
crate_visibility_modifier,
|
||||
custom_inner_attributes
|
||||
)]
|
||||
#![allow(non_camel_case_types, non_snake_case)]
|
||||
#![allow(non_camel_case_types, non_snake_case,
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_lossless,
|
||||
clippy::cast_possible_wrap,
|
||||
clippy::cast_precision_loss,
|
||||
// This lint is currently broken for generic code
|
||||
// See https://github.com/rust-lang/rust-clippy/issues/3410
|
||||
clippy::use_self
|
||||
)]
|
||||
#![cfg_attr(test, feature(hashmap_internals))]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_lossless,
|
||||
clippy::cast_possible_wrap,
|
||||
clippy::cast_precision_loss,
|
||||
// This lint is currently broken for generic code
|
||||
// See https://github.com/rust-lang/rust-clippy/issues/3410
|
||||
clippy::use_self
|
||||
)
|
||||
)]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
deny(clippy::missing_inline_in_public_items)
|
||||
)]
|
||||
#![deny(warnings, rust_2018_idioms)]
|
||||
#![deny(warnings, rust_2018_idioms, clippy::missing_inline_in_public_items)]
|
||||
#![no_std]
|
||||
|
||||
use cfg_if::cfg_if;
|
||||
|
@ -288,10 +280,7 @@ pub struct Simd<A: sealed::SimdArray>(
|
|||
/// and/or `Ord` traits.
|
||||
#[repr(transparent)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(clippy::missing_inline_in_public_items)
|
||||
)]
|
||||
#[allow(clippy::missing_inline_in_public_items)]
|
||||
pub struct LexicographicallyOrdered<T>(T);
|
||||
|
||||
mod masks;
|
||||
|
|
|
@ -36,7 +36,7 @@ macro_rules! impl_mask_ty {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::partialeq_ne_impl))]
|
||||
#[allow(clippy::partialeq_ne_impl)]
|
||||
impl PartialEq<$id> for $id {
|
||||
#[inline]
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
|
|
@ -3,40 +3,40 @@
|
|||
|
||||
use crate::*;
|
||||
|
||||
impl_i!([i8; 16]: i8x16, m8x16 | i8, u16 | test_v128 |
|
||||
impl_i!([i8; 16]: i8x16, m8x16 | i8 | test_v128 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15 |
|
||||
From: |
|
||||
/// A 128-bit vector with 16 `i8` lanes.
|
||||
);
|
||||
impl_u!([u8; 16]: u8x16, m8x16 | u8, u16 | test_v128 |
|
||||
impl_u!([u8; 16]: u8x16, m8x16 | u8 | test_v128 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15 |
|
||||
From: |
|
||||
/// A 128-bit vector with 16 `u8` lanes.
|
||||
);
|
||||
impl_m!([m8; 16]: m8x16 | i8, u16 | test_v128 |
|
||||
impl_m!([m8; 16]: m8x16 | i8 | test_v128 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15 |
|
||||
From: m16x16 |
|
||||
/// A 128-bit vector mask with 16 `m8` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i16; 8]: i16x8, m16x8 | i16, u8 | test_v128 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_i!([i16; 8]: i16x8, m16x8 | i16 | test_v128 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: i8x8, u8x8 |
|
||||
/// A 128-bit vector with 8 `i16` lanes.
|
||||
);
|
||||
impl_u!([u16; 8]: u16x8, m16x8 | u16, u8 | test_v128 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_u!([u16; 8]: u16x8, m16x8 | u16| test_v128 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: u8x8 |
|
||||
/// A 128-bit vector with 8 `u16` lanes.
|
||||
);
|
||||
impl_m!([m16; 8]: m16x8 | i16, u8 | test_v128 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_m!([m16; 8]: m16x8 | i16 | test_v128 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: m8x8, m32x8 |
|
||||
/// A 128-bit vector mask with 8 `m16` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i32; 4]: i32x4, m32x4 | i32, u8 | test_v128 | x0, x1, x2, x3 |
|
||||
impl_i!([i32; 4]: i32x4, m32x4 | i32 | test_v128 | x0, x1, x2, x3 |
|
||||
From: i8x4, u8x4, i16x4, u16x4 |
|
||||
/// A 128-bit vector with 4 `i32` lanes.
|
||||
);
|
||||
impl_u!([u32; 4]: u32x4, m32x4 | u32, u8 | test_v128 | x0, x1, x2, x3 |
|
||||
impl_u!([u32; 4]: u32x4, m32x4 | u32| test_v128 | x0, x1, x2, x3 |
|
||||
From: u8x4, u16x4 |
|
||||
/// A 128-bit vector with 4 `u32` lanes.
|
||||
);
|
||||
|
@ -44,16 +44,16 @@ impl_f!([f32; 4]: f32x4, m32x4 | f32 | test_v128 | x0, x1, x2, x3 |
|
|||
From: i8x4, u8x4, i16x4, u16x4 |
|
||||
/// A 128-bit vector with 4 `f32` lanes.
|
||||
);
|
||||
impl_m!([m32; 4]: m32x4 | i32, u8 | test_v128 | x0, x1, x2, x3 |
|
||||
impl_m!([m32; 4]: m32x4 | i32 | test_v128 | x0, x1, x2, x3 |
|
||||
From: m8x4, m16x4, m64x4 |
|
||||
/// A 128-bit vector mask with 4 `m32` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i64; 2]: i64x2, m64x2 | i64, u8 | test_v128 | x0, x1 |
|
||||
impl_i!([i64; 2]: i64x2, m64x2 | i64 | test_v128 | x0, x1 |
|
||||
From: i8x2, u8x2, i16x2, u16x2, i32x2, u32x2 |
|
||||
/// A 128-bit vector with 2 `i64` lanes.
|
||||
);
|
||||
impl_u!([u64; 2]: u64x2, m64x2 | u64, u8 | test_v128 | x0, x1 |
|
||||
impl_u!([u64; 2]: u64x2, m64x2 | u64 | test_v128 | x0, x1 |
|
||||
From: u8x2, u16x2, u32x2 |
|
||||
/// A 128-bit vector with 2 `u64` lanes.
|
||||
);
|
||||
|
@ -61,20 +61,20 @@ impl_f!([f64; 2]: f64x2, m64x2 | f64 | test_v128 | x0, x1 |
|
|||
From: i8x2, u8x2, i16x2, u16x2, i32x2, u32x2, f32x2 |
|
||||
/// A 128-bit vector with 2 `f64` lanes.
|
||||
);
|
||||
impl_m!([m64; 2]: m64x2 | i64, u8 | test_v128 | x0, x1 |
|
||||
impl_m!([m64; 2]: m64x2 | i64 | test_v128 | x0, x1 |
|
||||
From: m8x2, m16x2, m32x2, m128x2 |
|
||||
/// A 128-bit vector mask with 2 `m64` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i128; 1]: i128x1, m128x1 | i128, u8 | test_v128 | x0 |
|
||||
impl_i!([i128; 1]: i128x1, m128x1 | i128 | test_v128 | x0 |
|
||||
From: /*i8x1, u8x1, i16x1, u16x1, i32x1, u32x1, i64x1, u64x1 */ | // FIXME: unary small vector types
|
||||
/// A 128-bit vector with 1 `i128` lane.
|
||||
);
|
||||
impl_u!([u128; 1]: u128x1, m128x1 | u128, u8 | test_v128 | x0 |
|
||||
impl_u!([u128; 1]: u128x1, m128x1 | u128 | test_v128 | x0 |
|
||||
From: /*u8x1, u16x1, u32x1, u64x1 */ | // FIXME: unary small vector types
|
||||
/// A 128-bit vector with 1 `u128` lane.
|
||||
);
|
||||
impl_m!([m128; 1]: m128x1 | i128, u8 | test_v128 | x0 |
|
||||
impl_m!([m128; 1]: m128x1 | i128 | test_v128 | x0 |
|
||||
From: /*m8x1, m16x1, m32x1, m64x1 */ | // FIXME: unary small vector types
|
||||
/// A 128-bit vector mask with 1 `m128` lane.
|
||||
);
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
use crate::*;
|
||||
|
||||
impl_i!([i8; 2]: i8x2, m8x2 | i8, u8 | test_v16 | x0, x1 |
|
||||
impl_i!([i8; 2]: i8x2, m8x2 | i8 | test_v16 | x0, x1 |
|
||||
From: |
|
||||
/// A 16-bit vector with 2 `i8` lanes.
|
||||
);
|
||||
impl_u!([u8; 2]: u8x2, m8x2 | u8, u8 | test_v16 | x0, x1 |
|
||||
impl_u!([u8; 2]: u8x2, m8x2 | u8 | test_v16 | x0, x1 |
|
||||
From: |
|
||||
/// A 16-bit vector with 2 `u8` lanes.
|
||||
);
|
||||
impl_m!([m8; 2]: m8x2 | i8, u8 | test_v16 | x0, x1 |
|
||||
impl_m!([m8; 2]: m8x2 | i8 | test_v16 | x0, x1 |
|
||||
From: m16x2, m32x2, m64x2, m128x2 |
|
||||
/// A 16-bit vector mask with 2 `m8` lanes.
|
||||
);
|
||||
|
|
|
@ -3,46 +3,46 @@
|
|||
|
||||
use crate::*;
|
||||
|
||||
impl_i!([i8; 32]: i8x32, m8x32 | i8, u32 | test_v256 |
|
||||
impl_i!([i8; 32]: i8x32, m8x32 | i8 | test_v256 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15,
|
||||
x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31 |
|
||||
From: |
|
||||
/// A 256-bit vector with 32 `i8` lanes.
|
||||
);
|
||||
impl_u!([u8; 32]: u8x32, m8x32 | u8, u32 | test_v256 |
|
||||
impl_u!([u8; 32]: u8x32, m8x32 | u8 | test_v256 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15,
|
||||
x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31 |
|
||||
From: |
|
||||
/// A 256-bit vector with 32 `u8` lanes.
|
||||
);
|
||||
impl_m!([m8; 32]: m8x32 | i8, u32 | test_v256 |
|
||||
impl_m!([m8; 32]: m8x32 | i8 | test_v256 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15,
|
||||
x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31 |
|
||||
From: |
|
||||
/// A 256-bit vector mask with 32 `m8` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i16; 16]: i16x16, m16x16 | i16, u16 | test_v256 |
|
||||
impl_i!([i16; 16]: i16x16, m16x16 | i16 | test_v256 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15 |
|
||||
From: i8x16, u8x16 |
|
||||
/// A 256-bit vector with 16 `i16` lanes.
|
||||
);
|
||||
impl_u!([u16; 16]: u16x16, m16x16 | u16, u16 | test_v256 |
|
||||
impl_u!([u16; 16]: u16x16, m16x16 | u16 | test_v256 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15 |
|
||||
From: u8x16 |
|
||||
/// A 256-bit vector with 16 `u16` lanes.
|
||||
);
|
||||
impl_m!([m16; 16]: m16x16 | i16, u16 | test_v256 |
|
||||
impl_m!([m16; 16]: m16x16 | i16 | test_v256 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15 |
|
||||
From: m8x16 |
|
||||
/// A 256-bit vector mask with 16 `m16` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i32; 8]: i32x8, m32x8 | i32, u8 | test_v256 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_i!([i32; 8]: i32x8, m32x8 | i32 | test_v256 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: i8x8, u8x8, i16x8, u16x8 |
|
||||
/// A 256-bit vector with 8 `i32` lanes.
|
||||
);
|
||||
impl_u!([u32; 8]: u32x8, m32x8 | u32, u8 | test_v256 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_u!([u32; 8]: u32x8, m32x8 | u32 | test_v256 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: u8x8, u16x8 |
|
||||
/// A 256-bit vector with 8 `u32` lanes.
|
||||
);
|
||||
|
@ -50,16 +50,16 @@ impl_f!([f32; 8]: f32x8, m32x8 | f32 | test_v256 | x0, x1, x2, x3, x4, x5, x6, x
|
|||
From: i8x8, u8x8, i16x8, u16x8 |
|
||||
/// A 256-bit vector with 8 `f32` lanes.
|
||||
);
|
||||
impl_m!([m32; 8]: m32x8 | i32, u8 | test_v256 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_m!([m32; 8]: m32x8 | i32 | test_v256 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: m8x8, m16x8 |
|
||||
/// A 256-bit vector mask with 8 `m32` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i64; 4]: i64x4, m64x4 | i64, u8 | test_v256 | x0, x1, x2, x3 |
|
||||
impl_i!([i64; 4]: i64x4, m64x4 | i64 | test_v256 | x0, x1, x2, x3 |
|
||||
From: i8x4, u8x4, i16x4, u16x4, i32x4, u32x4 |
|
||||
/// A 256-bit vector with 4 `i64` lanes.
|
||||
);
|
||||
impl_u!([u64; 4]: u64x4, m64x4 | u64, u8 | test_v256 | x0, x1, x2, x3 |
|
||||
impl_u!([u64; 4]: u64x4, m64x4 | u64 | test_v256 | x0, x1, x2, x3 |
|
||||
From: u8x4, u16x4, u32x4 |
|
||||
/// A 256-bit vector with 4 `u64` lanes.
|
||||
);
|
||||
|
@ -67,20 +67,20 @@ impl_f!([f64; 4]: f64x4, m64x4 | f64 | test_v256 | x0, x1, x2, x3 |
|
|||
From: i8x4, u8x4, i16x4, u16x4, i32x4, u32x4, f32x4 |
|
||||
/// A 256-bit vector with 4 `f64` lanes.
|
||||
);
|
||||
impl_m!([m64; 4]: m64x4 | i64, u8 | test_v256 | x0, x1, x2, x3 |
|
||||
impl_m!([m64; 4]: m64x4 | i64 | test_v256 | x0, x1, x2, x3 |
|
||||
From: m8x4, m16x4, m32x4 |
|
||||
/// A 256-bit vector mask with 4 `m64` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i128; 2]: i128x2, m128x2 | i128, u8 | test_v256 | x0, x1 |
|
||||
impl_i!([i128; 2]: i128x2, m128x2 | i128 | test_v256 | x0, x1 |
|
||||
From: i8x2, u8x2, i16x2, u16x2, i32x2, u32x2, i64x2, u64x2 |
|
||||
/// A 256-bit vector with 2 `i128` lanes.
|
||||
);
|
||||
impl_u!([u128; 2]: u128x2, m128x2 | u128, u8 | test_v256 | x0, x1 |
|
||||
impl_u!([u128; 2]: u128x2, m128x2 | u128 | test_v256 | x0, x1 |
|
||||
From: u8x2, u16x2, u32x2, u64x2 |
|
||||
/// A 256-bit vector with 2 `u128` lanes.
|
||||
);
|
||||
impl_m!([m128; 2]: m128x2 | i128, u8 | test_v256 | x0, x1 |
|
||||
impl_m!([m128; 2]: m128x2 | i128 | test_v256 | x0, x1 |
|
||||
From: m8x2, m16x2, m32x2, m64x2 |
|
||||
/// A 256-bit vector mask with 2 `m128` lanes.
|
||||
);
|
||||
|
|
|
@ -2,28 +2,28 @@
|
|||
|
||||
use crate::*;
|
||||
|
||||
impl_i!([i8; 4]: i8x4, m8x4 | i8, u8 | test_v32 | x0, x1, x2, x3 |
|
||||
impl_i!([i8; 4]: i8x4, m8x4 | i8 | test_v32 | x0, x1, x2, x3 |
|
||||
From: |
|
||||
/// A 32-bit vector with 4 `i8` lanes.
|
||||
);
|
||||
impl_u!([u8; 4]: u8x4, m8x4 | u8, u8 | test_v32 | x0, x1, x2, x3 |
|
||||
impl_u!([u8; 4]: u8x4, m8x4 | u8 | test_v32 | x0, x1, x2, x3 |
|
||||
From: |
|
||||
/// A 32-bit vector with 4 `u8` lanes.
|
||||
);
|
||||
impl_m!([m8; 4]: m8x4 | i8, u8 | test_v32 | x0, x1, x2, x3 |
|
||||
impl_m!([m8; 4]: m8x4 | i8 | test_v32 | x0, x1, x2, x3 |
|
||||
From: m16x4, m32x4, m64x4 |
|
||||
/// A 32-bit vector mask with 4 `m8` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i16; 2]: i16x2, m16x2 | i16, u8 | test_v32 | x0, x1 |
|
||||
impl_i!([i16; 2]: i16x2, m16x2 | i16 | test_v32 | x0, x1 |
|
||||
From: i8x2, u8x2 |
|
||||
/// A 32-bit vector with 2 `i16` lanes.
|
||||
);
|
||||
impl_u!([u16; 2]: u16x2, m16x2 | u16, u8 | test_v32 | x0, x1 |
|
||||
impl_u!([u16; 2]: u16x2, m16x2 | u16 | test_v32 | x0, x1 |
|
||||
From: u8x2 |
|
||||
/// A 32-bit vector with 2 `u16` lanes.
|
||||
);
|
||||
impl_m!([m16; 2]: m16x2 | i16, u8 | test_v32 | x0, x1 |
|
||||
impl_m!([m16; 2]: m16x2 | i16 | test_v32 | x0, x1 |
|
||||
From: m8x2, m32x2, m64x2, m128x2 |
|
||||
/// A 32-bit vector mask with 2 `m16` lanes.
|
||||
);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
use crate::*;
|
||||
|
||||
impl_i!([i8; 64]: i8x64, m8x64 | i8, u64 | test_v512 |
|
||||
impl_i!([i8; 64]: i8x64, m8x64 | i8 | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15,
|
||||
x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31,
|
||||
x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47,
|
||||
|
@ -11,7 +11,7 @@ impl_i!([i8; 64]: i8x64, m8x64 | i8, u64 | test_v512 |
|
|||
From: |
|
||||
/// A 512-bit vector with 64 `i8` lanes.
|
||||
);
|
||||
impl_u!([u8; 64]: u8x64, m8x64 | u8, u64 | test_v512 |
|
||||
impl_u!([u8; 64]: u8x64, m8x64 | u8 | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15,
|
||||
x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31,
|
||||
x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47,
|
||||
|
@ -19,7 +19,7 @@ impl_u!([u8; 64]: u8x64, m8x64 | u8, u64 | test_v512 |
|
|||
From: |
|
||||
/// A 512-bit vector with 64 `u8` lanes.
|
||||
);
|
||||
impl_m!([m8; 64]: m8x64 | i8, u64 | test_v512 |
|
||||
impl_m!([m8; 64]: m8x64 | i8 | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15,
|
||||
x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31,
|
||||
x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47,
|
||||
|
@ -28,31 +28,31 @@ impl_m!([m8; 64]: m8x64 | i8, u64 | test_v512 |
|
|||
/// A 512-bit vector mask with 64 `m8` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i16; 32]: i16x32, m16x32 | i16, u32 | test_v512 |
|
||||
impl_i!([i16; 32]: i16x32, m16x32 | i16 | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15,
|
||||
x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31 |
|
||||
From: i8x32, u8x32 |
|
||||
/// A 512-bit vector with 32 `i16` lanes.
|
||||
);
|
||||
impl_u!([u16; 32]: u16x32, m16x32 | u16, u32 | test_v512 |
|
||||
impl_u!([u16; 32]: u16x32, m16x32 | u16 | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15,
|
||||
x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31 |
|
||||
From: u8x32 |
|
||||
/// A 512-bit vector with 32 `u16` lanes.
|
||||
);
|
||||
impl_m!([m16; 32]: m16x32 | i16, u32 | test_v512 |
|
||||
impl_m!([m16; 32]: m16x32 | i16 | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15,
|
||||
x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31 |
|
||||
From: m8x32 |
|
||||
/// A 512-bit vector mask with 32 `m16` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i32; 16]: i32x16, m32x16 | i32, u16 | test_v512 |
|
||||
impl_i!([i32; 16]: i32x16, m32x16 | i32 | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15 |
|
||||
From: i8x16, u8x16, i16x16, u16x16 |
|
||||
/// A 512-bit vector with 16 `i32` lanes.
|
||||
);
|
||||
impl_u!([u32; 16]: u32x16, m32x16 | u32, u16 | test_v512 |
|
||||
impl_u!([u32; 16]: u32x16, m32x16 | u32 | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15 |
|
||||
From: u8x16, u16x16 |
|
||||
/// A 512-bit vector with 16 `u32` lanes.
|
||||
|
@ -62,17 +62,17 @@ impl_f!([f32; 16]: f32x16, m32x16 | f32 | test_v512 |
|
|||
From: i8x16, u8x16, i16x16, u16x16 |
|
||||
/// A 512-bit vector with 16 `f32` lanes.
|
||||
);
|
||||
impl_m!([m32; 16]: m32x16 | i32, u16 | test_v512 |
|
||||
impl_m!([m32; 16]: m32x16 | i32 | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15 |
|
||||
From: m8x16, m16x16 |
|
||||
/// A 512-bit vector mask with 16 `m32` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i64; 8]: i64x8, m64x8 | i64, u8 | test_v512 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_i!([i64; 8]: i64x8, m64x8 | i64 | test_v512 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: i8x8, u8x8, i16x8, u16x8, i32x8, u32x8 |
|
||||
/// A 512-bit vector with 8 `i64` lanes.
|
||||
);
|
||||
impl_u!([u64; 8]: u64x8, m64x8 | u64, u8 | test_v512 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_u!([u64; 8]: u64x8, m64x8 | u64 | test_v512 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: u8x8, u16x8, u32x8 |
|
||||
/// A 512-bit vector with 8 `u64` lanes.
|
||||
);
|
||||
|
@ -80,20 +80,20 @@ impl_f!([f64; 8]: f64x8, m64x8 | f64 | test_v512 | x0, x1, x2, x3, x4, x5, x6, x
|
|||
From: i8x8, u8x8, i16x8, u16x8, i32x8, u32x8, f32x8 |
|
||||
/// A 512-bit vector with 8 `f64` lanes.
|
||||
);
|
||||
impl_m!([m64; 8]: m64x8 | i64, u8 | test_v512 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_m!([m64; 8]: m64x8 | i64 | test_v512 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: m8x8, m16x8, m32x8 |
|
||||
/// A 512-bit vector mask with 8 `m64` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i128; 4]: i128x4, m128x4 | i128, u8 | test_v512 | x0, x1, x2, x3 |
|
||||
impl_i!([i128; 4]: i128x4, m128x4 | i128 | test_v512 | x0, x1, x2, x3 |
|
||||
From: i8x4, u8x4, i16x4, u16x4, i32x4, u32x4, i64x4, u64x4 |
|
||||
/// A 512-bit vector with 4 `i128` lanes.
|
||||
);
|
||||
impl_u!([u128; 4]: u128x4, m128x4 | u128, u8 | test_v512 | x0, x1, x2, x3 |
|
||||
impl_u!([u128; 4]: u128x4, m128x4 | u128 | test_v512 | x0, x1, x2, x3 |
|
||||
From: u8x4, u16x4, u32x4, u64x4 |
|
||||
/// A 512-bit vector with 4 `u128` lanes.
|
||||
);
|
||||
impl_m!([m128; 4]: m128x4 | i128, u8 | test_v512 | x0, x1, x2, x3 |
|
||||
impl_m!([m128; 4]: m128x4 | i128 | test_v512 | x0, x1, x2, x3 |
|
||||
From: m8x4, m16x4, m32x4, m64x4 |
|
||||
/// A 512-bit vector mask with 4 `m128` lanes.
|
||||
);
|
||||
|
|
|
@ -3,41 +3,41 @@
|
|||
|
||||
use super::*;
|
||||
|
||||
impl_i!([i8; 8]: i8x8, m8x8 | i8, u8 | test_v64 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_i!([i8; 8]: i8x8, m8x8 | i8 | test_v64 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: |
|
||||
/// A 64-bit vector with 8 `i8` lanes.
|
||||
);
|
||||
impl_u!([u8; 8]: u8x8, m8x8 | u8, u8 | test_v64 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_u!([u8; 8]: u8x8, m8x8 | u8 | test_v64 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: |
|
||||
/// A 64-bit vector with 8 `u8` lanes.
|
||||
);
|
||||
impl_m!([m8; 8]: m8x8 | i8, u8 | test_v64 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
impl_m!([m8; 8]: m8x8 | i8 | test_v64 | x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: m16x8, m32x8 |
|
||||
/// A 64-bit vector mask with 8 `m8` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i16; 4]: i16x4, m16x4 | i16, u8 | test_v64 | x0, x1, x2, x3 |
|
||||
impl_i!([i16; 4]: i16x4, m16x4 | i16 | test_v64 | x0, x1, x2, x3 |
|
||||
From: i8x4, u8x4 |
|
||||
/// A 64-bit vector with 4 `i16` lanes.
|
||||
);
|
||||
impl_u!([u16; 4]: u16x4, m16x4 | u16, u8 | test_v64 | x0, x1, x2, x3 |
|
||||
impl_u!([u16; 4]: u16x4, m16x4 | u16 | test_v64 | x0, x1, x2, x3 |
|
||||
From: u8x4 |
|
||||
/// A 64-bit vector with 4 `u16` lanes.
|
||||
);
|
||||
impl_m!([m16; 4]: m16x4 | i16, u8 | test_v64 | x0, x1, x2, x3 |
|
||||
impl_m!([m16; 4]: m16x4 | i16 | test_v64 | x0, x1, x2, x3 |
|
||||
From: m8x4, m32x4, m64x4 |
|
||||
/// A 64-bit vector mask with 4 `m16` lanes.
|
||||
);
|
||||
|
||||
impl_i!([i32; 2]: i32x2, m32x2 | i32, u8 | test_v64 | x0, x1 |
|
||||
impl_i!([i32; 2]: i32x2, m32x2 | i32 | test_v64 | x0, x1 |
|
||||
From: i8x2, u8x2, i16x2, u16x2 |
|
||||
/// A 64-bit vector with 2 `i32` lanes.
|
||||
);
|
||||
impl_u!([u32; 2]: u32x2, m32x2 | u32, u8 | test_v64 | x0, x1 |
|
||||
impl_u!([u32; 2]: u32x2, m32x2 | u32 | test_v64 | x0, x1 |
|
||||
From: u8x2, u16x2 |
|
||||
/// A 64-bit vector with 2 `u32` lanes.
|
||||
);
|
||||
impl_m!([m32; 2]: m32x2 | i32, u8 | test_v64 | x0, x1 |
|
||||
impl_m!([m32; 2]: m32x2 | i32 | test_v64 | x0, x1 |
|
||||
From: m8x2, m16x2, m64x2, m128x2 |
|
||||
/// A 64-bit vector mask with 2 `m32` lanes.
|
||||
);
|
||||
|
@ -47,15 +47,15 @@ impl_f!([f32; 2]: f32x2, m32x2 | f32 | test_v64 | x0, x1 |
|
|||
);
|
||||
|
||||
/*
|
||||
impl_i!([i64; 1]: i64x1, m64x1 | i64, u8 | test_v64 | x0 |
|
||||
impl_i!([i64; 1]: i64x1, m64x1 | i64 | test_v64 | x0 |
|
||||
From: /*i8x1, u8x1, i16x1, u16x1, i32x1, u32x1*/ | // FIXME: primitive to vector conversion
|
||||
/// A 64-bit vector with 1 `i64` lanes.
|
||||
);
|
||||
impl_u!([u64; 1]: u64x1, m64x1 | u64, u8 | test_v64 | x0 |
|
||||
impl_u!([u64; 1]: u64x1, m64x1 | u64 | test_v64 | x0 |
|
||||
From: /*u8x1, u16x1, u32x1*/ | // FIXME: primitive to vector conversion
|
||||
/// A 64-bit vector with 1 `u64` lanes.
|
||||
);
|
||||
impl_m!([m64; 1]: m64x1 | i64, u8 | test_v64 | x0 |
|
||||
impl_m!([m64; 1]: m64x1 | i64 | test_v64 | x0 |
|
||||
From: /*m8x1, m16x1, m32x1, */ m128x1 | // FIXME: unary small vector types
|
||||
/// A 64-bit vector mask with 1 `m64` lanes.
|
||||
);
|
||||
|
|
|
@ -3,50 +3,50 @@
|
|||
use crate::codegen::pointer_sized_int::{isize_, usize_};
|
||||
use crate::*;
|
||||
|
||||
impl_i!([isize; 2]: isizex2, msizex2 | isize_, u8 | test_v128 |
|
||||
impl_i!([isize; 2]: isizex2, msizex2 | isize_ | test_v128 |
|
||||
x0, x1|
|
||||
From: |
|
||||
/// A vector with 2 `isize` lanes.
|
||||
);
|
||||
|
||||
impl_u!([usize; 2]: usizex2, msizex2 | usize_, u8 | test_v128 |
|
||||
impl_u!([usize; 2]: usizex2, msizex2 | usize_ | test_v128 |
|
||||
x0, x1|
|
||||
From: |
|
||||
/// A vector with 2 `usize` lanes.
|
||||
);
|
||||
impl_m!([msize; 2]: msizex2 | isize_, u8 | test_v128 |
|
||||
impl_m!([msize; 2]: msizex2 | isize_ | test_v128 |
|
||||
x0, x1 |
|
||||
From: |
|
||||
/// A vector mask with 2 `msize` lanes.
|
||||
);
|
||||
|
||||
impl_i!([isize; 4]: isizex4, msizex4 | isize_, u8 | test_v256 |
|
||||
impl_i!([isize; 4]: isizex4, msizex4 | isize_ | test_v256 |
|
||||
x0, x1, x2, x3 |
|
||||
From: |
|
||||
/// A vector with 4 `isize` lanes.
|
||||
);
|
||||
impl_u!([usize; 4]: usizex4, msizex4 | usize_, u8 | test_v256 |
|
||||
impl_u!([usize; 4]: usizex4, msizex4 | usize_ | test_v256 |
|
||||
x0, x1, x2, x3|
|
||||
From: |
|
||||
/// A vector with 4 `usize` lanes.
|
||||
);
|
||||
impl_m!([msize; 4]: msizex4 | isize_, u8 | test_v256 |
|
||||
impl_m!([msize; 4]: msizex4 | isize_ | test_v256 |
|
||||
x0, x1, x2, x3 |
|
||||
From: |
|
||||
/// A vector mask with 4 `msize` lanes.
|
||||
);
|
||||
|
||||
impl_i!([isize; 8]: isizex8, msizex8 | isize_, u8 | test_v512 |
|
||||
impl_i!([isize; 8]: isizex8, msizex8 | isize_ | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: |
|
||||
/// A vector with 4 `isize` lanes.
|
||||
);
|
||||
impl_u!([usize; 8]: usizex8, msizex8 | usize_, u8 | test_v512 |
|
||||
impl_u!([usize; 8]: usizex8, msizex8 | usize_ | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: |
|
||||
/// A vector with 8 `usize` lanes.
|
||||
);
|
||||
impl_m!([msize; 8]: msizex8 | isize_, u8 | test_v512 |
|
||||
impl_m!([msize; 8]: msizex8 | isize_ | test_v512 |
|
||||
x0, x1, x2, x3, x4, x5, x6, x7 |
|
||||
From: |
|
||||
/// A vector mask with 8 `msize` lanes.
|
||||
|
|
Загрузка…
Ссылка в новой задаче