* fixed getting the address of local variables

git-svn-id: branches/wasm@47929 -
This commit is contained in:
nickysn 2020-12-31 18:36:45 +00:00
parent 08ae48aebf
commit acb13602ea

View File

@ -1165,8 +1165,8 @@ implementation
incstack(list, 1); incstack(list, 1);
// reading back to the register // reading back to the register
a_load_stack_reg(list, tosize, r); a_load_stack_reg(list, tosize, r);
end else if (ref.base = NR_FRAME_POINTER_REG) then begin end else if (ref.base = NR_LOCAL_FRAME_POINTER_REG) then begin
list.Concat(taicpu.op_sym(a_get_local, current_asmdata.RefAsmSymbol(FRAME_POINTER_SYM,AT_ADDR) )); list.Concat(taicpu.op_reg(a_get_local,NR_LOCAL_FRAME_POINTER_REG));
list.Concat(taicpu.op_const(a_i32_const, ref.offset)); list.Concat(taicpu.op_const(a_i32_const, ref.offset));
// todo: index? // todo: index?
list.Concat(taicpu.op_none(a_i32_add)); list.Concat(taicpu.op_none(a_i32_add));