diff --git a/library/core/src/num/dec2flt/algorithm.rs b/library/core/src/num/dec2flt/algorithm.rs index a88bcdbaed0a2..313b6870ac9d3 100644 --- a/library/core/src/num/dec2flt/algorithm.rs +++ b/library/core/src/num/dec2flt/algorithm.rs @@ -62,7 +62,7 @@ mod fpu_precision { // any `u16` unsafe { asm!( - "fldcw ({})", + "fldcw word ptr [{}]", in(reg) &cw, options(nostack), ) @@ -86,7 +86,7 @@ mod fpu_precision { // any `u16` unsafe { asm!( - "fnstcw ({})", + "fnstcw word ptr [{}]", in(reg) &mut cw, options(nostack), ) diff --git a/library/std/src/sys/sgx/abi/mem.rs b/library/std/src/sys/sgx/abi/mem.rs index 9c593a0051114..1e743894a9fea 100644 --- a/library/std/src/sys/sgx/abi/mem.rs +++ b/library/std/src/sys/sgx/abi/mem.rs @@ -36,7 +36,7 @@ pub fn image_base() -> u64 { let base: u64; unsafe { asm!( - "lea IMAGE_BASE(%rip), {}", + "lea {}, qword ptr [rip + IMAGE_BASE]", lateout(reg) base, options(nostack, preserves_flags, nomem, pure), )