Commit 47e9b088 authored by qinsoon's avatar qinsoon

more tests from jit-test run

parent edcc327f
......@@ -568,6 +568,14 @@ impl Value {
}
}
pub unsafe fn as_type(&self, ty: P<MuType>) -> P<Value> {
P(Value{
hdr: self.hdr.clone(),
ty: ty,
v: self.v.clone()
})
}
pub fn is_fp_reg(&self) -> bool {
match self.v {
Value_::SSAVar(_) => {
......
#![allow(unused_variables)]
use compiler::backend;
use compiler::backend::AOT_EMIT_CONTEXT_FILE;
use compiler::backend::AOT_EMIT_DIR;
use compiler::backend::RegGroup;
......
......@@ -436,9 +436,9 @@ pub fn is_callee_saved(reg_id: MuID) -> bool {
}
pub fn is_valid_x86_imm(op: &P<Value>) -> bool {
use std::i32;
use std::u32;
match op.v {
Value_::Constant(Constant::Int(val)) if val <= i32::MAX as u64 => {
Value_::Constant(Constant::Int(val)) if val <= u32::MAX as u64 => {
true
},
_ => false
......
......@@ -6,7 +6,6 @@ use compiler::backend;
use utils::vec_utils;
use utils::LinkedHashSet;
use std::collections::LinkedList;
use std::collections::{HashMap, HashSet};
use self::nalgebra::DMatrix;
......
......@@ -42,7 +42,7 @@ impl CompilerPass for GenMovPhi {
trace!("block: {}", blk_id);
// old block content
let mut block_content = block.content.as_ref().unwrap().clone();
let block_content = block.content.as_ref().unwrap().clone();
let mut new_body = vec![];
......@@ -58,7 +58,7 @@ impl CompilerPass for GenMovPhi {
match last_inst.v {
TreeNode_::Instruction(inst) => {
let mut ops = inst.ops.write().unwrap();
let ops = inst.ops.read().unwrap();
match inst.v {
Instruction_::Branch2{cond, true_dest, false_dest, true_prob} => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment