Browse Source

+ insert hlcg.g_ptrtypecast_reg calls in tcgvecnode.update_reference_reg_mul and update_reference_reg_packed

git-svn-id: branches/wasm@48376 -
nickysn 4 years ago
parent
commit
71f5fd320a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/ncgmem.pas

+ 2 - 0
compiler/ncgmem.pas

@@ -643,6 +643,7 @@ implementation
        var
          hreg: tregister;
        begin
+         hlcg.g_ptrtypecast_reg(current_asmdata.CurrAsmList,regsize,get_address_type,maybe_const_reg);
          if l<>1 then
            begin
              hreg:=hlcg.getaddressregister(current_asmdata.CurrAsmList,get_address_type);
@@ -692,6 +693,7 @@ implementation
            end;
          if (l > 8*sizeof(aint)) then
            internalerror(200608051);
+         hlcg.g_ptrtypecast_reg(current_asmdata.CurrAsmList,regsize,get_address_type,maybe_const_reg);
          sref.ref := location.reference;
          hreg := hlcg.getaddressregister(current_asmdata.CurrAsmList,get_address_type);
          hlcg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SUB,get_address_type,tarraydef(left.resultdef).lowrange,maybe_const_reg,hreg);