forked from AbleOS/holey-bytes
Fixed x86 asm
This commit is contained in:
parent
6e464be33d
commit
30ee6c84fc
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue