Fix asm! from AT&T to Intel syntax

This commit is contained in:
Josh Stone 2021-03-22 13:12:53 -07:00
parent b97a33b1cb
commit fcb37cb7d6
2 changed files with 3 additions and 3 deletions

View file

@ -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),
)

View file

@ -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),
)