From owner-dev-commits-src-all@freebsd.org Mon Feb 8 19:15:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C8F753DA64; Mon, 8 Feb 2021 19:15:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DZG2C35J8z4h3M; Mon, 8 Feb 2021 19:15:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D8541CCE2; Mon, 8 Feb 2021 19:15:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 118JFV5u067852; Mon, 8 Feb 2021 19:15:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 118JFVS0067851; Mon, 8 Feb 2021 19:15:31 GMT (envelope-from git) Date: Mon, 8 Feb 2021 19:15:31 GMT Message-Id: <202102081915.118JFVS0067851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 81e074d57dfc - main - libkern: use compiler builtins for strcpy, strcmp and strlen MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81e074d57dfcd86f152e2848dc44b77087ee7a2d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2021 19:15:31 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=81e074d57dfcd86f152e2848dc44b77087ee7a2d commit 81e074d57dfcd86f152e2848dc44b77087ee7a2d Author: Mateusz Guzik AuthorDate: 2021-02-07 19:50:25 +0000 Commit: Mateusz Guzik CommitDate: 2021-02-08 19:15:21 +0000 libkern: use compiler builtins for strcpy, strcmp and strlen --- sys/sys/libkern.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index 3874ef9ec4bd..3f8827de06c5 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -199,6 +199,10 @@ size_t kcsan_strlen(const char *); #define strcpy(d, s) kcsan_strcpy((d), (s)) #define strcmp(s1, s2) kcsan_strcmp((s1), (s2)) #define strlen(s) kcsan_strlen((s)) +#else +#define strcpy(d, s) __builtin_strcpy((d), (s)) +#define strcmp(s1, s2) __builtin_strcmp((s1), (s2)) +#define strlen(s) __builtin_strlen((s)) #endif static __inline char *