From patchwork Tue May 23 22:05:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 9744223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E4335601C2 for ; Tue, 23 May 2017 22:07:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D797328823 for ; Tue, 23 May 2017 22:07:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC7A428842; Tue, 23 May 2017 22:07:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7429028823 for ; Tue, 23 May 2017 22:07:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162888AbdEWWHJ (ORCPT ); Tue, 23 May 2017 18:07:09 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33038 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034824AbdEWWGw (ORCPT ); Tue, 23 May 2017 18:06:52 -0400 Received: by mail-pf0-f194.google.com with SMTP id f27so30223684pfe.0 for ; Tue, 23 May 2017 15:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=from:to:to:to:to:to:to:to:to:to:to:to:to:to:cc:subject:date :message-id:in-reply-to:references; bh=dV01VdDXV94ygRbSh+MJ1tIhN19rQAViJXPXa7NcrD4=; b=FcuRxT7NdjaKul/Isf7t3ekW+wwnd1ryFPkfXMysryRER6WTk9diORa45+iHjwr8EX tQ9sKcFDmlAbd9DfV5w4gMoQYyCDkzDQ6LRhNa4Q4MO+Hc4S05oEZg/6lMnrTUjw6zEW IIkzANNyR/xOhuViSKt8mVUNCpo22+KeNNulxxykfnFXKt9Lu1ABP0GTdMExKZ64elg6 5IauBfAkPb1NSHSmujc4dkCiFINdG3YSM+QZ++L2hUo4VrIP9LoWCwPNZRfj8LzkazFL qI8IXtsnTlmFP+8rL5xaYRKGyGU+9BOVaDtg7dhqKrAIWaxczrSZAiS6YkHwttaBftZL m/6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:to:to:to:to:to:to:to:to:to:to:to:to:cc :subject:date:message-id:in-reply-to:references; bh=dV01VdDXV94ygRbSh+MJ1tIhN19rQAViJXPXa7NcrD4=; b=LemqxjdL/nXak5O1wvFrgFTWiKAlIx+3mV3YpN6gWZTm78yX6UmHz2WvRbFzcoG/Oa 9qwm7KhfBCnrJd3av9C4x2e4aL2dlJCdL3+YKDWuO97cLmp6Z58x11yVdTeeioLBqZLu Moh1VRpDYeijX3TjndwHmh8XxIOo9UoebguNGH2eiPga0Z2MXodke71l7s16jn88U26p N1Lo89SMdTesSW9Su3JVkIh8wswxm2qe0zxxd+sOfHIgyvpTO0FRoAkd73r9sWIJatyL HYf/BQtK6A5cYfFLPjsp6/ztb1/y1ZPBHqz0EiilUQL6KsEMKSQ4zJGDjvZmZubhyBat Gjfw== X-Gm-Message-State: AODbwcBTLAaveK7gtDxQ9X/+thpDNdJlSmnCS6q5QVSx3UoydiW9lNJ1 wA6vrGwFAngpFuzP X-Received: by 10.84.236.77 with SMTP id h13mr39059001pln.5.1495577201452; Tue, 23 May 2017 15:06:41 -0700 (PDT) Received: from localhost ([216.38.154.21]) by smtp.gmail.com with ESMTPSA id p13sm3769321pfl.52.2017.05.23.15.06.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2017 15:06:40 -0700 (PDT) From: Palmer Dabbelt To: monstr@monstr.eu To: ralf@linux-mips.org To: liqin.linux@gmail.com To: lennox.wu@gmail.com To: ysato@users.sourceforge.jp To: dalias@libc.org To: davem@davemloft.net To: linux-mips@linux-mips.org To: linux-sh@vger.kernel.org To: sparclinux@vger.kernel.org To: geert@linux-m68k.org To: linux-kernel@vger.kernel.org To: linux-arch@vger.kernel.org Cc: Palmer Dabbelt Subject: [PATCH 2/7] m32r: Use lib/ucmpdi2.c Date: Tue, 23 May 2017 15:05:41 -0700 Message-Id: <20170523220546.16758-3-palmer@dabbelt.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170523220546.16758-1-palmer@dabbelt.com> References: <20170523220546.16758-1-palmer@dabbelt.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These files are functionally identical to the shared copies that I recently added. Signed-off-by: Palmer Dabbelt --- arch/m32r/Kconfig | 1 + arch/m32r/lib/Makefile | 3 +-- arch/m32r/lib/libgcc.h | 23 ----------------------- arch/m32r/lib/ucmpdi2.c | 17 ----------------- 4 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 arch/m32r/lib/libgcc.h delete mode 100644 arch/m32r/lib/ucmpdi2.c diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 95474460b367..2fbe3aa3e0c4 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -19,6 +19,7 @@ config M32R select HAVE_DEBUG_STACKOVERFLOW select CPU_NO_EFFICIENT_FFS select DMA_NOOP_OPS + select LIB_UCMPDI3 config SBUS bool diff --git a/arch/m32r/lib/Makefile b/arch/m32r/lib/Makefile index 5889eb9610b5..0a753a833bbf 100644 --- a/arch/m32r/lib/Makefile +++ b/arch/m32r/lib/Makefile @@ -3,5 +3,4 @@ # lib-y := checksum.o ashxdi3.o memset.o memcpy.o \ - delay.o strlen.o usercopy.o csum_partial_copy.o \ - ucmpdi2.o + delay.o strlen.o usercopy.o csum_partial_copy.o diff --git a/arch/m32r/lib/libgcc.h b/arch/m32r/lib/libgcc.h deleted file mode 100644 index 267aa435bc35..000000000000 --- a/arch/m32r/lib/libgcc.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __ASM_LIBGCC_H -#define __ASM_LIBGCC_H - -#include - -#ifdef __BIG_ENDIAN -struct DWstruct { - int high, low; -}; -#elif defined(__LITTLE_ENDIAN) -struct DWstruct { - int low, high; -}; -#else -#error I feel sick. -#endif - -typedef union { - struct DWstruct s; - long long ll; -} DWunion; - -#endif /* __ASM_LIBGCC_H */ diff --git a/arch/m32r/lib/ucmpdi2.c b/arch/m32r/lib/ucmpdi2.c deleted file mode 100644 index 9d3c682c89b5..000000000000 --- a/arch/m32r/lib/ucmpdi2.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "libgcc.h" - -int __ucmpdi2(unsigned long long a, unsigned long long b) -{ - const DWunion au = {.ll = a}; - const DWunion bu = {.ll = b}; - - if ((unsigned int)au.s.high < (unsigned int)bu.s.high) - return 0; - else if ((unsigned int)au.s.high > (unsigned int)bu.s.high) - return 2; - if ((unsigned int)au.s.low < (unsigned int)bu.s.low) - return 0; - else if ((unsigned int)au.s.low > (unsigned int)bu.s.low) - return 2; - return 1; -}