File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,12 @@ impl TargetInfo {
50
50
let mut report = core:: mem:: MaybeUninit :: < report:: Report > :: uninit ( ) ;
51
51
52
52
asm ! (
53
+ "xchg {RBX}, rbx" ,
53
54
"enclu" ,
55
+ "mov rbx, {RBX}" ,
54
56
57
+ RBX = inout( reg) self => _,
55
58
in( "rax" ) EREPORT ,
56
- in( "rbx" ) self ,
57
59
in( "rcx" ) data. 0 . as_ptr( ) ,
58
60
in( "rdx" ) report. as_mut_ptr( ) ,
59
61
) ;
Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ impl Thread {
193
193
let rax: i32 ;
194
194
unsafe {
195
195
asm ! (
196
+ "push rbx" , // save rbx
196
197
"push rbp" , // save rbp
197
198
"mov rbp, rsp" , // save rsp
198
199
"and rsp, ~0xf" , // align to 16+0
@@ -203,6 +204,7 @@ impl Thread {
203
204
204
205
"mov rsp, rbp" , // restore rsp
205
206
"pop rbp" , // restore rbp
207
+ "pop rbx" , // restore rbx
206
208
207
209
inout( "rdi" ) usize :: from( registers. rdi) => _,
208
210
inout( "rsi" ) usize :: from( registers. rsi) => _,
@@ -212,7 +214,6 @@ impl Thread {
212
214
inout( "r9" ) usize :: from( registers. r9) => _,
213
215
inout( "r10" ) & mut run => _,
214
216
inout( "r11" ) self . fnc => _,
215
- lateout( "rbx" ) _,
216
217
lateout( "r12" ) _,
217
218
lateout( "r13" ) _,
218
219
lateout( "r14" ) _,
You can’t perform that action at this time.
0 commit comments