From patchwork Mon Feb 13 13:55:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 1741653 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=R2F2nMzS; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PFm8w0Bklz23yT for ; Tue, 14 Feb 2023 00:56:31 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 13F14388551E for ; Mon, 13 Feb 2023 13:56:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13F14388551E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676296587; bh=4KA8vtMySnKF7UvbL3Npy/R9YJsT4gBQEYKopjomYXg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=R2F2nMzS83vSF+xdEmASwCJwL0YJtCSYW3+KlwBw9sHzAD9j8dp1aozHpxgfoFz6w BfYwxsH3+j2WyKfxVKk5EhE2IGE6fGlabAtKUJmIPHBisHoxtpKUEYjhIeVhprbwqG RrI3PiDTwcHHlSwOkopozEEdXl6kmckgKUIWXjDQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by sourceware.org (Postfix) with ESMTPS id 348AC38493CA for ; Mon, 13 Feb 2023 13:56:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 348AC38493CA Received: by mail-oo1-xc29.google.com with SMTP id o201-20020a4a2cd2000000b0051fa86ef3dbso108074ooo.2 for ; Mon, 13 Feb 2023 05:56:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4KA8vtMySnKF7UvbL3Npy/R9YJsT4gBQEYKopjomYXg=; b=pMbAG/kYAsdimTLi51mYamv8UZE944C9JGN15vER5kc+nXGhSVFhjDSjhF0bOukH/b taAi61FZZlv3vE+KxrCcoMXZ6UWXYW5sqUMJRDBGRjGzHF/8R+sSfeF1GNQV2zkMW5MH zKREg7dJdtTeQ3gPxFgyzOsNSMAqiotfejH/yydZT/6O2vNz7EUJbNSFbkjYy7Ck7P8M B7W4h+uRamdO06CVc8X4nGTJhWTMmkmBBcW/nZxDDGL/YcJtwnUwgL5ppxL1tnt0fADZ Q3+Y883/LHyeU1moeG+3LqWcRNlRRKd6cZoNtpk0+YQ6nlbcC34O3kEOK53/xgfqCof6 6NCA== X-Gm-Message-State: AO0yUKUorg+FLxcS29fei/Il9pQXcxhm/LcmVESZRMeijTElWA1LgM5R NAgX84RbvuccO8N/bbRQO/+u9l/MrvUFYJnL8mU= X-Google-Smtp-Source: AK7set9ROtxaiTFXFWkQ9gxQ3tVA3v1aiEJ7W8wH2hkDpxgaFmm4iE282vuB4ECgVJEU9nWJ77rSFw== X-Received: by 2002:a4a:968e:0:b0:517:70f7:2207 with SMTP id s14-20020a4a968e000000b0051770f72207mr12179852ooi.7.1676296562822; Mon, 13 Feb 2023 05:56:02 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:f662:138b:cd0c:7b7a:8860]) by smtp.gmail.com with ESMTPSA id y11-20020a4ade0b000000b0051762a73553sm4797168oot.18.2023.02.13.05.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 05:56:02 -0800 (PST) To: libc-alpha@sourceware.org, Wilco Dijkstra Subject: [PATCH 0/7] Remove _STRING_ARCH_unaligned Date: Mon, 13 Feb 2023 10:55:51 -0300 Message-Id: <20230213135558.3328727-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" The _STRING_ARCH_unaligned advertise that the architecture allows efficient unaligned memory accesses and it is used to optimize some implementations. However, some are complete unnecessary and only adds complexity (getenv), while other can be removed since they add only marginal improvement on legacy/compat code (crypt and nscd). The iconv code can be also simplified by using compiler extension (packaed struct) that allows code efficient code generation without the need to provide aligned/unaligned variants. Adhemerval Zanella (7): crypto: Remove _STRING_ARCH_unaligned usage stdlib: Simplify getenv nscd: Remove _STRING_ARCH_unaligned usage resolv: Remove _STRING_ARCH_unaligned usage iconv: Remove _STRING_ARCH_unaligned usage for get/set macros iconv: Remove _STRING_ARCH_unaligned usage string: Remove string_private.h crypt/md5.c | 24 +- crypt/sha256.c | 28 +- crypt/sha512.c | 26 +- iconv/gconv_int.h | 28 ++ iconv/gconv_simple.c | 282 ++------------------ iconv/loop.c | 139 ++-------- iconv/skeleton.c | 185 ++----------- iconvdata/iso-2022-jp-3.c | 2 +- iconvdata/unicode.c | 6 +- iconvdata/utf-16.c | 6 +- iconvdata/utf-32.c | 6 +- include/arpa/nameser.h | 36 --- include/string.h | 3 - nscd/nscd_gethst_r.c | 2 - nscd/nscd_getserv_r.c | 2 - nscd/nscd_helper.c | 6 - stdlib/getenv.c | 63 +---- sysdeps/aarch64/string_private.h | 20 -- sysdeps/generic/string_private.h | 21 -- sysdeps/m68k/m680x0/m68020/string_private.h | 21 -- sysdeps/s390/string_private.h | 20 -- sysdeps/s390/utf16-utf32-z9.c | 4 +- sysdeps/s390/utf8-utf16-z9.c | 2 +- sysdeps/s390/utf8-utf32-z9.c | 2 +- sysdeps/x86/string_private.h | 20 -- 25 files changed, 118 insertions(+), 836 deletions(-) delete mode 100644 sysdeps/aarch64/string_private.h delete mode 100644 sysdeps/generic/string_private.h delete mode 100644 sysdeps/m68k/m680x0/m68020/string_private.h delete mode 100644 sysdeps/s390/string_private.h delete mode 100644 sysdeps/x86/string_private.h