mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 16:19:21 +02:00
* more precise stack tracking in thlcgwasm.prepare_stack_for_ref
git-svn-id: branches/wasm@48264 -
This commit is contained in:
parent
4d758a64c2
commit
e4c9f030af
@ -1111,15 +1111,19 @@ implementation
|
|||||||
begin
|
begin
|
||||||
// it's just faster to sum two of those together
|
// it's just faster to sum two of those together
|
||||||
list.Concat(taicpu.op_reg(a_get_local, ref.base));
|
list.Concat(taicpu.op_reg(a_get_local, ref.base));
|
||||||
list.Concat(taicpu.op_reg(a_get_local, ref.index));
|
|
||||||
list.Concat(taicpu.op_none(a_i32_add));
|
|
||||||
incstack(list,1);
|
incstack(list,1);
|
||||||
|
list.Concat(taicpu.op_reg(a_get_local, ref.index));
|
||||||
|
incstack(list,1);
|
||||||
|
list.Concat(taicpu.op_none(a_i32_add));
|
||||||
|
decstack(list,1);
|
||||||
if dup then
|
if dup then
|
||||||
begin
|
begin
|
||||||
list.Concat(taicpu.op_reg(a_get_local, ref.base));
|
list.Concat(taicpu.op_reg(a_get_local, ref.base));
|
||||||
list.Concat(taicpu.op_reg(a_get_local, ref.index));
|
|
||||||
list.Concat(taicpu.op_none(a_i32_add));
|
|
||||||
incstack(list,1);
|
incstack(list,1);
|
||||||
|
list.Concat(taicpu.op_reg(a_get_local, ref.index));
|
||||||
|
incstack(list,1);
|
||||||
|
list.Concat(taicpu.op_none(a_i32_add));
|
||||||
|
decstack(list,1);
|
||||||
end;
|
end;
|
||||||
ref.base:=NR_NO;
|
ref.base:=NR_NO;
|
||||||
ref.index:=NR_NO;
|
ref.index:=NR_NO;
|
||||||
@ -1140,6 +1144,7 @@ implementation
|
|||||||
else // if (ref.base = NR_FRAME_POINTER_REG) then
|
else // if (ref.base = NR_FRAME_POINTER_REG) then
|
||||||
begin
|
begin
|
||||||
list.Concat(taicpu.op_sym(a_get_local, current_asmdata.RefAsmSymbol(FRAME_POINTER_SYM,AT_ADDR) ));
|
list.Concat(taicpu.op_sym(a_get_local, current_asmdata.RefAsmSymbol(FRAME_POINTER_SYM,AT_ADDR) ));
|
||||||
|
incstack(list,1);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user