+ introduced a_cmp_loc_reg_br, a_cmp_reg_loc_br and a_cmp_ref_loc_br

git-svn-id: branches/wasm@48195 -
This commit is contained in:
nickysn 2021-01-19 13:09:08 +00:00
parent fe5dee892f
commit aafc6423f0

View File

@ -173,6 +173,10 @@ uses
procedure a_cmp_subsetreg_reg_br(list: TAsmList; fromsubsetsize, cmpsize: tdef; cmp_op: topcmp; const sreg: tsubsetregister; reg: tregister; br: Integer);
procedure a_cmp_subsetref_reg_br(list: TAsmList; fromsubsetsize, cmpsize: tdef; cmp_op: topcmp; const sref: tsubsetreference; reg: tregister; br: Integer);
procedure a_cmp_loc_reg_br(list : TAsmList;size : tdef;cmp_op : topcmp; const loc: tlocation; reg : tregister; br: Integer);
procedure a_cmp_reg_loc_br(list : TAsmList;size : tdef;cmp_op : topcmp; reg: tregister; const loc: tlocation; br: Integer);
procedure a_cmp_ref_loc_br(list: TAsmList; size: tdef;cmp_op: topcmp; const ref: treference; const loc: tlocation; br: Integer);
procedure g_reference_loc(list: TAsmList; def: tdef; const fromloc: tlocation; out toloc: tlocation); override;
{ this routine expects that all values are already massaged into the
@ -817,6 +821,27 @@ implementation
thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
end;
procedure thlcgwasm.a_cmp_loc_reg_br(list : TAsmList;size : tdef;cmp_op : topcmp; const loc: tlocation; reg : tregister; br: Integer);
begin
a_cmp_loc_reg_stack(list,size,cmp_op,loc,reg);
current_asmdata.CurrAsmList.concat(taicpu.op_const(a_br_if,br));
thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
end;
procedure thlcgwasm.a_cmp_reg_loc_br(list : TAsmList;size : tdef;cmp_op : topcmp; reg: tregister; const loc: tlocation; br: Integer);
begin
a_cmp_reg_loc_stack(list,size,cmp_op,reg,loc);
current_asmdata.CurrAsmList.concat(taicpu.op_const(a_br_if,br));
thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
end;
procedure thlcgwasm.a_cmp_ref_loc_br(list: TAsmList; size: tdef;cmp_op: topcmp; const ref: treference; const loc: tlocation; br: Integer);
begin
a_cmp_ref_loc_stack(list,size,cmp_op,ref,loc);
current_asmdata.CurrAsmList.concat(taicpu.op_const(a_br_if,br));
thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
end;
procedure thlcgwasm.g_reference_loc(list: TAsmList; def: tdef; const fromloc: tlocation; out toloc: tlocation);
begin
case fromloc.loc of