From 1e25d9bc4aa8a26c954270908c45c6e22a7ecd0a Mon Sep 17 00:00:00 2001 From: Benito van der Zander Date: Mon, 12 Apr 2021 15:42:43 +0200 Subject: [PATCH] disable assembly based search match function with define --- src/FLRE.pas | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/FLRE.pas b/src/FLRE.pas index 326372a..c5826e2 100644 --- a/src/FLRE.pas +++ b/src/FLRE.pas @@ -29,6 +29,9 @@ *******************************************************************************) unit FLRE; + +//{$define assemblyBasedSearchMatch} + {$ifdef fpc} {$mode delphi} {$ifdef cpui386} @@ -12180,7 +12183,8 @@ function TFLREDFA.FastProcessNextState(State:PFLREDFAState;const CurrentChar:TFL end; -function TFLREDFA.SearchMatchFast(const StartPosition,UntilExcludingPosition:TFLREInt32;out MatchEnd:TFLREInt32;const UnanchoredStart:longbool):TFLREInt32; {$ifdef cpu386}assembler; stdcall; +function TFLREDFA.SearchMatchFast(const StartPosition,UntilExcludingPosition:TFLREInt32;out MatchEnd:TFLREInt32;const UnanchoredStart:longbool):TFLREInt32; +{$if defined(cpu386) and defined(assemblyBasedSearchMatch)}assembler; stdcall; var ResultValue:TFLREInt32; StartOffset:pointer; asm @@ -12370,7 +12374,8 @@ function TFLREDFA.SearchMatchFast(const StartPosition,UntilExcludingPosition:TFL end; {$endif} -function TFLREDFA.SearchMatchFastReversed(const StartPosition,UntilIncludingPosition:TFLREInt32;out MatchBegin:TFLREInt32;const UnanchoredStart:longbool):TFLREInt32; {$ifdef cpu386}assembler; stdcall; +function TFLREDFA.SearchMatchFastReversed(const StartPosition,UntilIncludingPosition:TFLREInt32;out MatchBegin:TFLREInt32;const UnanchoredStart:longbool):TFLREInt32; +{$ifdef defined(cpu386) and defined(assemblyBasedSearchMatch)}assembler; stdcall; var ResultValue:TFLREInt32; StartOffset:pointer; asm