From 30ee6c84fc70475c69334319e1b496efb69720f6 Mon Sep 17 00:00:00 2001 From: Erin Date: Sat, 3 Feb 2024 20:08:09 +0100 Subject: [PATCH] Fixed x86 asm --- hbvm/src/float/x86_64.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hbvm/src/float/x86_64.rs b/hbvm/src/float/x86_64.rs index e899f209a..b9ad287b2 100644 --- a/hbvm/src/float/x86_64.rs +++ b/hbvm/src/float/x86_64.rs @@ -32,9 +32,9 @@ macro_rules! fnsdef { unsafe { let mut mxcsr = 0_u32; 'a: { - asm!("stmxcsr {}", in(reg) &mut mxcsr); + asm!("stmxcsr [{}]", in(reg) &mut mxcsr); asm!( - "ldmxcsr {}", + "ldmxcsr [{}]", in(reg) &(mxcsr & !arin::_MM_ROUND_MASK | match mode { RoundingMode::NearestEven => break 'a, RoundingMode::Truncate => arin::_MM_ROUND_TOWARD_ZERO, @@ -47,7 +47,7 @@ macro_rules! fnsdef { op!($ins, val, result => $to); // Set MXCSR to original value - asm!("ldmxcsr {}", in(reg) &mxcsr); + asm!("ldmxcsr [{}]", in(reg) &mxcsr); } result }