From nobody Wed Feb 19 11:15:46 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YyYjK4qgPz5pCws; Wed, 19 Feb 2025 11:15:49 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (fuz.su [IPv6:2001:41d0:8:e508::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "fuz.su", Issuer "fuz.su" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YyYjJ0xXtz44Bg; Wed, 19 Feb 2025 11:15:48 +0000 (UTC) (envelope-from fuz@fuz.su) Authentication-Results: mx1.freebsd.org; none Received: from fuz.su (localhost [127.0.0.1]) by fuz.su (8.18.1/8.18.1) with ESMTPS id 51JBFktC075319 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 19 Feb 2025 12:15:46 +0100 (CET) (envelope-from fuz@fuz.su) Received: (from fuz@localhost) by fuz.su (8.18.1/8.18.1/Submit) id 51JBFk8A075318; Wed, 19 Feb 2025 12:15:46 +0100 (CET) (envelope-from fuz) Date: Wed, 19 Feb 2025 12:15:46 +0100 From: Robert Clausecker To: "Jason E. Hale" Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: 96e53c0c65fa - main - archivers/libunrar: Support crc and crypto flags on aarch64 Message-ID: References: <202502190837.51J8ba05089225@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR] X-Rspamd-Queue-Id: 4YyYjJ0xXtz44Bg X-Spamd-Bar: ---- Hi Jason, Am Wed, Feb 19, 2025 at 06:06:20AM -0500 schrieb Jason E. Hale: > > > +@@ -42,12 +42,18 @@ void InitCRC32(uint *CRCTab) > > > + } > > > + > > > + #ifdef USE_NEON_CRC32 > > > +- #ifdef _APPLE > > > ++ #if defined(_APPLE) > > > + // getauxval isn't available in OS X > > > + uint Value=0; > > > + size_t Size=sizeof(Value); > > > + int RetCode=sysctlbyname("hw.optional.armv8_crc32",&Value,&Size,NULL,0); > > > + CRC_Neon=RetCode==0 && Value!=0; > > > ++ #elif defined(__FreeBSD__) > > > ++ // getauxval isn't available on FreeBSD > > > ++ uint64 Reg=READ_SPECIALREG(id_aa64isar0_el1); > > > ++ if (ID_AA64ISAR0_CRC32_VAL(Reg) == ID_AA64ISAR0_CRC32_BASE) { > > > ++ CRC_Neon=true; > > > ++ } > > > + #else > > > + CRC_Neon=(getauxval(AT_HWCAP) & HWCAP_CRC32)!=0; > > > + #endif > > > Note that we do have the same interface, the function is just spelled > > elf_aux_info() and has a slightly different interface. > > > > Thanks, I'm open to better, more canonical methods. I'm not an aarch64 > expert by any means. Just trying to make this stuff work. :) Your patch looks like it does the trick, so no need to revisit it. Yours, Robert Clausecker -- () ascii ribbon campaign - for an encoding-agnostic world /\ - against html email - against proprietary attachments