File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
library/std/src/sys/sgx/ext Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,12 @@ pub fn egetkey(request: &Align512<[u8; 512]>) -> Result<Align16<[u8; 16]>, u32>
3232 let error;
3333
3434 asm ! (
35+ // rbx is reserved by LLVM
36+ "xchg {}, rbx" ,
3537 "enclu" ,
38+ "mov rbx, {}" ,
39+ inout( reg) request => _,
3640 inlateout( "eax" ) ENCLU_EGETKEY => error,
37- in( "rbx" ) request,
3841 in( "rcx" ) out. as_mut_ptr( ) ,
3942 options( nostack) ,
4043 ) ;
@@ -60,9 +63,12 @@ pub fn ereport(
6063 let mut report = MaybeUninit :: uninit ( ) ;
6164
6265 asm ! (
66+ // rbx is reserved by LLVM
67+ "xchg {}, rbx" ,
6368 "enclu" ,
69+ "mov rbx, {}" ,
70+ inout( reg) targetinfo => _,
6471 in( "eax" ) ENCLU_EREPORT ,
65- in( "rbx" ) targetinfo,
6672 in( "rcx" ) reportdata,
6773 in( "rdx" ) report. as_mut_ptr( ) ,
6874 options( preserves_flags, nostack) ,
You can’t perform that action at this time.
0 commit comments