Skip to content

Commit

Permalink
Fix asm! from AT&T to Intel syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Mar 22, 2021
1 parent b97a33b commit fcb37cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions library/core/src/num/dec2flt/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ mod fpu_precision {
// any `u16`
unsafe {
asm!(
"fldcw ({})",
"fldcw word ptr [{}]",
in(reg) &cw,
options(nostack),
)
Expand All @@ -86,7 +86,7 @@ mod fpu_precision {
// any `u16`
unsafe {
asm!(
"fnstcw ({})",
"fnstcw word ptr [{}]",
in(reg) &mut cw,
options(nostack),
)
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/sgx/abi/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down

0 comments on commit fcb37cb

Please sign in to comment.