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>
32
32
let error;
33
33
34
34
asm ! (
35
+ // rbx is reserved by LLVM
36
+ "xchg {}, rbx" ,
35
37
"enclu" ,
38
+ "mov rbx, {}" ,
39
+ inout( reg) request => _,
36
40
inlateout( "eax" ) ENCLU_EGETKEY => error,
37
- in( "rbx" ) request,
38
41
in( "rcx" ) out. as_mut_ptr( ) ,
39
42
options( nostack) ,
40
43
) ;
@@ -60,9 +63,12 @@ pub fn ereport(
60
63
let mut report = MaybeUninit :: uninit ( ) ;
61
64
62
65
asm ! (
66
+ // rbx is reserved by LLVM
67
+ "xchg {}, rbx" ,
63
68
"enclu" ,
69
+ "mov rbx, {}" ,
70
+ inout( reg) targetinfo => _,
64
71
in( "eax" ) ENCLU_EREPORT ,
65
- in( "rbx" ) targetinfo,
66
72
in( "rcx" ) reportdata,
67
73
in( "rdx" ) report. as_mut_ptr( ) ,
68
74
options( preserves_flags, nostack) ,
You can’t perform that action at this time.
0 commit comments