-
Notifications
You must be signed in to change notification settings - Fork 242
fixes for 10.47 #819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes for 10.47 #819
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,7 +101,7 @@ return CMP(SLJIT_NOT_EQUAL, reg, 0, SLJIT_IMM, 0xdc00); | |
| } | ||
| #endif | ||
|
|
||
| #endif /* SLJIT_CONFIG_X86 || SLJIT_CONFIG_S390X */ | ||
| #endif /* SLJIT_CONFIG_X86 || SLJIT_CONFIG_ARM_64 || SLJIT_CONFIG_S390X || SLJIT_CONFIG_LOONGARCH_64 */ | ||
|
|
||
| #if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) | ||
|
|
||
|
|
@@ -229,7 +229,14 @@ switch (step) | |
| } | ||
| } | ||
|
|
||
| /* The AVX2 code path is currently disabled. | ||
| #define JIT_HAS_FAST_FORWARD_CHAR_SIMD (sljit_has_cpu_feature(SLJIT_HAS_SIMD)) | ||
| */ | ||
| #if defined(SLJIT_CONFIG_X86_64) && SLJIT_CONFIG_X86_64 | ||
| #define JIT_HAS_FAST_FORWARD_CHAR_SIMD 1 | ||
| #else | ||
| #define JIT_HAS_FAST_FORWARD_CHAR_SIMD (sljit_has_cpu_feature(SLJIT_HAS_FPU)) | ||
| #endif | ||
|
|
||
| static void fast_forward_char_simd(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2, sljit_s32 offset) | ||
| { | ||
|
|
@@ -247,10 +254,10 @@ struct sljit_jump *quit; | |
| struct sljit_jump *partial_quit[2]; | ||
| vector_compare_type compare_type = vector_compare_match1; | ||
| sljit_s32 tmp1_reg_ind = sljit_get_register_index(SLJIT_GP_REGISTER, TMP1); | ||
| sljit_s32 data_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR0); | ||
| sljit_s32 cmp1_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR1); | ||
| sljit_s32 cmp2_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR2); | ||
| sljit_s32 tmp_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR3); | ||
| sljit_s32 data_ind = sljit_get_register_index(reg_type, SLJIT_VR0); | ||
| sljit_s32 cmp1_ind = sljit_get_register_index(reg_type, SLJIT_VR1); | ||
| sljit_s32 cmp2_ind = sljit_get_register_index(reg_type, SLJIT_VR2); | ||
| sljit_s32 tmp_ind = sljit_get_register_index(reg_type, SLJIT_VR3); | ||
| sljit_u32 bit = 0; | ||
| int i; | ||
|
|
||
|
|
@@ -366,7 +373,14 @@ if (common->utf && offset > 0) | |
| #endif | ||
| } | ||
|
|
||
| /* The AVX2 code path is currently disabled. | ||
| #define JIT_HAS_FAST_REQUESTED_CHAR_SIMD (sljit_has_cpu_feature(SLJIT_HAS_SIMD)) | ||
| */ | ||
| #if defined(SLJIT_CONFIG_X86_64) && SLJIT_CONFIG_X86_64 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general I think who have a 20 year old cpu probably does not care about jit too much. However, this was a feature removal, so this could be an exception.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, apparently Debian bookworm's i386 arch requires an i686 CPU, so in theory the PCRE2 packages on that system are meant to work on CPUs without SSE2. However Debian Trixie bumped that to require a Pentium4, so unconditional use of SSSE2 is allowed. Indeed, it turns out that LLVM no longer supports targeting CPUs older than Pentium4. Since PCRE2 10.47 isn't going to be packaged for systems older than Trixie, I would be happy to use SSE2 unconditionally. But it looks easy to add the runtime check when the regex is compiled, so I'm happy either way. I can't test on such an old CPU anyway.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
FWIW NetBSD/i386 only requires a 486, and 10.47 will be also hopefully packaged and released there as well.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, great. Runtime check on i386 is good then. |
||
| #define JIT_HAS_FAST_REQUESTED_CHAR_SIMD 1 | ||
| #else | ||
| #define JIT_HAS_FAST_REQUESTED_CHAR_SIMD (sljit_has_cpu_feature(SLJIT_HAS_FPU)) | ||
| #endif | ||
|
|
||
| static jump_list *fast_requested_char_simd(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2) | ||
| { | ||
|
|
@@ -381,10 +395,10 @@ struct sljit_jump *quit; | |
| jump_list *not_found = NULL; | ||
| vector_compare_type compare_type = vector_compare_match1; | ||
| sljit_s32 tmp1_reg_ind = sljit_get_register_index(SLJIT_GP_REGISTER, TMP1); | ||
| sljit_s32 data_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR0); | ||
| sljit_s32 cmp1_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR1); | ||
| sljit_s32 cmp2_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR2); | ||
| sljit_s32 tmp_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR3); | ||
| sljit_s32 data_ind = sljit_get_register_index(reg_type, SLJIT_VR0); | ||
| sljit_s32 cmp1_ind = sljit_get_register_index(reg_type, SLJIT_VR1); | ||
| sljit_s32 cmp2_ind = sljit_get_register_index(reg_type, SLJIT_VR2); | ||
| sljit_s32 tmp_ind = sljit_get_register_index(reg_type, SLJIT_VR3); | ||
| sljit_u32 bit = 0; | ||
| int i; | ||
|
|
||
|
|
@@ -472,7 +486,14 @@ return not_found; | |
|
|
||
| #ifndef _WIN64 | ||
|
|
||
| /* The AVX2 code path is currently disabled. | ||
| #define JIT_HAS_FAST_FORWARD_CHAR_PAIR_SIMD (sljit_has_cpu_feature(SLJIT_HAS_SIMD)) | ||
| */ | ||
| #if defined(SLJIT_CONFIG_X86_64) && SLJIT_CONFIG_X86_64 | ||
| #define JIT_HAS_FAST_FORWARD_CHAR_PAIR_SIMD 1 | ||
| #else | ||
| #define JIT_HAS_FAST_FORWARD_CHAR_PAIR_SIMD (sljit_has_cpu_feature(SLJIT_HAS_FPU)) | ||
| #endif | ||
|
|
||
| static void fast_forward_char_pair_simd(compiler_common *common, sljit_s32 offs1, | ||
| PCRE2_UCHAR char1a, PCRE2_UCHAR char1b, sljit_s32 offs2, PCRE2_UCHAR char2a, PCRE2_UCHAR char2b) | ||
|
|
@@ -489,14 +510,14 @@ sljit_u32 bit1 = 0; | |
| sljit_u32 bit2 = 0; | ||
| sljit_u32 diff = IN_UCHARS(offs1 - offs2); | ||
| sljit_s32 tmp1_reg_ind = sljit_get_register_index(SLJIT_GP_REGISTER, TMP1); | ||
| sljit_s32 data1_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR0); | ||
| sljit_s32 data2_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR1); | ||
| sljit_s32 cmp1a_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR2); | ||
| sljit_s32 cmp2a_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR3); | ||
| sljit_s32 cmp1b_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR4); | ||
| sljit_s32 cmp2b_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR5); | ||
| sljit_s32 tmp1_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_VR6); | ||
| sljit_s32 tmp2_ind = sljit_get_register_index(SLJIT_SIMD_REG_128, SLJIT_TMP_DEST_VREG); | ||
| sljit_s32 data1_ind = sljit_get_register_index(reg_type, SLJIT_VR0); | ||
| sljit_s32 data2_ind = sljit_get_register_index(reg_type, SLJIT_VR1); | ||
| sljit_s32 cmp1a_ind = sljit_get_register_index(reg_type, SLJIT_VR2); | ||
| sljit_s32 cmp2a_ind = sljit_get_register_index(reg_type, SLJIT_VR3); | ||
| sljit_s32 cmp1b_ind = sljit_get_register_index(reg_type, SLJIT_VR4); | ||
| sljit_s32 cmp2b_ind = sljit_get_register_index(reg_type, SLJIT_VR5); | ||
| sljit_s32 tmp1_ind = sljit_get_register_index(reg_type, SLJIT_VR6); | ||
| sljit_s32 tmp2_ind = sljit_get_register_index(reg_type, SLJIT_TMP_DEST_VREG); | ||
| struct sljit_label *start; | ||
| #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 | ||
| struct sljit_label *restart; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could bump this to 2.71. I have never tested on anything remotely as old as 2.62. The Autoconf version doesn't affect what OS versions we support, since it's my job to run the Autoconf and check in the results for any release.
To put it another way: it's safer to have a higher version specified, since we won't be testing on anything older
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding a job in CI that bootstraps with those older versions for that test is doable, just didn't want to complicate this change with it at this time.
agree, long term we should increase that minimum to something more modern, like 2.69, which is still widely available as it would be needed if the generated/autotools files need patching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake 3.15 is our minimum, released in 2019.
We don't need to support Autoconf versions older than that, surely - it's just about forcing us as contributors/maintainers to update our tools, rather than requiring clients to use newer tools.
Do you really see a need to support anything older than 2.71? Is 2.69 a random version, or does it have particular significance (it seems to be highest version shipped in Ubuntu 20.04, for example).
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is also the most popular version in repology other than the "latest" (2.72) or "legacy"(2.13), and therefore what you would expect in "enterprise" linux like RHEL / Amazon Linux / AlmaLinux or AIX / Solaris (OpenCSW)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, RHEL 8.6 is still within its 10 year extended support, and features Autoconf 2.69.