mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-27 11:29:35 +02:00
[PATCH 33/83] do the proper preparation for memory (ref) access
From a3f4e2440270248a15475566596c1be8dff32854 Mon Sep 17 00:00:00 2001 From: Dmitry Boyarintsev <skalogryz.lists@gmail.com> Date: Mon, 16 Sep 2019 09:14:21 -0400 git-svn-id: branches/wasm@45910 -
This commit is contained in:
parent
fe7826a013
commit
7e96f42210
@ -999,6 +999,10 @@ implementation
|
||||
{ fake location that indicates the value is already on the stack? }
|
||||
if (ref.base=NR_EVAL_STACK_BASE) then
|
||||
exit;
|
||||
|
||||
// setting up memory offset
|
||||
list.Concat(taicpu.op_const(a_i32_const, 0)); //todo: this should not be 0, this should be reference to a global "memory"
|
||||
|
||||
{ non-array accesses cannot have an index reg }
|
||||
if ref.index<>NR_NO then
|
||||
internalerror(2010120509);
|
||||
@ -1926,8 +1930,6 @@ implementation
|
||||
if ref.base=NR_EVAL_STACK_BASE then
|
||||
exit;
|
||||
opc:=loadstoreopcref(size,false,ref,finishandval);
|
||||
if opc in AsmOp_LoadStore then
|
||||
list.Concat(taicpu.op_const(a_i32_const, 0)); //todo: this should not be 0, this should be reference to a global "memory"
|
||||
|
||||
list.concat(taicpu.op_ref(opc,ref));
|
||||
{ avoid problems with getting the size of an open array etc }
|
||||
@ -1961,9 +1963,6 @@ implementation
|
||||
exit;
|
||||
opc:=loadstoreopcref(size,true,ref,finishandval);
|
||||
|
||||
if opc in AsmOp_LoadStore then
|
||||
list.Concat(taicpu.op_const(a_i32_const, 0)); //todo: this should not be 0, this should be reference to a global "memory"
|
||||
|
||||
list.concat(taicpu.op_ref(opc,ref));
|
||||
|
||||
{ avoid problems with getting the size of an open array etc }
|
||||
|
Loading…
Reference in New Issue
Block a user