Merge pull request #673 from scottmcm/only-array-simd

Use array simd in `U64x2`
This commit is contained in:
Trevor Gross 2024-08-22 03:00:44 -05:00 committed by GitHub
commit ade226ecdd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -482,20 +482,20 @@ macro_rules! intrinsics {
#[cfg(all(any(windows, target_os = "uefi"), target_pointer_width = "64"))]
pub mod win64_128bit_abi_hack {
#[repr(simd)]
pub struct U64x2(u64, u64);
pub struct U64x2([u64; 2]);
impl From<i128> for U64x2 {
fn from(i: i128) -> U64x2 {
use crate::int::DInt;
let j = i as u128;
U64x2(j.lo(), j.hi())
U64x2([j.lo(), j.hi()])
}
}
impl From<u128> for U64x2 {
fn from(i: u128) -> U64x2 {
use crate::int::DInt;
U64x2(i.lo(), i.hi())
U64x2([i.lo(), i.hi()])
}
}
}