From d92679d412d965fb4128e9e84df694db229fafbf Mon Sep 17 00:00:00 2001 From: Pavel <68122101+red-prig@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:45:33 +0300 Subject: [PATCH] + --- sys/jit/kern_jit_ops.pas | 84 ++++++++++++++++++++++++++++------------ 1 file changed, 59 insertions(+), 25 deletions(-) diff --git a/sys/jit/kern_jit_ops.pas b/sys/jit/kern_jit_ops.pas index 2b3bfe86..cfd1da40 100644 --- a/sys/jit/kern_jit_ops.pas +++ b/sys/jit/kern_jit_ops.pas @@ -1657,37 +1657,71 @@ procedure init_cbs; begin // - jit_rep_cbs[repOPmovs]:=@op_rep_movs; - jit_rep_cbs[repOPlods]:=nil; - jit_rep_cbs[repOPstos]:=@op_rep_stos; - jit_rep_cbs[repOPcmps]:=@op_rep_cmps; - jit_rep_cbs[repOPscas]:=nil; + if jit_memory_guard then + begin + jit_rep_cbs[repOPmovs]:=@op_rep_movs; + jit_rep_cbs[repOPlods]:=nil; + jit_rep_cbs[repOPstos]:=@op_rep_stos; + jit_rep_cbs[repOPcmps]:=@op_rep_cmps; + jit_rep_cbs[repOPscas]:=nil; - jit_cbs[OPPnone,OPcmps,OPSx_b]:=@op_cmps; - jit_cbs[OPPnone,OPcmps,OPSx_w]:=@op_cmps; - jit_cbs[OPPnone,OPcmps,OPSx_d]:=@op_cmps; - jit_cbs[OPPnone,OPcmps,OPSx_q]:=@op_cmps; + jit_cbs[OPPnone,OPcmps,OPSx_b]:=@op_cmps; + jit_cbs[OPPnone,OPcmps,OPSx_w]:=@op_cmps; + jit_cbs[OPPnone,OPcmps,OPSx_d]:=@op_cmps; + jit_cbs[OPPnone,OPcmps,OPSx_q]:=@op_cmps; + jit_cbs[OPPnone,OPmovs,OPSx_b]:=@op_movs; + jit_cbs[OPPnone,OPmovs,OPSx_w]:=@op_movs; + jit_cbs[OPPnone,OPmovs,OPSx_d]:=@op_movs; + jit_cbs[OPPnone,OPmovs,OPSx_q]:=@op_movs; - jit_cbs[OPPnone,OPmovs,OPSx_b]:=@op_movs; - jit_cbs[OPPnone,OPmovs,OPSx_w]:=@op_movs; - jit_cbs[OPPnone,OPmovs,OPSx_d]:=@op_movs; - jit_cbs[OPPnone,OPmovs,OPSx_q]:=@op_movs; + jit_cbs[OPPnone,OPstos,OPSx_b]:=@op_stos; + jit_cbs[OPPnone,OPstos,OPSx_w]:=@op_stos; + jit_cbs[OPPnone,OPstos,OPSx_d]:=@op_stos; + jit_cbs[OPPnone,OPstos,OPSx_q]:=@op_stos; - jit_cbs[OPPnone,OPstos,OPSx_b]:=@op_stos; - jit_cbs[OPPnone,OPstos,OPSx_w]:=@op_stos; - jit_cbs[OPPnone,OPstos,OPSx_d]:=@op_stos; - jit_cbs[OPPnone,OPstos,OPSx_q]:=@op_stos; + jit_cbs[OPPnone,OPlods,OPSx_b]:=@op_lods; + jit_cbs[OPPnone,OPlods,OPSx_w]:=@op_lods; + jit_cbs[OPPnone,OPlods,OPSx_d]:=@op_lods; + jit_cbs[OPPnone,OPlods,OPSx_q]:=@op_lods; - jit_cbs[OPPnone,OPlods,OPSx_b]:=@op_lods; - jit_cbs[OPPnone,OPlods,OPSx_w]:=@op_lods; - jit_cbs[OPPnone,OPlods,OPSx_d]:=@op_lods; - jit_cbs[OPPnone,OPlods,OPSx_q]:=@op_lods; + jit_cbs[OPPnone,OPscas,OPSx_b]:=@op_scas; + jit_cbs[OPPnone,OPscas,OPSx_w]:=@op_scas; + jit_cbs[OPPnone,OPscas,OPSx_d]:=@op_scas; + jit_cbs[OPPnone,OPscas,OPSx_q]:=@op_scas; + end else + begin + jit_rep_cbs[repOPmovs]:=@add_orig; + jit_rep_cbs[repOPlods]:=nil; + jit_rep_cbs[repOPstos]:=@add_orig; + jit_rep_cbs[repOPcmps]:=@add_orig; + jit_rep_cbs[repOPscas]:=nil; - jit_cbs[OPPnone,OPscas,OPSx_b]:=@op_scas; - jit_cbs[OPPnone,OPscas,OPSx_w]:=@op_scas; - jit_cbs[OPPnone,OPscas,OPSx_d]:=@op_scas; - jit_cbs[OPPnone,OPscas,OPSx_q]:=@op_scas; + jit_cbs[OPPnone,OPcmps,OPSx_b]:=@add_orig; + jit_cbs[OPPnone,OPcmps,OPSx_w]:=@add_orig; + jit_cbs[OPPnone,OPcmps,OPSx_d]:=@add_orig; + jit_cbs[OPPnone,OPcmps,OPSx_q]:=@add_orig; + + jit_cbs[OPPnone,OPmovs,OPSx_b]:=@add_orig; + jit_cbs[OPPnone,OPmovs,OPSx_w]:=@add_orig; + jit_cbs[OPPnone,OPmovs,OPSx_d]:=@add_orig; + jit_cbs[OPPnone,OPmovs,OPSx_q]:=@add_orig; + + jit_cbs[OPPnone,OPstos,OPSx_b]:=@add_orig; + jit_cbs[OPPnone,OPstos,OPSx_w]:=@add_orig; + jit_cbs[OPPnone,OPstos,OPSx_d]:=@add_orig; + jit_cbs[OPPnone,OPstos,OPSx_q]:=@add_orig; + + jit_cbs[OPPnone,OPlods,OPSx_b]:=@add_orig; + jit_cbs[OPPnone,OPlods,OPSx_w]:=@add_orig; + jit_cbs[OPPnone,OPlods,OPSx_d]:=@add_orig; + jit_cbs[OPPnone,OPlods,OPSx_q]:=@add_orig; + + jit_cbs[OPPnone,OPscas,OPSx_b]:=@add_orig; + jit_cbs[OPPnone,OPscas,OPSx_w]:=@add_orig; + jit_cbs[OPPnone,OPscas,OPSx_d]:=@add_orig; + jit_cbs[OPPnone,OPscas,OPSx_q]:=@add_orig; + end; //