Skip to content
This repository was archived by the owner on Jul 27, 2022. It is now read-only.

Commit f7e5c55

Browse files
authored
Merge pull request #9 from nemanjai/master
Use the optimized code path for FindMatchLength on PowerPC
2 parents e3ef739 + 71b4b0f commit f7e5c55

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stubs-internal.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,9 @@ inline char* string_as_array(std::string* str) {
289289
// s1[0,n-1] == s2[0,n-1]
290290
// and n <= (s2_limit - s2).
291291
//
292-
// Separate implementation for x86_64, for speed.
293-
#if defined(__GNUC__) && defined(ARCH_K8)
292+
// Separate implementation for x86_64 and little endian PPC, for speed.
293+
#if (defined(__GNUC__) && (defined(ARCH_K8) \
294+
|| (defined(__ppc64__) && defined(_LITTLE_ENDIAN))))
294295
static inline int FindMatchLength(const uint8* s1,
295296
const uint8* s2,
296297
const uint8* s2_limit) {

0 commit comments

Comments
 (0)