Skip to content

Commit f64a00c

Browse files
committed
Fix rebase error
1 parent 79dce6a commit f64a00c

File tree

6 files changed

+7
-33
lines changed

6 files changed

+7
-33
lines changed

src/tools/miri/src/shims/foreign_items.rs

+2-15
Original file line numberDiff line numberDiff line change
@@ -502,15 +502,9 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
502502
let default = |ecx: &mut MiriInterpCx<'tcx>| {
503503
// Only call `check_shim` when `#[global_allocator]` isn't used. When that
504504
// macro is used, we act like no shim exists, so that the exported function can run.
505-
<<<<<<< HEAD
506-
let [size, align] = ecx.check_shim(abi, ExternAbi::Rust, link_name, args)?;
505+
let [size, align] = ecx.check_shim(abi, Conv::Rust, link_name, args)?;
507506
let size = ecx.read_target_usize(size)?;
508507
let align = ecx.read_target_usize(align)?;
509-
=======
510-
let [size, align] = this.check_shim(abi, Conv::Rust, link_name, args)?;
511-
let size = this.read_target_usize(size)?;
512-
let align = this.read_target_usize(align)?;
513-
>>>>>>> d568d46c7e3 (Pass FnAbi to find_mir_or_eval_fn)
514508

515509
ecx.check_rustc_alloc_request(size, align)?;
516510

@@ -568,17 +562,10 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
568562
// See the comment for `__rust_alloc` why `check_shim` is only called in the
569563
// default case.
570564
let [ptr, old_size, align] =
571-
<<<<<<< HEAD
572-
ecx.check_shim(abi, ExternAbi::Rust, link_name, args)?;
565+
ecx.check_shim(abi, Conv::Rust, link_name, args)?;
573566
let ptr = ecx.read_pointer(ptr)?;
574567
let old_size = ecx.read_target_usize(old_size)?;
575568
let align = ecx.read_target_usize(align)?;
576-
=======
577-
this.check_shim(abi, Conv::Rust, link_name, args)?;
578-
let ptr = this.read_pointer(ptr)?;
579-
let old_size = this.read_target_usize(old_size)?;
580-
let align = this.read_target_usize(align)?;
581-
>>>>>>> d568d46c7e3 (Pass FnAbi to find_mir_or_eval_fn)
582569

583570
let memory_kind = match link_name.as_str() {
584571
"__rust_dealloc" => MiriMemoryKind::Rust,

src/tools/miri/src/shims/unix/android/thread.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ pub fn prctl<'tcx>(
1919
) -> InterpResult<'tcx> {
2020
// We do not use `check_shim` here because `prctl` is variadic. The argument
2121
// count is checked bellow.
22-
<<<<<<< HEAD
23-
ecx.check_abi_and_shim_symbol_clash(abi, ExternAbi::C { unwind: false }, link_name)?;
24-
=======
25-
this.check_abi_and_shim_symbol_clash(abi, Conv::C, link_name)?;
26-
>>>>>>> d568d46c7e3 (Pass FnAbi to find_mir_or_eval_fn)
22+
ecx.check_abi_and_shim_symbol_clash(abi, Conv::C, link_name)?;
2723

2824
// FIXME: Use constants once https://github.com/rust-lang/libc/pull/3941 backported to the 0.2 branch.
2925
let pr_set_name = 15;

src/tools/miri/src/shims/unix/linux/syscall.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ pub fn syscall<'tcx>(
1818
) -> InterpResult<'tcx> {
1919
// We do not use `check_shim` here because `syscall` is variadic. The argument
2020
// count is checked bellow.
21-
<<<<<<< HEAD
22-
ecx.check_abi_and_shim_symbol_clash(abi, ExternAbi::C { unwind: false }, link_name)?;
23-
=======
24-
this.check_abi_and_shim_symbol_clash(abi, Conv::C, link_name)?;
25-
>>>>>>> d568d46c7e3 (Pass FnAbi to find_mir_or_eval_fn)
21+
ecx.check_abi_and_shim_symbol_clash(abi, Conv::C, link_name)?;
2622
// The syscall variadic function is legal to call with more arguments than needed,
2723
// extra arguments are simply ignored. The important check is that when we use an
2824
// argument, we have to also check all arguments *before* it to ensure that they

src/tools/miri/src/shims/windows/foreign_items.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
386386
this.write_int(1, dest)?;
387387
}
388388
"TlsFree" => {
389-
let [key] = this.check_shim(abi, ExternAbi::System { unwind: false }, link_name, args)?;
389+
let [key] = this.check_shim(abi, Conv::X86Stdcall, link_name, args)?;
390390
let key = u128::from(this.read_scalar(key)?.to_u32()?);
391391
this.machine.tls.delete_tls_key(key)?;
392392

src/tools/miri/src/shims/x86/mod.rs

-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
<<<<<<< HEAD
2-
use rustc_abi::{ExternAbi, Size};
3-
=======
4-
use rand::Rng as _;
51
use rustc_abi::Size;
6-
>>>>>>> d568d46c7e3 (Pass FnAbi to find_mir_or_eval_fn)
72
use rustc_apfloat::Float;
83
use rustc_apfloat::ieee::Single;
94
use rustc_middle::ty::Ty;

src/tools/miri/src/shims/x86/sse42.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ fn deconstruct_args<'tcx>(
225225

226226
if is_explicit {
227227
let [str1, len1, str2, len2, imm] =
228-
ecx.check_shim(abi, ExternAbi::C { unwind: false }, link_name, args)?;
228+
ecx.check_shim(abi, Conv::C, link_name, args)?;
229229
let imm = ecx.read_scalar(imm)?.to_u8()?;
230230

231231
let default_len = default_len::<u32>(imm);
@@ -239,7 +239,7 @@ fn deconstruct_args<'tcx>(
239239
interp_ok((str1, str2, Some((len1, len2)), imm))
240240
} else {
241241
let [str1, str2, imm] =
242-
ecx.check_shim(abi, ExternAbi::C { unwind: false }, link_name, args)?;
242+
ecx.check_shim(abi, Conv::C, link_name, args)?;
243243
let imm = ecx.read_scalar(imm)?.to_u8()?;
244244

245245
let array_layout = array_layout_fn(ecx, imm)?;

0 commit comments

Comments
 (0)