Skip to content

Commit

Permalink
Merge pull request #160 from git-for-windows/pcre2-10.43
Browse files Browse the repository at this point in the history
pcre2: update to 10.43
  • Loading branch information
dscho authored Feb 25, 2024
2 parents a571dab + 5da7924 commit 301bdaf
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 55 deletions.
6 changes: 3 additions & 3 deletions pcre2/0001-Allow-building-an-MSYS-DLL.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 4929cb69a42acd6499e6b3047ede68cbccdd6298 Mon Sep 17 00:00:00 2001
From e13f715e224c3a30159e459b37dc2a877beea246 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <[email protected]>
Date: Tue, 13 Dec 2022 15:18:52 +0100
Subject: [PATCH 1/3] Allow building an MSYS DLL
Expand All @@ -9,10 +9,10 @@ Signed-off-by: Johannes Schindelin <[email protected]>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index ce5bda3..29bf035 100644
index 77b77f3..bd51a81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -873,7 +873,7 @@ fi
@@ -932,7 +932,7 @@ fi
NO_UNDEFINED=
EXPORT_ALL_SYMBOLS=
case $host_os in
Expand Down
4 changes: 2 additions & 2 deletions pcre2/0002-RunTest-adjust-ISO-8859-1-tests-for-Cygwin.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 8ad0f59ef58504d09b8c6c7b6ee90cd367161c3a Mon Sep 17 00:00:00 2001
From da1cb5fe906f7b52fd7b3d190ca5fcbf3b6a5436 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <[email protected]>
Date: Fri, 2 Jun 2017 17:54:57 +0200
Subject: [PATCH 2/3] RunTest: adjust ISO-8859-1 tests for Cygwin
Expand Down Expand Up @@ -33,7 +33,7 @@ Signed-off-by: Johannes Schindelin <[email protected]>
1 file changed, 38 insertions(+)

diff --git a/RunTest b/RunTest
index ae32f5d..9651592 100755
index d426a59..f0df2bb 100755
--- a/RunTest
+++ b/RunTest
@@ -572,6 +572,44 @@ for bmode in "$test8" "$test16" "$test32"; do
Expand Down
99 changes: 54 additions & 45 deletions pcre2/0003-pcre2-10.40-cygwin-jit.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
From ad41c596cf34ad496043a59e3f6567db79c5aac9 Mon Sep 17 00:00:00 2001
From faa46be2353c281ce25f53992d5a2d1fb4f26183 Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <[email protected]>
Date: Thu, 12 May 2016 20:52:27 -0500
Subject: [PATCH 3/3] pcre2-10.40-cygwin-jit

Originally added in https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/pcre2.git;a=commit;h=d2472e4e74b52cb7f0936f8978c955b311fb71c3
---
src/sljit/sljitConfigInternal.h | 6 ++--
src/sljit/sljitNativeX86_64.c | 48 +++++++++++++++----------------
src/sljit/sljitNativeX86_common.c | 16 +++++------
3 files changed, 35 insertions(+), 35 deletions(-)
src/sljit/sljitNativeX86_64.c | 50 +++++++++++++++----------------
src/sljit/sljitNativeX86_common.c | 16 +++++-----
3 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/sljit/sljitConfigInternal.h b/src/sljit/sljitConfigInternal.h
index cd3ce69..9b58923 100644
index ce4e7b0..e3f85dc 100644
--- a/src/sljit/sljitConfigInternal.h
+++ b/src/sljit/sljitConfigInternal.h
@@ -654,15 +654,15 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr);

#define SLJIT_NUMBER_OF_REGISTERS 13
@@ -603,15 +603,15 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr);
#define SLJIT_NUMBER_OF_TEMPORARY_REGISTERS 2
#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 15
#define SLJIT_NUMBER_OF_TEMPORARY_FLOAT_REGISTERS 1
-#ifndef _WIN64
+#if !defined _WIN64 && !defined __CYGWIN__
+#if !defined(_WIN64) && !defined(__CYGWIN__)
#define SLJIT_NUMBER_OF_SAVED_REGISTERS 6
#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 0
#define SLJIT_LOCALS_OFFSET_BASE 0
Expand All @@ -31,13 +31,22 @@ index cd3ce69..9b58923 100644
-#endif /* !_WIN64 */
+#endif /* !_WIN64 && !__CYGWIN__ */
#define SLJIT_PREF_SHIFT_REG SLJIT_R3

#elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
#define SLJIT_MASKED_SHIFT 1
#define SLJIT_MASKED_SHIFT32 1
diff --git a/src/sljit/sljitNativeX86_64.c b/src/sljit/sljitNativeX86_64.c
index 4e938ff..8be9dba 100644
index f313f3f..d0873c4 100644
--- a/src/sljit/sljitNativeX86_64.c
+++ b/src/sljit/sljitNativeX86_64.c
@@ -378,11 +378,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
@@ -443,7 +443,7 @@ static sljit_u8* generate_put_label_code(struct sljit_put_label *put_label, slji
return code_ptr;
}

-#ifdef _WIN64
+#if defined(_WIN64) || defined(__CYGWIN__)
typedef struct {
sljit_sw regs[2];
} sljit_sse2_reg;
@@ -457,11 +457,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
sljit_s32 word_arg_count = 0;
sljit_s32 saved_arg_count = SLJIT_KEPT_SAVEDS_COUNT(options);
sljit_s32 saved_regs_size, tmp, i;
Expand All @@ -51,16 +60,16 @@ index 4e938ff..8be9dba 100644
sljit_u8 *inst;

CHECK_ERROR();
@@ -421,7 +421,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
@@ -500,7 +500,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
PUSH_REG(reg_lmap[i]);
}

-#ifdef _WIN64
+#if defined _WIN64 || defined __CYGWIN__
local_size += SLJIT_LOCALS_OFFSET;
saved_float_regs_size = GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, 16);
saved_float_regs_size = GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sse2_reg);

@@ -429,16 +429,16 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
@@ -508,16 +508,16 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
saved_float_regs_offset = ((local_size + 0xf) & ~0xf);
local_size = saved_float_regs_offset + saved_float_regs_size;
}
Expand All @@ -80,7 +89,7 @@ index 4e938ff..8be9dba 100644
switch (word_arg_count) {
case 0:
tmp = SLJIT_R2;
@@ -453,7 +453,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
@@ -532,7 +532,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
tmp = SLJIT_R3;
break;
}
Expand All @@ -89,7 +98,7 @@ index 4e938ff..8be9dba 100644
switch (word_arg_count + float_arg_count) {
case 0:
tmp = SLJIT_R3;
@@ -468,7 +468,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
@@ -547,7 +547,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
tmp = TMP_REG1;
break;
}
Expand All @@ -98,7 +107,7 @@ index 4e938ff..8be9dba 100644
if (arg_types & SLJIT_ARG_TYPE_SCRATCH_REG) {
if (tmp != SLJIT_R0 + word_arg_count)
EMIT_MOV(compiler, SLJIT_R0 + word_arg_count, 0, tmp, 0);
@@ -478,13 +478,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
@@ -557,13 +557,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
}
word_arg_count++;
} else {
Expand All @@ -114,7 +123,7 @@ index 4e938ff..8be9dba 100644
}
arg_types >>= SLJIT_ARG_SHIFT;
}
@@ -492,7 +492,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
@@ -571,7 +571,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
local_size = ((local_size + saved_regs_size + 0xf) & ~0xf) - saved_regs_size;
compiler->local_size = local_size;

Expand All @@ -123,7 +132,7 @@ index 4e938ff..8be9dba 100644
if (local_size > 0) {
if (local_size <= 4 * 4096) {
if (local_size > 4096)
@@ -521,12 +521,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
@@ -600,12 +600,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
if (local_size > 0)
EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -local_size);
}
Expand All @@ -138,7 +147,7 @@ index 4e938ff..8be9dba 100644
if (saved_float_regs_size > 0) {
compiler->mode32 = 1;

@@ -545,7 +545,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
@@ -620,7 +620,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
saved_float_regs_offset += 16;
}
}
Expand All @@ -147,7 +156,7 @@ index 4e938ff..8be9dba 100644

