jit: update SIMD code to latest syntax (#95)

This commit is contained in:
Carlo Marcelo Arenas Belón 2022-04-03 01:22:45 -07:00 committed by GitHub
parent 4ca0530b9b
commit f11c26842d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 30 deletions

View File

@ -883,14 +883,14 @@ if (char1 == char2)
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
if (common->utf && offset > 0) if (common->utf && offset > 0)
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_utf)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_utf));
else else
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs));
#else #else
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs));
#endif #endif
} }
else else
@ -904,14 +904,14 @@ else
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
if (common->utf && offset > 0) if (common->utf && offset > 0)
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_mask_utf)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_mask_utf));
else else
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_mask)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_mask));
#else #else
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_mask)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_mask));
#endif #endif
} }
else else
@ -922,14 +922,14 @@ else
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
if (common->utf && offset > 0) if (common->utf && offset > 0)
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_2_utf)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_2_utf));
else else
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_2)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_2));
#else #else
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_2)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_2));
#endif #endif
} }
} }
@ -1084,31 +1084,31 @@ if (diff == 1) {
if (char1a == char1b && char2a == char2b) { if (char1a == char1b && char2a == char2b) {
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
if (common->utf) if (common->utf)
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_0_utf)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_0_utf));
else else
#endif #endif
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_0)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_0));
} else { } else {
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
if (common->utf) if (common->utf)
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_1_utf)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_1_utf));
else else
#endif #endif
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_1)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_1));
} }
} else { } else {
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
if (common->utf) if (common->utf)
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_default_utf)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_default_utf));
else else
#endif #endif
sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W),
SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_default)); SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_default));
} }
/* Restore STR_PTR register. */ /* Restore STR_PTR register. */