Skip to content

Commit fce0c49

Browse files
committed
Reserve x18 on AArch64 and un-reserve x16
1 parent db51895 commit fce0c49

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

std/src/sys/sgx/ext/arch.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ pub fn egetkey(request: &Align512<[u8; 512]>) -> Result<Align16<[u8; 16]>, u32>
3333

3434
asm!(
3535
// rbx is reserved by LLVM
36-
"xchg {}, rbx",
36+
"xchg {0}, rbx",
3737
"enclu",
38-
"mov rbx, {}",
38+
"mov rbx, {0}",
3939
inout(reg) request => _,
4040
inlateout("eax") ENCLU_EGETKEY => error,
4141
in("rcx") out.as_mut_ptr(),
@@ -64,9 +64,9 @@ pub fn ereport(
6464

6565
asm!(
6666
// rbx is reserved by LLVM
67-
"xchg {}, rbx",
67+
"xchg {0}, rbx",
6868
"enclu",
69-
"mov rbx, {}",
69+
"mov rbx, {0}",
7070
inout(reg) targetinfo => _,
7171
in("eax") ENCLU_EREPORT,
7272
in("rcx") reportdata,

0 commit comments

Comments
 (0)