From owner-svn-src-all@freebsd.org Thu Dec 24 22:13:53 2015 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 60A0CA517DE; Thu, 24 Dec 2015 22:13:53 +0000 (UTC) (envelope-from kib@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 31D861BDE; Thu, 24 Dec 2015 22:13:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBOMDq8G026086; Thu, 24 Dec 2015 22:13:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBOMDqRW026085; Thu, 24 Dec 2015 22:13:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201512242213.tBOMDqRW026085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 24 Dec 2015 22:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292709 - head/lib/libc/arm/sys X-SVN-Group: head 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.20 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: Thu, 24 Dec 2015 22:13:53 -0000 Author: kib Date: Thu Dec 24 22:13:52 2015 New Revision: 292709 URL: https://svnweb.freebsd.org/changeset/base/292709 Log: Do not compile ARMv6 instructions on ARMv4/v5. Although clang is fine with mrrc, gcc is not. The disabled code is not executed on ARMv4 anyway. Reported and reviewed by: ian Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/arm/sys/__vdso_gettc.c Modified: head/lib/libc/arm/sys/__vdso_gettc.c ============================================================================== --- head/lib/libc/arm/sys/__vdso_gettc.c Thu Dec 24 20:19:49 2015 (r292708) +++ head/lib/libc/arm/sys/__vdso_gettc.c Thu Dec 24 22:13:52 2015 (r292709) @@ -34,8 +34,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "libc_private.h" +#if __ARM_ARCH >= 6 static inline uint64_t cp15_cntvct_get(void) { @@ -53,6 +55,7 @@ cp15_cntpct_get(void) __asm __volatile("mrrc\tp15, 0, %Q0, %R0, c14" : "=r" (reg)); return (reg); } +#endif #pragma weak __vdso_gettc u_int @@ -60,6 +63,7 @@ __vdso_gettc(const struct vdso_timehands { uint64_t val; +#if __ARM_ARCH >= 6 /* * Userspace gettimeofday() is only enabled on ARMv7 CPUs, but * libc is compiled for ARMv6. Due to clang issues, .arch @@ -67,6 +71,9 @@ __vdso_gettc(const struct vdso_timehands */ __asm __volatile(".word\t0xf57ff06f" : : : "memory"); /* isb */ val = th->th_physical == 0 ? cp15_cntvct_get() : cp15_cntpct_get(); +#else + val = 0; +#endif return (val); }