Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix asm! from AT&T to Intel syntax
  • Loading branch information
cuviper committed Mar 22, 2021
commit fcb37cb7d69e8272e0917a3735311cab96f92e17
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