mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
Remove a workaround for icmp.i8/i16 not having an encoding
This commit is contained in:
parent
e3bbef764c
commit
16334be18e
@ -1,4 +1,4 @@
|
||||
#![feature(no_core, lang_items, intrinsics, unboxed_closures)]
|
||||
#![feature(no_core, lang_items, intrinsics, unboxed_closures, type_ascription)]
|
||||
#![no_core]
|
||||
#![allow(dead_code)]
|
||||
|
||||
@ -246,7 +246,7 @@ pub struct Box<T: ?Sized>(*mut T);
|
||||
|
||||
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {}
|
||||
|
||||
static mut MY_TINY_HEAP: [u8; 16] = [0; 16];
|
||||
static mut MY_TINY_HEAP: [u8; 16] = [0xff; 16];
|
||||
|
||||
#[lang = "exchange_malloc"]
|
||||
unsafe fn allocate(size: usize, _align: usize) -> *mut u8 {
|
||||
|
13
src/base.rs
13
src/base.rs
@ -18,7 +18,9 @@ pub fn trans_mono_item<'a, 'tcx: 'a>(
|
||||
) {
|
||||
match mono_item {
|
||||
MonoItem::Fn(inst) => {
|
||||
let _inst_guard = PrintOnPanic(|| format!("{:?}", inst));
|
||||
let _inst_guard = PrintOnPanic(|| {
|
||||
format!("{:?} {}", inst, tcx.symbol_name(inst).as_str())
|
||||
});
|
||||
let _mir_guard = PrintOnPanic(|| {
|
||||
match inst.def {
|
||||
InstanceDef::Item(_)
|
||||
@ -761,14 +763,7 @@ macro_rules! binop_match {
|
||||
assert_eq!($fx.tcx.types.bool, $ret_ty);
|
||||
let ret_layout = $fx.layout_of($ret_ty);
|
||||
|
||||
// TODO HACK no encoding for icmp.i8
|
||||
use crate::common::clif_intcast;
|
||||
let (lhs, rhs) = (
|
||||
clif_intcast($fx, $lhs, types::I64, $signed),
|
||||
clif_intcast($fx, $rhs, types::I64, $signed),
|
||||
);
|
||||
let b = $fx.bcx.ins().icmp(IntCC::$cc, lhs, rhs);
|
||||
|
||||
let b = $fx.bcx.ins().icmp(IntCC::$cc, $lhs, $rhs);
|
||||
CValue::ByVal($fx.bcx.ins().bint(types::I8, b), ret_layout)
|
||||
}};
|
||||
(@single $fx:expr, $bug_fmt:expr, $var:expr, $signed:expr, $lhs:expr, $rhs:expr, $ret_ty:expr, fcmp($cc:ident)) => {{
|
||||
|
Loading…
Reference in New Issue
Block a user