From owner-svn-src-all@freebsd.org Fri Sep 22 17:58:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95241E06E56; Fri, 22 Sep 2017 17:58:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62F7575343; Fri, 22 Sep 2017 17:58:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8MHwv9p073762; Fri, 22 Sep 2017 17:58:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8MHwvpa073759; Fri, 22 Sep 2017 17:58:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201709221758.v8MHwvpa073759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 22 Sep 2017 17:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323934 - in head/sys/arm: arm include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/arm: arm include X-SVN-Commit-Revision: 323934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 17:58:58 -0000 Author: jhb Date: Fri Sep 22 17:58:57 2017 New Revision: 323934 URL: https://svnweb.freebsd.org/changeset/base/323934 Log: Detect NEON and set HWCAP_NEON if present. Reviewed by: andrew, ian MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12389 Modified: head/sys/arm/arm/vfp.c head/sys/arm/include/elf.h Modified: head/sys/arm/arm/vfp.c ============================================================================== --- head/sys/arm/arm/vfp.c Fri Sep 22 17:57:38 2017 (r323933) +++ head/sys/arm/arm/vfp.c Fri Sep 22 17:58:57 2017 (r323934) @@ -144,6 +144,11 @@ vfp_init(void) initial_fpscr; } } + + if ((tmp & VMVFR1_LS_MASK) >> VMVFR1_LS_OFF == 1 && + (tmp & VMVFR1_I_MASK) >> VMVFR1_I_OFF == 1 && + (tmp & VMVFR1_SP_MASK) >> VMVFR1_SP_OFF == 1) + elf_hwcap |= HWCAP_NEON; } /* initialize the coprocess 10 and 11 calls Modified: head/sys/arm/include/elf.h ============================================================================== --- head/sys/arm/include/elf.h Fri Sep 22 17:57:38 2017 (r323933) +++ head/sys/arm/include/elf.h Fri Sep 22 17:58:57 2017 (r323934) @@ -117,6 +117,7 @@ __ElfType(Auxinfo); /* Flags passed in AT_HWCAP. */ #define HWCAP_VFP 0x00000040 +#define HWCAP_NEON 0x00001000 #define HWCAP_VFPv3 0x00002000 #define HWCAP_VFPv3D16 0x00004000 #define HWCAP_VFPD32 0x00080000