mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
Merge pull request #143 from VectorCamp/develop
Prepare for new release 5.4.9
This commit is contained in:
commit
b4bba94b1a
@ -4,7 +4,7 @@ project (vectorscan C CXX)
|
|||||||
|
|
||||||
set (HS_MAJOR_VERSION 5)
|
set (HS_MAJOR_VERSION 5)
|
||||||
set (HS_MINOR_VERSION 4)
|
set (HS_MINOR_VERSION 4)
|
||||||
set (HS_PATCH_VERSION 8)
|
set (HS_PATCH_VERSION 9)
|
||||||
set (HS_VERSION ${HS_MAJOR_VERSION}.${HS_MINOR_VERSION}.${HS_PATCH_VERSION})
|
set (HS_VERSION ${HS_MAJOR_VERSION}.${HS_MINOR_VERSION}.${HS_PATCH_VERSION})
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
@ -544,7 +544,6 @@ endif()
|
|||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_C_FLAGS}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_C_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_CXX_FLAGS}")
|
||||||
|
|
||||||
add_subdirectory(util)
|
|
||||||
add_subdirectory(doc/dev-reference)
|
add_subdirectory(doc/dev-reference)
|
||||||
|
|
||||||
# PCRE check, we have a fixed requirement for PCRE to use Chimera
|
# PCRE check, we have a fixed requirement for PCRE to use Chimera
|
||||||
@ -588,7 +587,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS}")
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXX_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RAGEL_C_FLAGS "-Wno-unused")
|
set(RAGEL_C_FLAGS "-Wno-unused -funsigned-char")
|
||||||
|
|
||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
${CMAKE_BINARY_DIR}/src/parser/Parser.cpp
|
${CMAKE_BINARY_DIR}/src/parser/Parser.cpp
|
||||||
@ -604,6 +603,8 @@ set_source_files_properties(
|
|||||||
|
|
||||||
ragelmaker(src/parser/control_verbs.rl)
|
ragelmaker(src/parser/control_verbs.rl)
|
||||||
|
|
||||||
|
add_subdirectory(util)
|
||||||
|
|
||||||
SET(hs_HEADERS
|
SET(hs_HEADERS
|
||||||
src/hs.h
|
src/hs.h
|
||||||
src/hs_common.h
|
src/hs_common.h
|
||||||
|
@ -7,7 +7,7 @@ function(ragelmaker src_rl)
|
|||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${src_dir}/${src_file}.cpp
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${src_dir}/${src_file}.cpp
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${src_dir}
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${src_dir}
|
||||||
COMMAND ${RAGEL} ${CMAKE_CURRENT_SOURCE_DIR}/${src_rl} -o ${rl_out}
|
COMMAND ${RAGEL} ${CMAKE_CURRENT_SOURCE_DIR}/${src_rl} -o ${rl_out} -G0
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${src_rl}
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${src_rl}
|
||||||
)
|
)
|
||||||
add_custom_target(ragel_${src_file} DEPENDS ${rl_out})
|
add_custom_target(ragel_${src_file} DEPENDS ${rl_out})
|
||||||
|
@ -348,7 +348,7 @@ static really_inline
|
|||||||
m512 vectoredLoad512(m512 *p_mask, const u8 *ptr, const size_t start_offset,
|
m512 vectoredLoad512(m512 *p_mask, const u8 *ptr, const size_t start_offset,
|
||||||
const u8 *lo, const u8 *hi, const u8 *hbuf, size_t hlen,
|
const u8 *lo, const u8 *hi, const u8 *hbuf, size_t hlen,
|
||||||
const u32 nMasks) {
|
const u32 nMasks) {
|
||||||
m512 val;
|
m512 val = zeroes512();
|
||||||
|
|
||||||
uintptr_t copy_start;
|
uintptr_t copy_start;
|
||||||
uintptr_t copy_len;
|
uintptr_t copy_len;
|
||||||
|
2
src/hs.h
2
src/hs.h
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#define HS_MAJOR 5
|
#define HS_MAJOR 5
|
||||||
#define HS_MINOR 4
|
#define HS_MINOR 4
|
||||||
#define HS_PATCH 0
|
#define HS_PATCH 9
|
||||||
|
|
||||||
#include "hs_compile.h"
|
#include "hs_compile.h"
|
||||||
#include "hs_runtime.h"
|
#include "hs_runtime.h"
|
||||||
|
@ -272,6 +272,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
|||||||
|
|
||||||
%%{
|
%%{
|
||||||
machine regex;
|
machine regex;
|
||||||
|
alphtype unsigned char;
|
||||||
|
|
||||||
action throwUnsupportedEscape {
|
action throwUnsupportedEscape {
|
||||||
ostringstream str;
|
ostringstream str;
|
||||||
|
@ -54,6 +54,7 @@ const char *read_control_verbs(const char *ptr, const char *end, size_t start,
|
|||||||
|
|
||||||
%%{
|
%%{
|
||||||
machine ControlVerbs;
|
machine ControlVerbs;
|
||||||
|
alphtype unsigned char;
|
||||||
|
|
||||||
# Verbs that we recognise but do not support.
|
# Verbs that we recognise but do not support.
|
||||||
unhandledVerbs = '(*' (
|
unhandledVerbs = '(*' (
|
||||||
|
@ -254,7 +254,7 @@ static really_inline m256 loadu2x128(const void *ptr) {
|
|||||||
// aligned store
|
// aligned store
|
||||||
static really_inline void store256(void *ptr, m256 a) {
|
static really_inline void store256(void *ptr, m256 a) {
|
||||||
assert(ISALIGNED_N(ptr, alignof(m256)));
|
assert(ISALIGNED_N(ptr, alignof(m256)));
|
||||||
ptr = assume_aligned(ptr, 16);
|
ptr = vectorscan_assume_aligned(ptr, 16);
|
||||||
*(m256 *)ptr = a;
|
*(m256 *)ptr = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -486,7 +486,7 @@ static really_inline m384 load384(const void *ptr) {
|
|||||||
// aligned store
|
// aligned store
|
||||||
static really_inline void store384(void *ptr, m384 a) {
|
static really_inline void store384(void *ptr, m384 a) {
|
||||||
assert(ISALIGNED_16(ptr));
|
assert(ISALIGNED_16(ptr));
|
||||||
ptr = assume_aligned(ptr, 16);
|
ptr = vectorscan_assume_aligned(ptr, 16);
|
||||||
*(m384 *)ptr = a;
|
*(m384 *)ptr = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,14 +278,14 @@ static really_inline m128 andnot128(m128 a, m128 b) {
|
|||||||
// aligned load
|
// aligned load
|
||||||
static really_inline m128 load128(const void *ptr) {
|
static really_inline m128 load128(const void *ptr) {
|
||||||
assert(ISALIGNED_N(ptr, alignof(m128)));
|
assert(ISALIGNED_N(ptr, alignof(m128)));
|
||||||
ptr = assume_aligned(ptr, 16);
|
ptr = vectorscan_assume_aligned(ptr, 16);
|
||||||
return _mm_load_si128((const m128 *)ptr);
|
return _mm_load_si128((const m128 *)ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// aligned store
|
// aligned store
|
||||||
static really_inline void store128(void *ptr, m128 a) {
|
static really_inline void store128(void *ptr, m128 a) {
|
||||||
assert(ISALIGNED_N(ptr, alignof(m128)));
|
assert(ISALIGNED_N(ptr, alignof(m128)));
|
||||||
ptr = assume_aligned(ptr, 16);
|
ptr = vectorscan_assume_aligned(ptr, 16);
|
||||||
*(m128 *)ptr = a;
|
*(m128 *)ptr = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,17 +40,17 @@
|
|||||||
// it's available. Note that we need to handle C or C++ compilation.
|
// it's available. Note that we need to handle C or C++ compilation.
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
# ifdef HAVE_CXX_BUILTIN_ASSUME_ALIGNED
|
# ifdef HAVE_CXX_BUILTIN_ASSUME_ALIGNED
|
||||||
# define assume_aligned(x, y) __builtin_assume_aligned((x), (y))
|
# define vectorscan_assume_aligned(x, y) __builtin_assume_aligned((x), (y))
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# ifdef HAVE_CC_BUILTIN_ASSUME_ALIGNED
|
# ifdef HAVE_CC_BUILTIN_ASSUME_ALIGNED
|
||||||
# define assume_aligned(x, y) __builtin_assume_aligned((x), (y))
|
# define vectorscan_assume_aligned(x, y) __builtin_assume_aligned((x), (y))
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Fallback to identity case.
|
// Fallback to identity case.
|
||||||
#ifndef assume_aligned
|
#ifndef vectorscan_assume_aligned
|
||||||
#define assume_aligned(x, y) (x)
|
#define vectorscan_assume_aligned(x, y) (x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -518,7 +518,7 @@ template <>
|
|||||||
really_inline SuperVector<16> SuperVector<16>::load(void const *ptr)
|
really_inline SuperVector<16> SuperVector<16>::load(void const *ptr)
|
||||||
{
|
{
|
||||||
assert(ISALIGNED_N(ptr, alignof(SuperVector::size)));
|
assert(ISALIGNED_N(ptr, alignof(SuperVector::size)));
|
||||||
ptr = assume_aligned(ptr, SuperVector::size);
|
ptr = vectorscan_assume_aligned(ptr, SuperVector::size);
|
||||||
return {vld1q_s32((const int32_t *)ptr)};
|
return {vld1q_s32((const int32_t *)ptr)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ template <>
|
|||||||
really_inline SuperVector<16> SuperVector<16>::load(void const *ptr)
|
really_inline SuperVector<16> SuperVector<16>::load(void const *ptr)
|
||||||
{
|
{
|
||||||
assert(ISALIGNED_N(ptr, alignof(SuperVector::size)));
|
assert(ISALIGNED_N(ptr, alignof(SuperVector::size)));
|
||||||
ptr = assume_aligned(ptr, SuperVector::size);
|
ptr = vectorscan_assume_aligned(ptr, SuperVector::size);
|
||||||
return _mm_load_si128((const m128 *)ptr);
|
return _mm_load_si128((const m128 *)ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1119,7 +1119,7 @@ template <>
|
|||||||
really_inline SuperVector<32> SuperVector<32>::load(void const *ptr)
|
really_inline SuperVector<32> SuperVector<32>::load(void const *ptr)
|
||||||
{
|
{
|
||||||
assert(ISALIGNED_N(ptr, alignof(SuperVector::size)));
|
assert(ISALIGNED_N(ptr, alignof(SuperVector::size)));
|
||||||
ptr = assume_aligned(ptr, SuperVector::size);
|
ptr = vectorscan_assume_aligned(ptr, SuperVector::size);
|
||||||
return {_mm256_load_si256((const m256 *)ptr)};
|
return {_mm256_load_si256((const m256 *)ptr)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1769,7 +1769,7 @@ template <>
|
|||||||
really_inline SuperVector<64> SuperVector<64>::load(void const *ptr)
|
really_inline SuperVector<64> SuperVector<64>::load(void const *ptr)
|
||||||
{
|
{
|
||||||
assert(ISALIGNED_N(ptr, alignof(SuperVector::size)));
|
assert(ISALIGNED_N(ptr, alignof(SuperVector::size)));
|
||||||
ptr = assume_aligned(ptr, SuperVector::size);
|
ptr = vectorscan_assume_aligned(ptr, SuperVector::size);
|
||||||
return {_mm512_load_si512((const m512 *)ptr)};
|
return {_mm512_load_si512((const m512 *)ptr)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,17 +76,17 @@ using Z_TYPE = u32;
|
|||||||
// it's available. Note that we need to handle C or C++ compilation.
|
// it's available. Note that we need to handle C or C++ compilation.
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
# ifdef HAVE_CXX_BUILTIN_ASSUME_ALIGNED
|
# ifdef HAVE_CXX_BUILTIN_ASSUME_ALIGNED
|
||||||
# define assume_aligned(x, y) __builtin_assume_aligned((x), (y))
|
# define vectorscan_assume_aligned(x, y) __builtin_assume_aligned((x), (y))
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# ifdef HAVE_CC_BUILTIN_ASSUME_ALIGNED
|
# ifdef HAVE_CC_BUILTIN_ASSUME_ALIGNED
|
||||||
# define assume_aligned(x, y) __builtin_assume_aligned((x), (y))
|
# define vectorscan_assume_aligned(x, y) __builtin_assume_aligned((x), (y))
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Fallback to identity case.
|
// Fallback to identity case.
|
||||||
#ifndef assume_aligned
|
#ifndef vectorscan_assume_aligned
|
||||||
#define assume_aligned(x, y) (x)
|
#define vectorscan_assume_aligned(x, y) (x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <uint16_t SIZE>
|
template <uint16_t SIZE>
|
||||||
|
@ -57,6 +57,7 @@ char unhex(const char *start, UNUSED const char *end) {
|
|||||||
|
|
||||||
%%{
|
%%{
|
||||||
machine FileCorporaParser;
|
machine FileCorporaParser;
|
||||||
|
alphtype unsigned char;
|
||||||
|
|
||||||
action accumulateNum {
|
action accumulateNum {
|
||||||
num = (num * 10) + (fc - '0');
|
num = (num * 10) + (fc - '0');
|
||||||
|
@ -6,8 +6,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXX_FLAGS} ${HS_CXX_FLAGS}")
|
|||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${PROJECT_SOURCE_DIR})
|
${PROJECT_SOURCE_DIR})
|
||||||
|
|
||||||
|
message("RAGEL_C_FLAGS" ${RAGEL_C_FLAGS})
|
||||||
|
|
||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
${CMAKE_BINARY_DIR}/tools/ExpressionParser.cpp
|
${CMAKE_BINARY_DIR}/util/ExpressionParser.cpp
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
COMPILE_FLAGS "${RAGEL_C_FLAGS}")
|
COMPILE_FLAGS "${RAGEL_C_FLAGS}")
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ enum ParamKey {
|
|||||||
|
|
||||||
%%{
|
%%{
|
||||||
machine ExpressionParser;
|
machine ExpressionParser;
|
||||||
|
alphtype unsigned char;
|
||||||
|
|
||||||
action accumulateNum {
|
action accumulateNum {
|
||||||
num = (num * 10) + (fc - '0');
|
num = (num * 10) + (fc - '0');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user