晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /opt/cpanel/ea-php81/root/usr/include/php/ext/pcre/pcre2lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/cpanel/ea-php81/root/usr/include/php/ext/pcre/pcre2lib/pcre2_jit_neon_inc.h
/*************************************************
*      Perl-Compatible Regular Expressions       *
*************************************************/

/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.

                       Written by Philip Hazel
            This module by Zoltan Herczeg and Sebastian Pop
     Original API code Copyright (c) 1997-2012 University of Cambridge
          New API code Copyright (c) 2016-2019 University of Cambridge

-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.

    * Neither the name of the University of Cambridge nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/

# if defined(FFCS)
#  if defined(FF_UTF)
#   define FF_FUN ffcs_utf
#  else
#   define FF_FUN ffcs
#  endif

# elif defined(FFCS_2)
#  if defined(FF_UTF)
#   define FF_FUN ffcs_2_utf
#  else
#   define FF_FUN ffcs_2
#  endif

# elif defined(FFCS_MASK)
#  if defined(FF_UTF)
#   define FF_FUN ffcs_mask_utf
#  else
#   define FF_FUN ffcs_mask
#  endif

# elif defined(FFCPS_0)
#  if defined (FF_UTF)
#   define FF_FUN ffcps_0_utf
#  else
#   define FF_FUN ffcps_0
#  endif

# elif defined (FFCPS_1)
#  if defined (FF_UTF)
#   define FF_FUN ffcps_1_utf
#  else
#   define FF_FUN ffcps_1
#  endif

# elif defined (FFCPS_DEFAULT)
#  if defined (FF_UTF)
#   define FF_FUN ffcps_default_utf
#  else
#   define FF_FUN ffcps_default
#  endif
# endif

static sljit_u8* SLJIT_FUNC FF_FUN(sljit_u8 *str_end, sljit_u8 *str_ptr, sljit_uw offs1, sljit_uw offs2, sljit_uw chars)
#undef FF_FUN
{
quad_word qw;
int_char ic;

SLJIT_UNUSED_ARG(offs1);
SLJIT_UNUSED_ARG(offs2);

ic.x = chars;

#if defined(FFCS)
sljit_u8 c1 = ic.c.c1;
vect_t vc1 = VDUPQ(c1);

#elif defined(FFCS_2)
sljit_u8 c1 = ic.c.c1;
vect_t vc1 = VDUPQ(c1);
sljit_u8 c2 = ic.c.c2;
vect_t vc2 = VDUPQ(c2);

#elif defined(FFCS_MASK)
sljit_u8 c1 = ic.c.c1;
vect_t vc1 = VDUPQ(c1);
sljit_u8 mask = ic.c.c2;
vect_t vmask = VDUPQ(mask);
#endif

#if defined(FFCPS)
compare_type compare1_type = compare_match1;
compare_type compare2_type = compare_match1;
vect_t cmp1a, cmp1b, cmp2a, cmp2b;
const sljit_u32 diff = IN_UCHARS(offs1 - offs2);
PCRE2_UCHAR char1a = ic.c.c1;
PCRE2_UCHAR char2a = ic.c.c3;

# ifdef FFCPS_CHAR1A2A
cmp1a = VDUPQ(char1a);
cmp2a = VDUPQ(char2a);
cmp1b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */
cmp2b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */
# else
PCRE2_UCHAR char1b = ic.c.c2;
PCRE2_UCHAR char2b = ic.c.c4;
if (char1a == char1b)
  {
  cmp1a = VDUPQ(char1a);
  cmp1b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */
  }
else
  {
  sljit_u32 bit1 = char1a ^ char1b;
  if (is_powerof2(bit1))
    {
    compare1_type = compare_match1i;
    cmp1a = VDUPQ(char1a | bit1);
    cmp1b = VDUPQ(bit1);
    }
  else
    {
    compare1_type = compare_match2;
    cmp1a = VDUPQ(char1a);
    cmp1b = VDUPQ(char1b);
    }
  }

if (char2a == char2b)
  {
  cmp2a = VDUPQ(char2a);
  cmp2b = VDUPQ(0); /* to avoid errors on older compilers -Werror=maybe-uninitialized */
  }
else
  {
  sljit_u32 bit2 = char2a ^ char2b;
  if (is_powerof2(bit2))
    {
    compare2_type = compare_match1i;
    cmp2a = VDUPQ(char2a | bit2);
    cmp2b = VDUPQ(bit2);
    }
  else
    {
    compare2_type = compare_match2;
    cmp2a = VDUPQ(char2a);
    cmp2b = VDUPQ(char2b);
    }
  }
# endif

str_ptr += IN_UCHARS(offs1);
#endif

#if PCRE2_CODE_UNIT_WIDTH != 8
vect_t char_mask = VDUPQ(0xff);
#endif

#if defined(FF_UTF)
restart:;
#endif

#if defined(FFCPS)
sljit_u8 *p1 = str_ptr - diff;
#endif
sljit_s32 align_offset = ((uint64_t)str_ptr & 0xf);
str_ptr = (sljit_u8 *) ((uint64_t)str_ptr & ~0xf);
vect_t data = VLD1Q(str_ptr);
#if PCRE2_CODE_UNIT_WIDTH != 8
data = VANDQ(data, char_mask);
#endif
 
#if defined(FFCS)
vect_t eq = VCEQQ(data, vc1);

#elif defined(FFCS_2)
vect_t eq1 = VCEQQ(data, vc1);
vect_t eq2 = VCEQQ(data, vc2);
vect_t eq = VORRQ(eq1, eq2);    

#elif defined(FFCS_MASK)
vect_t eq = VORRQ(data, vmask);
eq = VCEQQ(eq, vc1);

#elif defined(FFCPS)
# if defined(FFCPS_DIFF1)
vect_t prev_data = data;
# endif

vect_t data2;
if (p1 < str_ptr)
  {
  data2 = VLD1Q(str_ptr - diff);
#if PCRE2_CODE_UNIT_WIDTH != 8
  data2 = VANDQ(data2, char_mask);
#endif
  }
else
  data2 = shift_left_n_lanes(data, offs1 - offs2);
 
if (compare1_type == compare_match1)
  data = VCEQQ(data, cmp1a);
else
  data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b);

