GitLab will be upgraded to the 12.10.14-ce.0 on 28 Sept 2020 at 2.00pm (AEDT) to 2.30pm (AEDT). During the update, GitLab and Mattermost services will not be available. If you have any concerns with this, please talk to us at N110 (b) CSIT building.

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

Fixed bug in newhybrid

parent 08160d23
......@@ -1596,7 +1596,6 @@ impl<'a> InstructionSelection {
Instruction_::NewHybrid(ref ty, var_len) => {
trace!("instsel on NEWHYBRID");
let ty_info = vm.get_backend_type_info(ty.id());
let ty_align = ty_info.alignment;
let fix_part_size = ty_info.size;
let var_ty_size = ty_info.elem_size.unwrap();
......@@ -1610,13 +1609,15 @@ impl<'a> InstructionSelection {
let actual_size = fix_part_size + var_ty_size * (var_len as usize);
make_value_int_const(actual_size as u64, vm)
} else {
let tmp_actual_size = self.emit_ireg(var_len, f_content, f_context, vm);
let var_len = self.emit_ireg(var_len, f_content, f_context, vm);
emit_zext(self.backend.as_mut(), &var_len); // this will zero
let tmp_actual_size = make_temporary(f_context, UINT64_TYPE.clone(), vm);
// tmp_actual_size = var_len*var_ty_size
emit_mul_u64(
self.backend.as_mut(),
&tmp_actual_size,
&tmp_actual_size,
&cast_value(&var_len, &UINT64_TYPE),
var_ty_size as u64
);
// tmp_actual_size = tmp_var_len*var_ty_size + fix_part_size
......
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