From 934d93b9151134116d0fe23234ee9d0519a969ba Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 1 Oct 2018 12:59:23 +0200 Subject: YarrJIT: disable MatchResult decoding constructor on 64bit The YarrJIT generated code returns result differently on 32bit and 64bit platforms: on 64bit the struct is returned (where Win64 is explicitly handled separately), but on 32bit a uint64_t is returned. This constructor takes care of decoding that uint64_t value, so it is only needed on 32bit platforms. The code is actually invalid on 64bit. Task-number: QTBUG-69996 Change-Id: Ie8cc737da55633aafa4bd6b3ebb8625b4ab354c1 Reviewed-by: Qt CI Bot Reviewed-by: Simon Hausmann --- src/3rdparty/masm/runtime/MatchResult.h | 2 ++ src/3rdparty/masm/yarr/YarrJIT.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/3rdparty/masm/runtime/MatchResult.h b/src/3rdparty/masm/runtime/MatchResult.h index d87c8516b0..b7aaa6b6fc 100644 --- a/src/3rdparty/masm/runtime/MatchResult.h +++ b/src/3rdparty/masm/runtime/MatchResult.h @@ -35,6 +35,7 @@ struct MatchResult { { } +#if !CPU(X86_64) && !CPU(ARM64) explicit ALWAYS_INLINE MatchResult(EncodedMatchResult encoded) { union u { @@ -48,6 +49,7 @@ struct MatchResult { start = value.split.start; end = value.split.end; } +#endif ALWAYS_INLINE static MatchResult failed() { diff --git a/src/3rdparty/masm/yarr/YarrJIT.h b/src/3rdparty/masm/yarr/YarrJIT.h index bb7033fdea..139144f2dd 100644 --- a/src/3rdparty/masm/yarr/YarrJIT.h +++ b/src/3rdparty/masm/yarr/YarrJIT.h @@ -48,7 +48,7 @@ class ExecutablePool; namespace Yarr { class YarrCodeBlock { -#if CPU(X86_64) +#if CPU(X86_64) || CPU(ARM64) typedef MatchResult (*YarrJITCode8)(const LChar* input, unsigned start, unsigned length, int* output) YARR_CALL; typedef MatchResult (*YarrJITCode16)(const UChar* input, unsigned start, unsigned length, int* output) YARR_CALL; typedef MatchResult (*YarrJITCodeMatchOnly8)(const LChar* input, unsigned start, unsigned length) YARR_CALL; -- cgit v1.2.3