From: Nicholas Clark Date: Wed, 13 Dec 2006 20:56:24 +0000 (+0000) Subject: Swap the order of PERL_FBM_PREVIOUS_{L,H}_OFFSET_FROM_TABLE on little X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a4558e1afe1f4daf6db9e38c0852e5f89d5788cc;p=p5sagit%2Fp5-mst-13.2.git Swap the order of PERL_FBM_PREVIOUS_{L,H}_OFFSET_FROM_TABLE on little endian machines to hint to the compiler that a 16 bit read could work. p4raw-id: //depot/perl@29552 --- diff --git a/sv.h b/sv.h index 8b1f385..d052b0d 100644 --- a/sv.h +++ b/sv.h @@ -1334,8 +1334,13 @@ the scalar's value cannot change unless written to. #define PERL_FBM_TABLE_OFFSET 5 /* Number of bytes between EOS and table */ #define PERL_FBM_FLAGS_OFFSET_FROM_TABLE -1 /* how many characters in string before rare? */ -#define PERL_FBM_PREVIOUS_L_OFFSET_FROM_TABLE -2 -#define PERL_FBM_PREVIOUS_H_OFFSET_FROM_TABLE -3 +#if (BYTEORDER == 0x4321) || (BYTEORDER == 0x87654321) +# define PERL_FBM_PREVIOUS_L_OFFSET_FROM_TABLE -2 +# define PERL_FBM_PREVIOUS_H_OFFSET_FROM_TABLE -3 +#else +# define PERL_FBM_PREVIOUS_H_OFFSET_FROM_TABLE -2 +# define PERL_FBM_PREVIOUS_L_OFFSET_FROM_TABLE -3 +#endif /* rarest character in string */ #define PERL_FBM_RARE_OFFSET_FROM_TABLE -4