提交 fcb37cb7 编写于 作者: J Josh Stone

Fix asm! from AT&T to Intel syntax

上级 b97a33b1
......@@ -62,7 +62,7 @@ fn set_cw(cw: u16) {
// any `u16`
unsafe {
asm!(
"fldcw ({})",
"fldcw word ptr [{}]",
in(reg) &cw,
options(nostack),
)
......@@ -86,7 +86,7 @@ pub fn set_precision<T>() -> FPUControlWord {
// any `u16`
unsafe {
asm!(
"fnstcw ({})",
"fnstcw word ptr [{}]",
in(reg) &mut cw,
options(nostack),
)
......
......@@ -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),
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册