Browse Source

[PATCH 69/83] update address loading

From 010f7c9bc524a07faac85e624045d7998c483b59 Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <[email protected]>
Date: Tue, 15 Oct 2019 16:07:39 -0400

git-svn-id: branches/wasm@45946 -
nickysn 5 years ago
parent
commit
004ae42820
1 changed files with 6 additions and 0 deletions
  1. 6 0
      compiler/wasm/hlcgcpu.pas

+ 6 - 0
compiler/wasm/hlcgcpu.pas

@@ -1144,6 +1144,12 @@ implementation
         incstack(list, 1);
         a_load_stack_reg(list, tosize, r);
       end else begin
+        list.Concat(taicpu.op_reg(a_get_local, ref.base));
+        list.Concat(taicpu.op_const(a_i32_const, ref.offset));
+        list.Concat(taicpu.op_none(a_i32_add));
+        incstack(list, 1);
+        a_load_stack_reg(list, tosize, r);
+
         //todo:
         //a_load_ref_reg(list,ptruinttype,ptruinttype,ref,r);
       end;