return SLJIT_SUCCESS;
}
@@ -555,23 +555,23 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp
@@ -630,23 +630,23 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp
sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
{
sljit_s32 saved_regs_size;
Expand All @@ -164,7 +173,7 @@ index 4e938ff..8be9dba 100644
-#ifdef _WIN64
+#if defined _WIN64 || defined __CYGWIN__
local_size += SLJIT_LOCALS_OFFSET;
saved_float_regs_size = GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, 16);
saved_float_regs_size = GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sse2_reg);

if (saved_float_regs_size > 0)
local_size = ((local_size + 0xf) & ~0xf) + saved_float_regs_size;
Expand All @@ -176,7 +185,7 @@ index 4e938ff..8be9dba 100644

/* Including the return address saved by the call instruction. */
saved_regs_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds - SLJIT_KEPT_SAVEDS_COUNT(options), 1);
@@ -584,13 +584,13 @@ static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler, sljit
@@ -659,13 +659,13 @@ static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler, sljit
sljit_uw size;
sljit_s32 local_size, i, tmp;
sljit_u8 *inst;
Expand All @@ -189,11 +198,11 @@ index 4e938ff..8be9dba 100644
+#endif /* _WIN64 || __CYGWIN__ */

-#ifdef _WIN64
+#if defined _WIN64 || defined __CYGWIN__
saved_float_regs_offset = GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, 16);
+#if defined(_WIN64) || defined(__CYGWIN__)
saved_float_regs_offset = GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sse2_reg);

if (saved_float_regs_offset > 0) {
@@ -614,7 +614,7 @@ static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler, sljit
@@ -685,7 +685,7 @@ static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler, sljit

compiler->mode32 = 0;
}
Expand All @@ -202,7 +211,7 @@ index 4e938ff..8be9dba 100644

local_size = compiler->local_size;

