From nobody Sat Mar 12 14:59:21 2022 X-Original-To: dev-commits-src-main@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 AE4171A22FD3; Sat, 12 Mar 2022 14:59:22 +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 4KG5YQ0DY2z3vWy; Sat, 12 Mar 2022 14:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647097162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=va994kpvMbhuHOCb9P3tcvkdboAYW1Gl2hKKKjPv6e0=; b=yGwp5sEm+KJJhWvEOur7DjSgdrzbd3vXnUqeyHg6LS7LYYSgZofBSytMXZsUyV5zualrww J6UOdz2HVKPuQRWhvJD6hO7BvjsAqO02t/WL/Hhui2l1bYXvLjPEbOQig/SKSeGcCor2AT cjkB2B0GrTLwrTLvQaDpFeyW9MLIWlGiOX9bc1QRp5tbkq1+fOOzMeZjSD1HZcXqRD4RpJ B0BF7TXF4VJPMh6vUjdAGw+LySCHTyqtuNgR5+3OWZfHXDrBTBjRxCeFmm/qQM2NLWIXf0 7hSm3AU1v0EBICLToPzNTx7duNzWYUCTCQZksHpIp9jwZDWxPS6MXW/doTbsqQ== 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 C21522E978; Sat, 12 Mar 2022 14:59:21 +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 22CExLYl093600; Sat, 12 Mar 2022 14:59:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22CExLoW093599; Sat, 12 Mar 2022 14:59:21 GMT (envelope-from git) Date: Sat, 12 Mar 2022 14:59:21 GMT Message-Id: <202203121459.22CExLoW093599@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: 5fc3cc2713ef - main - amd64: make bcmp in libc just call memcmp List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: 5fc3cc2713eff8cdabbf6e5d03bf8a799adf808c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647097162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=va994kpvMbhuHOCb9P3tcvkdboAYW1Gl2hKKKjPv6e0=; b=ZWPe6JnIWz2fmZu+lX5YCQreAeL2OKYP7n2cnfIg39PsmAwv6Z1gJztjO+EkjWL4Pjdnkp h8yBtfw6E0ywZbZPpS2nIObY483sfNUtuDAxlZyW2W5wGy1+tQJq2WfT+lWKs/cFwiViEL oLZx3HMr2BImGR6Sc6vSqNeeBVeRFySD37zPdYTn6iGl0dsjML7Yy+mwgaMVe5c4Si/QkS 4FpT63UOZwOui3PtVhuStV3gNabIQ8gDi7exX0vh2cQMR4SOk3Ettr3LcB0RNWwxW1cWpw qB0U/0rWQItA44EM6yoNc8pV4hiAetPhPnqAf2t7vWzqDzdLFxLDXnh8eM2CuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647097162; a=rsa-sha256; cv=none; b=Z0InUM+41kxZzv3whJeYg9w3bsDFtH6096ebbnUWAkf9wRs8xKoDeMotMQaxwPqTYeCHAY G/83j8FHPz7trPKrzHSLNX7BETHPZzJjrXQJaRnZvjbnv5KHFmcTBBdqLO/cDqxrelOv/w rLqYgit/f7zolGYEENYPPiFk99w0/yD0bIEeoZg7rekeXdENtbjJi2ETi0VsHYnJcnlsGW gXr73b1Or+YacBZrFPUlM2F3t3LuMH7IAGjYlEJndYJ7JkOve/50gG7xwRS/zRINR1eFXX 65QGu9R5NGCIOdp14QWkfJuYpzmmsqcWnwZZ5VWX/a1gwBTJ5y2RuQLnuLAD3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5fc3cc2713eff8cdabbf6e5d03bf8a799adf808c commit 5fc3cc2713eff8cdabbf6e5d03bf8a799adf808c Author: Mateusz Guzik AuthorDate: 2022-03-12 12:27:25 +0000 Commit: Mateusz Guzik CommitDate: 2022-03-12 14:59:14 +0000 amd64: make bcmp in libc just call memcmp Preferably bcmp would just alias memcmp but there is build magic which makes this problematic. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28846 --- lib/libc/amd64/string/Makefile.inc | 1 - lib/libc/amd64/string/bcmp.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/libc/amd64/string/Makefile.inc b/lib/libc/amd64/string/Makefile.inc index cb370bc6be1c..b77079afc933 100644 --- a/lib/libc/amd64/string/Makefile.inc +++ b/lib/libc/amd64/string/Makefile.inc @@ -1,7 +1,6 @@ # $FreeBSD$ MDSRCS+= \ - bcmp.S \ memcmp.S \ memcpy.S \ memmove.S \ diff --git a/lib/libc/amd64/string/bcmp.c b/lib/libc/amd64/string/bcmp.c new file mode 100644 index 000000000000..b45176dc2d56 --- /dev/null +++ b/lib/libc/amd64/string/bcmp.c @@ -0,0 +1,16 @@ +/*- + * Written by Mateusz Guzik + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int +bcmp(const void *b1, const void *b2, size_t len) +{ + + return (memcmp(b1, b2, len)); +}