Commit 8677a5fc authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Now support global cells as arguments to instructions...

parent c85d4a4a
......@@ -2082,7 +2082,21 @@ pub fn emit_ireg_value(
_ => panic!("expected ireg")
}
}
_ => panic!("expected ireg")
Value_::Global(_) => {
let tmp = make_temporary(f_context, pv.ty.clone(), vm);
let mem = make_value_symbolic(pv.name(), true, &pv.ty, vm);
emit_calculate_address(backend, &tmp, &mem, vm);
tmp
}
Value_::Memory(ref mem) => {
//make_value_from_memory(mem: MemoryLocation, ty: &P<MuType>, vm: &VM)
let mem = make_value_from_memory(mem.clone(), &pv.ty, vm);
let tmp = make_temporary(f_context, pv.ty.clone(), vm);
emit_calculate_address(backend, &tmp, &mem, vm);
tmp
}
}
}
......
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