asm!(
// rbx is reserved by LLVM
- "xchg {0}, rbx",
+ "xchg %rbx, {0}",
"enclu",
- "mov rbx, {0}",
+ "mov {0}, %rbx",
inout(reg) request => _,
inlateout("eax") ENCLU_EGETKEY => error,
in("rcx") out.as_mut_ptr(),
- options(nostack),
+ options(att_syntax, nostack),
);
match error {
asm!(
// rbx is reserved by LLVM
- "xchg {0}, rbx",
+ "xchg %rbx, {0}",
"enclu",
- "mov rbx, {0}",
+ "mov {0}, %rbx",
inout(reg) targetinfo => _,
in("eax") ENCLU_EREPORT,
in("rcx") reportdata,
in("rdx") report.as_mut_ptr(),
- options(preserves_flags, nostack),
+ options(att_syntax, preserves_flags, nostack),
);
report.assume_init()
let base: u64;
unsafe {
asm!(
- "lea {}, qword ptr [rip + IMAGE_BASE]",
+ "lea IMAGE_BASE(%rip), {}",
lateout(reg) base,
- options(nostack, preserves_flags, nomem, pure),
+ options(att_syntax, nostack, preserves_flags, nomem, pure),
)
};
base