From 5276c0890586b10bdbb749803bc1985bf03d1015 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 1 Apr 2023 14:23:32 +0800 Subject: ; * src/fns.c (Fstring_lessp): Port to RISCs. --- src/fns.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fns.c b/src/fns.c index 94505eda444..90bb3fac178 100644 --- a/src/fns.c +++ b/src/fns.c @@ -506,7 +506,7 @@ Symbols are also allowed; their print names are used instead. */) /* String data is normally allocated with word alignment, but there are exceptions (notably pure strings) so we restrict the wordwise skipping to safe architectures. */ - if (HAVE_FAST_UNALIGNED_ACCESS) +#ifdef HAVE_FAST_UNALIGNED_ACCESS { /* First compare entire machine words. */ int ws = sizeof (size_t); @@ -516,6 +516,7 @@ Symbols are also allowed; their print names are used instead. */) == load_unaligned_size_t (w2 + b)) b += ws; } +#endif /* Scan forward to the differing byte. */ while (b < nb && SREF (string1, b) == SREF (string2, b)) -- cgit v1.2.1 From c10c545ef26ef0be00ec8526d30b8c57141a3683 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 1 Apr 2023 14:24:22 +0800 Subject: ; * src/fns.c (Fstring_lessp): Fix coding style. --- src/fns.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fns.c b/src/fns.c index 90bb3fac178..354b3415ec5 100644 --- a/src/fns.c +++ b/src/fns.c @@ -512,8 +512,9 @@ Symbols are also allowed; their print names are used instead. */) int ws = sizeof (size_t); const char *w1 = SSDATA (string1); const char *w2 = SSDATA (string2); - while (b < nb - ws + 1 && load_unaligned_size_t (w1 + b) - == load_unaligned_size_t (w2 + b)) + while (b < nb - ws + 1 + && (load_unaligned_size_t (w1 + b) + == load_unaligned_size_t (w2 + b))) b += ws; } #endif -- cgit v1.2.1