if (compare2_type == compare_match1)
  data2 = VCEQQ(data2, cmp2a);
else
  data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b);

vect_t eq = VANDQ(data, data2);
#endif

VST1Q(qw.mem, eq);
/* Ignore matches before the first STR_PTR. */
if (align_offset < 8)
  {
  qw.dw[0] >>= align_offset * 8;
  if (qw.dw[0])
    {
    str_ptr += align_offset + __builtin_ctzll(qw.dw[0]) / 8;
    goto match;
    }
  if (qw.dw[1])
    {
    str_ptr += 8 + __builtin_ctzll(qw.dw[1]) / 8;
    goto match;
    }
  }
else
  {
  qw.dw[1] >>= (align_offset - 8) * 8;
  if (qw.dw[1])
    {
    str_ptr += align_offset + __builtin_ctzll(qw.dw[1]) / 8;
    goto match;
    }
  }
str_ptr += 16;

while (str_ptr < str_end)
  {
  vect_t orig_data = VLD1Q(str_ptr);
#if PCRE2_CODE_UNIT_WIDTH != 8
  orig_data = VANDQ(orig_data, char_mask);
#endif
  data = orig_data;

#if defined(FFCS)
  eq = VCEQQ(data, vc1);

#elif defined(FFCS_2)
  eq1 = VCEQQ(data, vc1);
  eq2 = VCEQQ(data, vc2);
  eq = VORRQ(eq1, eq2);    

#elif defined(FFCS_MASK)
  eq = VORRQ(data, vmask);
  eq = VCEQQ(eq, vc1);
#endif

#if defined(FFCPS)
# if defined (FFCPS_DIFF1)
  data2 = VEXTQ(prev_data, data, VECTOR_FACTOR - 1);
# else
  data2 = VLD1Q(str_ptr - diff);
#  if PCRE2_CODE_UNIT_WIDTH != 8
  data2 = VANDQ(data2, char_mask);
#  endif
# endif

# ifdef FFCPS_CHAR1A2A
  data = VCEQQ(data, cmp1a);
  data2 = VCEQQ(data2, cmp2a);
# else
  if (compare1_type == compare_match1)
    data = VCEQQ(data, cmp1a);
  else
    data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b);
  if (compare2_type == compare_match1)
    data2 = VCEQQ(data2, cmp2a);
  else
    data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b);
# endif

  eq = VANDQ(data, data2);
#endif

  VST1Q(qw.mem, eq);
  if (qw.dw[0])
    str_ptr += __builtin_ctzll(qw.dw[0]) / 8;
  else if (qw.dw[1])
    str_ptr += 8 + __builtin_ctzll(qw.dw[1]) / 8;
  else {
    str_ptr += 16;
#if defined (FFCPS_DIFF1)
    prev_data = orig_data;
#endif
    continue;
  }

match:;
  if (str_ptr >= str_end)
    /* Failed match. */
    return NULL;

#if defined(FF_UTF)
  if (utf_continue(str_ptr + IN_UCHARS(-offs1)))
    {
    /* Not a match. */
    str_ptr += IN_UCHARS(1);
    goto restart;
    }
#endif

  /* Match. */
#if defined (FFCPS)
  str_ptr -= IN_UCHARS(offs1);
#endif
  return str_ptr;
  }

/* Failed match. */
return NULL;
}

haha - 2025