+ support references with only index reg, and no base reg in thlcgwasm.prepare_stack_for_ref

git-svn-id: branches/wasm@48179 -
This commit is contained in:
nickysn 2021-01-18 22:35:56 +00:00
parent c4e8f091ec
commit af41eee9d1

View File

@ -998,6 +998,12 @@ implementation
if (ref.base=NR_EVAL_STACK_BASE) or (ref.base=NR_LOCAL_STACK_POINTER_REG) then
exit;
if (ref.base=NR_NO) and (ref.index<>NR_NO) and (ref.scalefactor<=1) then
begin
ref.base:=ref.index;
ref.index:=NR_NO;
end;
// setting up memory offset
if assigned(ref.symbol) and (ref.base=NR_NO) and (ref.index=NR_NO) then
begin