* replace NR_LOCAL_FRAME_POINTER_REG with tcpuprocdef(current_procinfo.procdef).frame_pointer_ref in the wasm32 register allocator

git-svn-id: branches/wasm@47884 -
This commit is contained in:
nickysn 2020-12-29 04:48:03 +00:00
parent 4a1c295955
commit 4d0909d4d3

View File

@ -54,7 +54,7 @@ implementation
globtype,globals,
cgobj,
tgobj,
symtype,symdef;
symtype,symdef,symcpu;
{ trgcpu }
@ -67,10 +67,13 @@ implementation
operand, so there is no danger of superregister conflicts }
for l:=0 to instr.ops-1 do
if instr.oper[l]^.typ=top_reg then
begin
reg:=instr.oper[l]^.reg;
instr.loadref(l,spilltemps[getregtype(reg)]^[getsupreg(reg)]);
end;
if instr.oper[l]^.reg=NR_LOCAL_FRAME_POINTER_REG then
instr.loadref(l,tcpuprocdef(current_procinfo.procdef).frame_pointer_ref)
else
begin
reg:=instr.oper[l]^.reg;
instr.loadref(l,spilltemps[getregtype(reg)]^[getsupreg(reg)]);
end;
end;