Use write_immediate.
This commit is contained in:
parent
7493ad0abe
commit
6984030f80
@ -221,8 +221,8 @@ pub fn emulate_intrinsic(
|
|||||||
sym::discriminant_value => {
|
sym::discriminant_value => {
|
||||||
let place = self.deref_pointer(&args[0])?;
|
let place = self.deref_pointer(&args[0])?;
|
||||||
let variant = self.read_discriminant(&place)?;
|
let variant = self.read_discriminant(&place)?;
|
||||||
let discr = self.discriminant_for_variant(place.layout, variant)?.to_scalar();
|
let discr = self.discriminant_for_variant(place.layout, variant)?;
|
||||||
self.write_scalar(discr, dest)?;
|
self.write_immediate(*discr, dest)?;
|
||||||
}
|
}
|
||||||
sym::exact_div => {
|
sym::exact_div => {
|
||||||
let l = self.read_immediate(&args[0])?;
|
let l = self.read_immediate(&args[0])?;
|
||||||
|
Loading…
Reference in New Issue
Block a user