diff options
| author | Jethro Beekman <jethro@fortanix.com> | 2021-05-07 23:49:24 +0200 |
|---|---|---|
| committer | Jethro Beekman <jethro@fortanix.com> | 2021-05-07 23:49:24 +0200 |
| commit | 5bbf8cf331f9c6140117bb6c2ac385d2e451d26e (patch) | |
| tree | f2cfc32804fc3ef4e6677a9b942c3cec4a1b14b0 /library/std/src/os | |
| parent | ca712bc4255cd0912e00ec2eee5b6a547385c2b0 (diff) | |
| download | rust-5bbf8cf331f9c6140117bb6c2ac385d2e451d26e.tar.gz rust-5bbf8cf331f9c6140117bb6c2ac385d2e451d26e.zip | |
Revert SGX inline asm syntax
This was erroneously changed in #83387
Diffstat (limited to 'library/std/src/os')
| -rw-r--r-- | library/std/src/os/fortanix_sgx/arch.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/std/src/os/fortanix_sgx/arch.rs b/library/std/src/os/fortanix_sgx/arch.rs index b0170e67446..4ce482e23cb 100644 --- a/library/std/src/os/fortanix_sgx/arch.rs +++ b/library/std/src/os/fortanix_sgx/arch.rs @@ -33,13 +33,13 @@ pub fn egetkey(request: &Align512<[u8; 512]>) -> Result<Align16<[u8; 16]>, u32> 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 { @@ -64,14 +64,14 @@ pub fn ereport( 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() |
