From 803b5d24a8851524e62ba6fd9a6a759a77f0606e Mon Sep 17 00:00:00 2001 From: DRC Date: Tue, 18 Nov 2014 15:56:43 +0000 Subject: [PATCH] Uses clz and bsr instructions for bit counting on ARM64 platforms as well. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1414 632fc199-4ca6-4c93-a231-07263d6284db --- ChangeLog.txt | 3 +++ jchuff.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 6b71ac2..6663d0a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -13,6 +13,9 @@ instead of -1 if componentID was > 0 and subsamp was TJSAMP_GRAY. [3] Fixed an issue in tjBufSizeYUV2() wherby it would erroneously return 0 instead of -1 if width was < 1. +[5] The Huffman encoder now uses clz and bsr instructions for bit counting on +ARM64 platforms (see 1.4 beta1 [5].) + 1.3.90 (1.4 beta1) ================== diff --git a/jchuff.c b/jchuff.c index d8eb1d3..447209a 100644 --- a/jchuff.c +++ b/jchuff.c @@ -37,7 +37,7 @@ */ /* NOTE: Both GCC and Clang define __GNUC__ */ -#if defined __GNUC__ && defined __arm__ +#if defined __GNUC__ && (defined __arm__ || defined __aarch64__) #if !defined __thumb__ || defined __thumb2__ #define USE_CLZ_INTRINSIC #endif -- 2.40.0