From f7067a9e73feeba955ff4da0b09bb51b2a4f566a Mon Sep 17 00:00:00 2001 From: DRC Date: Tue, 18 Nov 2014 15:53:34 +0000 Subject: [PATCH] Uses clz and bsr instructions for bit counting on ARM64 platforms as well. git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1413 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 6b71ac2a..6663d0af 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 d8eb1d35..447209a0 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