From patchwork Mon Nov 9 20:18:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 40996 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A0DB639730AE; Mon, 9 Nov 2020 20:19:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0DB639730AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1604953141; bh=LTpERs/IStPPoHYMeQh1+/oO6sAXSJ6wLj24t6fmhG8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=mapHL8DoH8DTQADqr9kZ/a0Zh5kpR/Vuxa2iN/xdwvo7cZ7nwHN0oVwY+Afag/ojz JmHigWJrddsGfl8FpTpyGzBrUw96KiBoYnxej4ICNxaXD7AtW8/j5IHoApG7xVnQG3 2dMCLysBymbsL6I0fe/8V4q9Xg07C04nESeTV/vg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by sourceware.org (Postfix) with ESMTPS id C7C9E3973081 for ; Mon, 9 Nov 2020 20:18:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C7C9E3973081 Received: by mail-qt1-x841.google.com with SMTP id i7so6964233qti.6 for ; Mon, 09 Nov 2020 12:18:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LTpERs/IStPPoHYMeQh1+/oO6sAXSJ6wLj24t6fmhG8=; b=fE6AIfyldyhzwd/3jJFKAxPw1goYXGk+XFTFlR538HIHbAiHsZdLAHRzwRkKHYQV6g AN58abFoIIIOiqpXgQZJ0OLq2+kDmry9PrUAXfOqCB6ZCFYivCwvxHTrX5kvlDLbEE46 l34NZhuP5207WKhkHG340B+ZQFWzU8e+d8ESMjtsNX5p0LfpvT2DduaqrvnYHKgm5Ffa HIn7APEBpL0rTIIyordfanFTYGcUPXe43z8mEdscAVAzZ8Z/XOlYWQdT/9UcFzFgI/ti nO0nv+umhmHTwCPFvsQvxfcS1bUzDSbTydIUWE9OnRsup/SaCxckeVlzSDCEe4ihhUgH O96Q== X-Gm-Message-State: AOAM530epgqfeLp37vtRoq8B2m+KOJbPayVJsn8fJT8AHFo3Q2p5yMyP OMYH8QxqO8SZNq6MxLivufS/9jdcr73OeQ== X-Google-Smtp-Source: ABdhPJz92ZE0YEPjJXHwOWoV0F8HlzfWVIxb7CeLMgZ24O+SISXG6uHi0OXYYnnESQyFxgF3E8Cwyg== X-Received: by 2002:ac8:23fb:: with SMTP id r56mr14386154qtr.371.1604953138193; Mon, 09 Nov 2020 12:18:58 -0800 (PST) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id z2sm6843407qkl.22.2020.11.09.12.18.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 12:18:57 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH 16/23] linux: Use generic __syscall_error for microblaze Date: Mon, 9 Nov 2020 17:18:19 -0300 Message-Id: <20201109201826.120534-17-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201109201826.120534-1-adhemerval.zanella@linaro.org> References: <20201109201826.120534-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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@sourceware.org Sender: "Libc-alpha" Although the auto-generated syscall sets errno directly for dynamic case, using a function call generates more compact code: --- sizes-microblaze-linux-gnu.inline +++ sizes-microblaze-linux-gnu.outline text data bss dec hex filename -1835305 52738 9216 1897259 1cf32b libc.so - 188644 7236 176 196056 2fdd8 elf/ld.so - 121772 5872 8356 136000 21340 nptl/libpthread.so - 30836 1724 160 32720 7fd0 rt/librt.so +1831025 52714 9216 1892955 1ce25b libc.so + 188904 7240 176 196320 2fee0 elf/ld.so + 121540 5864 8356 135760 21250 nptl/libpthread.so + 30640 1720 160 32520 7f08 rt/librt.so Checked with a cross make check for microblaze-linux-gnu. --- sysdeps/unix/sysv/linux/microblaze/Makefile | 6 ---- sysdeps/unix/sysv/linux/microblaze/sysdep.S | 39 --------------------- sysdeps/unix/sysv/linux/microblaze/sysdep.h | 2 ++ 3 files changed, 2 insertions(+), 45 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/microblaze/sysdep.S diff --git a/sysdeps/unix/sysv/linux/microblaze/Makefile b/sysdeps/unix/sysv/linux/microblaze/Makefile index d178bc6f34..614553204f 100644 --- a/sysdeps/unix/sysv/linux/microblaze/Makefile +++ b/sysdeps/unix/sysv/linux/microblaze/Makefile @@ -1,9 +1,3 @@ ifeq ($(subdir),resource) sysdep_routines += backtrace_linux endif - -ifeq ($(subdir),nptl) -# pull in __syscall_error routine -libpthread-routines += sysdep -libpthread-shared-only-routines += sysdep -endif diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep.S b/sysdeps/unix/sysv/linux/microblaze/sysdep.S deleted file mode 100644 index c3157880d8..0000000000 --- a/sysdeps/unix/sysv/linux/microblaze/sysdep.S +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - - -/* The following code is only used in the shared library when we - compile the reentrant version. Otherwise each system call defines - each own version. */ - -#ifndef PIC - -/* The syscall stubs jump here when they detect an error. */ - -# undef CALL_MCOUNT -# define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %d0. */ - - .text -ENTRY (__syscall_error) - rsubk r3,r3,r0 - rtsd r15,8 - addik r3,r0,-1 /* delay slot. */ -END (__syscall_error) -#endif /* PIC. */ diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep.h b/sysdeps/unix/sysv/linux/microblaze/sysdep.h index 6fd96adbf0..2beaba9247 100644 --- a/sysdeps/unix/sysv/linux/microblaze/sysdep.h +++ b/sysdeps/unix/sysv/linux/microblaze/sysdep.h @@ -19,6 +19,8 @@ #ifndef _LINUX_MICROBLAZE_SYSDEP_H #define _LINUX_MICROBLAZE_SYSDEP_H 1 +#define SYSCALL_ERROR_FUNC + #include #include #include