|
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, |
@@ -49,7 +49,14 @@ impl Level for X86 { |
49 | 49 | } |
50 | 50 |
|
51 | 51 | fn arch_ty(&self, vec_ty: &VecType) -> TokenStream { |
52 | | - arch_ty(vec_ty).into_token_stream() |
| 52 | + let suffix = match (vec_ty.scalar, vec_ty.scalar_bits) { |
| 53 | + (ScalarType::Float, 32) => "", |
| 54 | + (ScalarType::Float, 64) => "d", |
| 55 | + (ScalarType::Float, _) => unimplemented!(), |
| 56 | + (ScalarType::Unsigned | ScalarType::Int | ScalarType::Mask, _) => "i", |
| 57 | + }; |
| 58 | + let name = format!("__m{}{}", vec_ty.scalar_bits * vec_ty.len, suffix); |
| 59 | + Ident::new(&name, Span::call_site()).into_token_stream() |
53 | 60 | } |
54 | 61 |
|
55 | 62 | fn token_doc(&self) -> &'static str { |
|
0 commit comments