1
Fork 0

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` // any `u16`
unsafe { unsafe {
asm!( asm!(
"fldcw ({})", "fldcw word ptr [{}]",
in(reg) &cw, in(reg) &cw,
options(nostack), options(nostack),
) )
@ -86,7 +86,7 @@ mod fpu_precision {
// any `u16` // any `u16`
unsafe { unsafe {
asm!( asm!(
"fnstcw ({})", "fnstcw word ptr [{}]",
in(reg) &mut cw, in(reg) &mut cw,
options(nostack), options(nostack),
) )

View file

@ -36,7 +36,7 @@ pub fn image_base() -> u64 {
let base: u64; let base: u64;
unsafe { unsafe {
asm!( asm!(
"lea IMAGE_BASE(%rip), {}", "lea {}, qword ptr [rip + IMAGE_BASE]",
lateout(reg) base, lateout(reg) base,
options(nostack, preserves_flags, nomem, pure), options(nostack, preserves_flags, nomem, pure),
) )