Commit f31749c9 authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Fixed all errors that were found when running the python tests.

Also modified some of the rust tests so that they are applicable to aarch64.
parent c313f4d7
......@@ -667,7 +667,7 @@ impl fmt::Display for TreeNode {
match self.v {
TreeNode_::Value(ref pv) => pv.fmt(f),
TreeNode_::Instruction(ref inst) => {
write!(f, "{}", inst)
write!(f, "({})", inst)
}
}
}
......@@ -763,7 +763,8 @@ impl Value {
}
}
const DISPLAY_TYPE : bool = true;
const DISPLAY_ID : bool = true;
const DISPLAY_TYPE : bool = false;
const PRINT_ABBREVIATE_NAME: bool = true;
impl fmt::Debug for Value {
......@@ -786,7 +787,7 @@ impl fmt::Display for Value {
write!(f, "{}(@{})", ty, self.hdr)
},
Value_::Memory(ref mem) => {
write!(f, "{}(%{})", mem, self.hdr)
write!(f, "%{}{})", self.hdr, mem)
}
}
} else {
......@@ -801,7 +802,7 @@ impl fmt::Display for Value {
write!(f, "@{}", self.hdr)
},
Value_::Memory(ref mem) => {
write!(f, "{}(%{})", mem, self.hdr)
write!(f, "%{}{}", self.hdr, mem)
}
}
}
......@@ -1170,12 +1171,11 @@ impl PartialEq for MuEntityHeader {
}
}
const DISPLAY_ID : bool = false;
impl fmt::Display for MuEntityHeader {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if DISPLAY_ID {
if self.name().is_none() {
write!(f, "UNAMED #{}", self.id)
write!(f, "{}", self.id)
} else {
if PRINT_ABBREVIATE_NAME {
write!(f, "{} #{}", self.abbreviate_name().unwrap(), self.id)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -200,11 +200,11 @@ fn emit_muir_dot_inner(file: &mut File,
file.write_fmt(format_args!("[{}]", block_content.exn_arg.as_ref().unwrap())).unwrap();
}
// :\n\n
file.write(":\\n\\n".as_bytes()).unwrap();
file.write(":\\l\\l".as_bytes()).unwrap();
// all the instructions
for inst in block_content.body.iter() {
file.write_fmt(format_args!("{}\\n", inst)).unwrap();
file.write_fmt(format_args!("{}\\l", inst)).unwrap();
}
// "];
......@@ -352,7 +352,7 @@ fn emit_mc_dot(func: &MuFunctionVersion, vm: &VM) {
for block_name in blocks.iter() {
// BB [label = "
file.write_fmt(format_args!("{} [label = \"{}:\\n\\n", id(block_name.clone()), block_name)).unwrap();
file.write_fmt(format_args!("{} [label = \"{}:\\l\\l", id(block_name.clone()), block_name)).unwrap();
for inst in mc.get_block_range(&block_name).unwrap() {
file.write(&mc.emit_inst(inst)).unwrap();
......
......@@ -108,6 +108,7 @@ impl MuStack {
}
#[cfg(target_arch = "aarch64")]
// TODO: What will hapen if some things need to be loaded on the stack?
// TODO: Should we save XR (X8, the indirect locations result register)
// (NOTE: Any changes to here need to be reflected in swap_to_mu_stack)
pub fn runtime_load_args(&mut self, vals: Vec<ValueLocation>) {
......
This diff is collapsed.
This diff is collapsed.
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