|
2 | 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT |
3 | 3 |
|
4 | 4 | use crate::arch::x86::{ |
5 | | - self, arch_ty, cast_ident, coarse_type, extend_intrinsic, float_compare_method, |
6 | | - intrinsic_ident, op_suffix, pack_intrinsic, set1_intrinsic, simple_intrinsic, |
7 | | - simple_sign_unaware_intrinsic, unpack_intrinsic, |
| 5 | + self, cast_ident, coarse_type, extend_intrinsic, float_compare_method, intrinsic_ident, |
| 6 | + op_suffix, pack_intrinsic, set1_intrinsic, simple_intrinsic, simple_sign_unaware_intrinsic, |
| 7 | + unpack_intrinsic, |
8 | 8 | }; |
9 | 9 | use crate::generic::{ |
10 | 10 | generic_as_array, generic_block_combine, generic_block_split, generic_from_array, |
@@ -42,7 +42,14 @@ impl Level for X86 { |
42 | 42 | } |
43 | 43 |
|
44 | 44 | fn arch_ty(&self, vec_ty: &VecType) -> TokenStream { |
45 | | - arch_ty(vec_ty).into_token_stream() |
| 45 | + let suffix = match (vec_ty.scalar, vec_ty.scalar_bits) { |
| 46 | + (ScalarType::Float, 32) => "", |
| 47 | + (ScalarType::Float, 64) => "d", |
| 48 | + (ScalarType::Float, _) => unimplemented!(), |
| 49 | + (ScalarType::Unsigned | ScalarType::Int | ScalarType::Mask, _) => "i", |
| 50 | + }; |
| 51 | + let name = format!("__m{}{}", vec_ty.scalar_bits * vec_ty.len, suffix); |
| 52 | + Ident::new(&name, Span::call_site()).into_token_stream() |
46 | 53 | } |
47 | 54 |
|
48 | 55 | fn token_doc(&self) -> &'static str { |
|
0 commit comments