From patchwork Thu Dec 14 06:29:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 848381 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=uclibc-ng.org (client-ip=89.238.66.15; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="K/ViV8FU"; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yy3Yy5fPBz9s83 for ; Thu, 14 Dec 2017 17:29:26 +1100 (AEDT) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 443E6106F9; Thu, 14 Dec 2017 07:29:23 +0100 (CET) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by helium.openadk.org (Postfix) with ESMTPS id B294A106F9 for ; Thu, 14 Dec 2017 07:29:20 +0100 (CET) Received: by mail-pg0-f65.google.com with SMTP id j9so2810493pgc.11 for ; Wed, 13 Dec 2017 22:29:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TBu83esbx2ptUldqm08OzR/A3i7rQGFEsxcSrwZUeHA=; b=K/ViV8FUQ6WMMeu1jDLYLeiFX3kSt9feHuCeU3Y0mNWZPaDdwZlpqVGALHJVoJFefo IdJ4biX0GSGNjd8Q+r4V9ZcJV+ue7YwSjFMa8WsuI2sFTbgprwu2uXUxtPeZIcn2P412 1jFfTU3WTgpaDhzkUfvy0ho46hrEp14pEb7Nh4zopNm85H0jPWteZ539bQMolqCCjcTW mr0ojUd49JkmYyUf1zmL45rBavdcgF2FXy82tP5NbqeuWyEJrDnkbEP/ufw1eIXEY96+ yiQ5NxoVz5y9ptYfl1O77Oo1g8i5JfZE6jX9+m8/qD0nLSbyDtA4nWWJOvR4EZ3/baxw lxfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TBu83esbx2ptUldqm08OzR/A3i7rQGFEsxcSrwZUeHA=; b=CPJKpKAUNsG+n69mQvMGELdmCLbzuCzNTUbuEjo0HeUB2d3PhLQ0ZnO/yB0jwr3O7a fMWP94mOBwlUYHPBKJAOIvnsUETqKf4pak1s22NdBLH8ZNEMwd3wFdjIOLur+ZHZxKgs LMvinQDj0TgYMO638wmTXQklzzcYb6fh3oL66BdUmoR28Xx1wYXpBgjUHN+vmy+y3UUZ 6P/xCv2C4vqqp0R1Cm5UsJMoRNul+Am0HWNvDheLNCQPa0hYs4NSTZxSzl71NlAUGmKB ASQvnI4LB4LST+gmXWI8i0ciuo0fQxd2TEMspHHu33Zy3ffstrzDcfZcy45BLW3UXIto mVkQ== X-Gm-Message-State: AKGB3mKMweSDLfwW0ejgoXFLXegGN+nug382qe38RkI7RdrumgXJyjwv jgfWe74Ii7YvFm6NSG/lfKUjN1u0 X-Google-Smtp-Source: ACJfBotXK6N6Ju86B/ZGF5z6WJRyA9ahUWmMagA6ow/A5nnUl/59pd0RKoCwo+AI/t68SM4daeUoNg== X-Received: by 10.99.125.23 with SMTP id y23mr7683993pgc.345.1513232959145; Wed, 13 Dec 2017 22:29:19 -0800 (PST) Received: from localhost (g41.219-103-184.ppp.wakwak.ne.jp. [219.103.184.41]) by smtp.gmail.com with ESMTPSA id 65sm1130386pgj.55.2017.12.13.22.29.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Dec 2017 22:29:18 -0800 (PST) From: Stafford Horne To: uclibc-ng Devel Date: Thu, 14 Dec 2017 15:29:07 +0900 Message-Id: <20171214062909.8602-3-shorne@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171214062909.8602-1-shorne@gmail.com> References: <20171214062909.8602-1-shorne@gmail.com> Subject: [uclibc-ng-devel] [PATCH 2/4] or1k: Use new common syscall() implementation X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" Now that the common syscall implementation supports vararg calling conventions we can safely use it on OpenRISC. This saves a bit of code in the openrisc implementation. Signed-off-by: Stafford Horne --- libc/sysdeps/linux/or1k/Makefile.arch | 2 +- libc/sysdeps/linux/or1k/syscall.c | 32 -------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 libc/sysdeps/linux/or1k/syscall.c diff --git a/libc/sysdeps/linux/or1k/Makefile.arch b/libc/sysdeps/linux/or1k/Makefile.arch index 191eebafd..f6758fa63 100644 --- a/libc/sysdeps/linux/or1k/Makefile.arch +++ b/libc/sysdeps/linux/or1k/Makefile.arch @@ -5,5 +5,5 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -CSRC-y := __syscall_error.c __init_brk.c brk.c sbrk.c clone.c syscall.c +CSRC-y := __syscall_error.c __init_brk.c brk.c sbrk.c clone.c SSRC-y := __longjmp.S setjmp.S or1k_clone.S diff --git a/libc/sysdeps/linux/or1k/syscall.c b/libc/sysdeps/linux/or1k/syscall.c deleted file mode 100644 index 2f4356737..000000000 --- a/libc/sysdeps/linux/or1k/syscall.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2017 Joel Stanley - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - */ - -#include -#include -#include - -long int syscall (long num, ...) -{ - unsigned long arg1 = 0; - unsigned long arg2 = 0; - unsigned long arg3 = 0; - unsigned long arg4 = 0; - unsigned long arg5 = 0; - unsigned long arg6 = 0; - va_list arg; - - va_start (arg, num); - arg1 = va_arg (arg, unsigned long); - arg2 = va_arg (arg, unsigned long); - arg3 = va_arg (arg, unsigned long); - arg4 = va_arg (arg, unsigned long); - arg5 = va_arg (arg, unsigned long); - arg6 = va_arg (arg, unsigned long); - va_end (arg); - - __asm__ volatile ( "" ::: "memory" ); - - return INLINE_SYSCALL_NCS(num, 6, arg1, arg2, arg3, arg4, arg5, arg6); -}