@@ -181,16 +181,13 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
181
181
}
182
182
183
183
// Prepare all exposed memory, depending on whether we have a supervisor process.
184
- #[ cfg( all( unix, any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
185
184
if super :: trace:: Supervisor :: init ( ) . is_ok ( ) {
186
185
this. prepare_exposed_for_native_call ( false ) ?;
187
186
} else {
188
187
//this.prepare_exposed_for_native_call(true)?;
189
188
//eprintln!("Oh noes!")
190
189
panic ! ( "No ptrace!" ) ;
191
190
}
192
- #[ cfg( not( all( unix, any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ) ]
193
- this. prepare_exposed_for_native_call ( true ) ?;
194
191
195
192
// Convert them to `libffi::high::Arg` type.
196
193
let libffi_args = libffi_args
@@ -200,7 +197,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
200
197
201
198
// Call the function and store output, depending on return type in the function signature.
202
199
let ret = this. call_native_with_args ( link_name, dest, code_ptr, libffi_args) ?;
203
- #[ cfg( all( unix, any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
204
200
if let Some ( events) = super :: trace:: Supervisor :: get_events ( ) {
205
201
this. apply_events ( events) ?;
206
202
}
@@ -209,7 +205,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
209
205
}
210
206
}
211
207
212
- #[ cfg( all( unix, any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
213
208
unsafe fn do_native_call < T : libffi:: high:: CType > ( ptr : CodePtr , args : & [ ffi:: Arg < ' _ > ] ) -> T {
214
209
use shims:: trace:: Supervisor ;
215
210
@@ -221,12 +216,6 @@ unsafe fn do_native_call<T: libffi::high::CType>(ptr: CodePtr, args: &[ffi::Arg<
221
216
}
222
217
}
223
218
224
- #[ cfg( not( all( unix, any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ) ]
225
- #[ inline( always) ]
226
- unsafe fn do_native_call < T : libffi:: high:: CType > ( ptr : CodePtr , args : & [ ffi:: Arg < ' _ > ] ) -> T {
227
- unsafe { ffi:: call ( ptr, args) }
228
- }
229
-
230
219
#[ derive( Debug , Clone ) ]
231
220
/// Enum of supported arguments to external C functions.
232
221
// We introduce this enum instead of just calling `ffi::arg` and storing a list
0 commit comments