File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
crates/core_arch/src/x86_64 Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,16 @@ macro_rules! static_assert_sae {
2020 static_assert!( $imm == 4 || $imm == 8 , "Invalid IMM value" )
2121 } ;
2222}
23+
24+ #[ cfg( target_pointer_width = "32" ) ]
25+ macro_rules! vps {
26+ ( $inst1: expr, $inst2: expr) => {
27+ concat!( $inst1, " [{p:e}]" , $inst2)
28+ } ;
29+ }
30+ #[ cfg( target_pointer_width = "64" ) ]
31+ macro_rules! vps {
32+ ( $inst1: expr, $inst2: expr) => {
33+ concat!( $inst1, " [{p}]" , $inst2)
34+ } ;
35+ }
Original file line number Diff line number Diff line change 11//! `x86_64`'s Streaming SIMD Extensions 2 (SSE2)
22
3- use crate :: { core_arch:: x86 :: * , intrinsics:: simd:: * } ;
3+ use crate :: { core_arch:: x86_64 :: * , intrinsics:: simd:: * } ;
44
55#[ cfg( test) ]
66use stdarch_test:: assert_instr;
@@ -79,7 +79,7 @@ pub unsafe fn _mm_cvttsd_si64x(a: __m128d) -> i64 {
7979#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
8080pub unsafe fn _mm_stream_si64 ( mem_addr : * mut i64 , a : i64 ) {
8181 crate :: arch:: asm!(
82- "movnti [{p}], {a}" ,
82+ vps! ( "movnti" , ", {a}") ,
8383 p = in( reg) mem_addr,
8484 a = in( reg) a,
8585 options( nostack, preserves_flags) ,
You can’t perform that action at this time.
0 commit comments