diff options
authorErik Verbruggen <erik.verbruggen@qt.io>2018-10-01 12:59:23 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2018-10-02 12:36:55 +0000
commit934d93b9151134116d0fe23234ee9d0519a969ba (patch)
parentec1fdecefa04652e2a9e013d47245936973bce12 (diff)
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 <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2 files changed, 3 insertions, 1 deletions
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;
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;