Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ext/opcache/jit/ir/dynasm/dasm_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,17 @@ void dasm_setup(Dst_DECL, const void *actionlist)
}
}

#ifndef DASM_ABORT
# define DASM_ABORT
#endif

#ifdef DASM_CHECKS
#define CK(x, st) \
do { if (!(x)) { \
D->status = DASM_S_##st|(int)(p-D->actionlist-1); return; } } while (0)
D->status = DASM_S_##st|(int)(p-D->actionlist-1); DASM_ABORT; return; } } while (0)
#define CKPL(kind, st) \
do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \
D->status = DASM_S_RANGE_##st|(int)(p-D->actionlist-1); return; } } while (0)
D->status = DASM_S_RANGE_##st|(int)(p-D->actionlist-1); DASM_ABORT; return; } } while (0)
#else
#define CK(x, st) ((void)0)
#define CKPL(kind, st) ((void)0)
Expand Down
4 changes: 2 additions & 2 deletions ext/opcache/jit/ir/dynasm/dasm_arm64.lua
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,8 @@ map_op = {
["strh_*"] = "78000000DwL",
["ldrh_*"] = "78400000DwL",
["ldrsh_*"] = "78c00000DwL|78800000DxL",
["str_*"] = "b8000000DwL|f8000000DxL|bc000000DsL|fc000000DdL",
["ldr_*"] = "18000000DwB|58000000DxB|1c000000DsB|5c000000DdB|b8400000DwL|f8400000DxL|bc400000DsL|fc400000DdL",
["str_*"] = "b8000000DwL|f8000000DxL|bc000000DsL|fc000000DdL|3c800000DqL",
["ldr_*"] = "18000000DwB|58000000DxB|1c000000DsB|5c000000DdB|9c000000DqB|b8400000DwL|f8400000DxL|bc400000DsL|fc400000DdL|3cc00000DqL",
["ldrsw_*"] = "98000000DxB|b8800000DxL",
-- NOTE: ldur etc. are handled by ldr et al.

Expand Down
7 changes: 5 additions & 2 deletions ext/opcache/jit/ir/dynasm/dasm_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,17 @@ void dasm_setup(Dst_DECL, const void *actionlist)
}
}

#ifndef DASM_ABORT
# define DASM_ABORT
#endif

#ifdef DASM_CHECKS
#define CK(x, st) \
do { if (!(x)) { \
D->status = DASM_S_##st|(int)(p-D->actionlist-1); return; } } while (0)
D->status = DASM_S_##st|(int)(p-D->actionlist-1); DASM_ABORT; return; } } while (0)
#define CKPL(kind, st) \
do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \
D->status=DASM_S_RANGE_##st|(int)(p-D->actionlist-1); return; } } while (0)
D->status=DASM_S_RANGE_##st|(int)(p-D->actionlist-1); DASM_ABORT; return; } } while (0)
#else
#define CK(x, st) ((void)0)
#define CKPL(kind, st) ((void)0)
Expand Down
10 changes: 5 additions & 5 deletions ext/opcache/jit/ir/dynasm/dasm_x86.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ local map_op = {
mfence_0 = "0FAEF0",
movapd_2 = "rmo:660F28rM|mro:660F29Rm",
movaps_2 = "rmo:0F28rM|mro:0F29Rm",
movd_2 = "rm/od:660F6ErM|rm/oq:660F6ErXM|mr/do:660F7ERm|mr/qo:",
movd_2 = "rm/od:660F6ErM|mr/do:660F7ERm",
movdqa_2 = "rmo:660F6FrM|mro:660F7FRm",
movdqu_2 = "rmo:F30F6FrM|mro:F30F7FRm",
movhlps_2 = "rro:0F12rM",
Expand All @@ -1325,7 +1325,7 @@ local map_op = {
movnti_2 = "xrqd:0FC3Rm",
movntpd_2 = "xro:660F2BRm",
movntps_2 = "xro:0F2BRm",
movq_2 = "rro:F30F7ErM|rx/oq:|xr/qo:n660FD6Rm",
movq_2 = x64 and "rro:F30F7ErM|rx/oq:|xr/qo:n660FD6Rm|rm/oq:660F6ErXM|mr/qo:660F7ERm" or "rro:F30F7ErM|rx/oq:|xr/qo:n660FD6Rm",
movsd_2 = "rro:F20F10rM|rx/oq:|xr/qo:nF20F11Rm",
movss_2 = "rro:F30F10rM|rx/od:|xr/do:F30F11Rm",
movupd_2 = "rmo:660F10rM|mro:660F11Rm",
Expand Down Expand Up @@ -1409,7 +1409,7 @@ local map_op = {
dppd_3 = "rmio:660F3A41rMU",
dpps_3 = "rmio:660F3A40rMU",
extractps_3 = "mri/do:660F3A17RmU|rri/qo:660F3A17RXmU",
insertps_3 = "rrio:660F3A41rMU|rxi/od:",
insertps_3 = "rrio:660F3A21rMU|rxi/od:",
movntdqa_2 = "rxo:660F382ArM",
mpsadbw_3 = "rmio:660F3A42rMU",
packusdw_2 = "rmo:660F382BrM",
Expand Down Expand Up @@ -1529,8 +1529,8 @@ local map_op = {
vmaskmovpd_3 = "rrxoy:660F38V2DrM|xrroy:660F38V2FRm",
vmovapd_2 = "rmoy:660Fu28rM|mroy:660Fu29Rm",
vmovaps_2 = "rmoy:0Fu28rM|mroy:0Fu29Rm",
vmovd_2 = "rm/od:660Fu6ErM|rm/oq:660FuX6ErM|mr/do:660Fu7ERm|mr/qo:",
vmovq_2 = "rro:F30Fu7ErM|rx/oq:|xr/qo:660FuD6Rm",
vmovd_2 = "rm/od:660Fu6ErM|mr/do:660Fu7ERm",
vmovq_2 = x64 and "rro:F30Fu7ErM|rx/oq:|xr/qo:660FuD6Rm|rm/oq:660FuX6ErM|mr/qo:660Fu7ERm" or "rro:F30Fu7ErM|rx/oq:|xr/qo:660FuD6Rm",
vmovddup_2 = "rmy:F20Fu12rM|rro:|rx/oq:",
vmovhlps_3 = "rrro:0FV12rM",
vmovhpd_2 = "xr/qo:660Fu17Rm",
Expand Down
2 changes: 1 addition & 1 deletion ext/opcache/jit/ir/gen_ir_fold_hash.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* IR - Lightweight JIT Compilation Framework
* (Folding engine generator)
* Copyright (C) 2022 Zend by Perforce.
* This file is part of the IR Project distributed under the MIT-style LICENSE.
* Authors: Dmitry Stogov <dmitry@php.net>
*
* Based on Mike Pall's implementation for LuaJIT.
Expand Down
Loading
Loading