@@ -698,7 +698,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_to(struct sljit_compiler *c
@@ -762,7 +762,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_to(struct sljit_compiler *c
/* Call / return instructions */
/* --------------------------------------------------------------------- */

Expand All @@ -212,19 +221,19 @@ index 4e938ff..8be9dba 100644
static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_s32 *src_ptr)
{
diff --git a/src/sljit/sljitNativeX86_common.c b/src/sljit/sljitNativeX86_common.c
index 651942b..7df34b7 100644
index c2c0421..da8af3d 100644
--- a/src/sljit/sljitNativeX86_common.c
+++ b/src/sljit/sljitNativeX86_common.c
@@ -88,7 +88,7 @@ static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 3] = {
@@ -95,7 +95,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 2] = {
/* Note: r12 & 0x7 == 0b100, which decoded as SIB byte present
Note: avoid to use r12 and r13 for memory addessing
Note: avoid to use r12 and r13 for memory addressing
therefore r12 is better to be a higher saved register. */
-#ifndef _WIN64
+#if !defined _WIN64 && !defined __CYGWIN__
/* Args: rdi(=7), rsi(=6), rdx(=2), rcx(=1), r8, r9. Scratches: rax(=0), r10, r11 */
static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 4] = {
0, 0, 6, 7, 1, 8, 11, 10, 12, 5, 13, 14, 15, 3, 4, 2, 9
@@ -123,7 +123,7 @@ static const sljit_u8 freg_lmap[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1] = {
@@ -130,7 +130,7 @@ static const sljit_u8 freg_lmap[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 2] = {
#define REX_B 0x41
#define REX 0x40

Expand All @@ -233,7 +242,7 @@ index 651942b..7df34b7 100644
#define HALFWORD_MAX 0x7fffffffl
#define HALFWORD_MIN -0x80000000l
#else
@@ -1101,7 +1101,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
@@ -1228,7 +1228,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
case SLJIT_DIV_UW:
case SLJIT_DIV_SW:
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
Expand All @@ -242,7 +251,7 @@ index 651942b..7df34b7 100644
SLJIT_ASSERT(
reg_map[SLJIT_R0] == 0
&& reg_map[SLJIT_R1] == 2
@@ -1118,7 +1118,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
@@ -1245,7 +1245,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile

op = GET_OPCODE(op);
if ((op | 0x2) == SLJIT_DIV_UW) {
Expand All @@ -251,7 +260,7 @@ index 651942b..7df34b7 100644
EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_R1, 0);
inst = emit_x86_instruction(compiler, 1, SLJIT_R1, 0, SLJIT_R1, 0);
#else
@@ -1129,7 +1129,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
@@ -1256,7 +1256,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
}

if ((op | 0x2) == SLJIT_DIV_SW) {
Expand All @@ -260,16 +269,16 @@ index 651942b..7df34b7 100644
EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_R1, 0);
#endif

@@ -1161,7 +1161,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
*inst++ = GROUP_F7;
*inst = MOD_REG | ((op >= SLJIT_DIVMOD_UW) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]);
#else
@@ -1281,7 +1281,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
inst[0] = GROUP_F7;
inst[1] = MOD_REG | ((op >= SLJIT_DIVMOD_UW) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]);
#else /* !SLJIT_CONFIG_X86_32 */
-#ifdef _WIN64
+#if defined _WIN64 || defined __CYGWIN__
+#if defined(_WIN64) || defined(__CYGWIN__)
size = (!compiler->mode32 || op >= SLJIT_DIVMOD_UW) ? 3 : 2;
#else
#else /* !_WIN64 */
size = (!compiler->mode32) ? 3 : 2;
@@ -1169,7 +1169,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
@@ -1289,7 +1289,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
FAIL_IF(!inst);
INC_SIZE(size);
Expand All @@ -278,8 +287,8 @@ index 651942b..7df34b7 100644
if (!compiler->mode32)
*inst++ = REX_W | ((op >= SLJIT_DIVMOD_UW) ? REX_B : 0);
else if (op >= SLJIT_DIVMOD_UW)
@@ -1199,7 +1199,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
*inst |= IDIV;
@@ -1319,7 +1319,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
inst[1] |= IDIV;
break;
}
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && !defined(_WIN64)
Expand Down
10 changes: 5 additions & 5 deletions pcre2/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pkgbase=pcre2
pkgname=('pcre2' 'libpcre2_8' 'libpcre2_16' 'libpcre2_32' 'libpcre2posix' 'pcre2-devel')
pkgver=10.42
pkgver=10.43
pkgrel=1
pkgdesc="A library that implements Perl 5-style regular expressions"
arch=('i686' 'x86_64')
Expand All @@ -13,11 +13,11 @@ source=(https://github.com/PCRE2project/pcre2/releases/download/${pkgbase}-${pkg
0001-Allow-building-an-MSYS-DLL.patch
0002-RunTest-adjust-ISO-8859-1-tests-for-Cygwin.patch
0003-pcre2-10.40-cygwin-jit.patch)
sha256sums=('8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840'
sha256sums=('e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb'
'SKIP'
'f1d83ee9cdb5b6885b51fdcae7285edf6078391240db458ba3032fcdcec20260'
'f6550e4ba5b26c404e956a55e371aa9a498972aa6a70ace4f8775f30c26f626b'
'df4f6b1e63e33930076733906e70d754e4bba52e4b81bb2237ba7658d0bc1587')
'c281d6d726c4119bccfa08479a87d8381df61df5ad365e697cbf68f961ffea71'
'576f96714c30cf011473dc39d79edb8f2deb70df12dbfb2f53dd6986b965178e'
'4199607d30271e5cce9758740d30de564d3375b6da92ba1bbe484bfe980f487e')
validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel <[email protected]>

prepare() {
Expand Down

0 comments on commit 301bdaf

Please sign in to comment.