Skip to content

Commit

Permalink
Auto merge of #1973 - RalfJung:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
implement const_allocate intrinsic

This is needed to make the libcore test suite pass again.
  • Loading branch information
bors committed Feb 12, 2022
2 parents a284d4f + dfa0a3b commit 2ba1e84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4e8fb743ccbec27344b2dd42de7057f41d4ebfdd
78450d2d602b06d9b94349aaf8cece1a4acaf3a8
5 changes: 5 additions & 0 deletions src/shims/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
let right = this.read_immediate(right)?;
this.binop_ignore_overflow(mir::BinOp::Ne, &left, &right, dest)?;
}
"const_allocate" => {
// For now, for compatibility with the run-time implementation of this, we just return null.
// See </~https://github.com/rust-lang/rust/issues/93935>.
this.write_null(dest)?;
}

// Raw memory accesses
"volatile_load" => {
Expand Down

0 comments on commit 2ba1e84

Please sign in to comment.