From patchwork Wed May 7 17:42:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 346752 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1C68B140175 for ; Thu, 8 May 2014 03:42:16 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=Qgqle X8b8dBT1q247dBXuvKL2WgF+FvCuqtJC6uM06ZgyLPcNMq+i6f1oZiy+x0hMWkA+ 79L+fXh6UXuGxA40bIR4j8RBUPPKHUA1gwCdbgYezhEuyWVF0vrw0lmUUJMionZl zslqUgByi8ETigK6+D+AH3W7e+BKc5s0L0BoRM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=QjlysOeXKlc 3Qz/2KLCDvL6AXJw=; b=Fw/83ttIHheBmwCkb/32NygvH5kKrO2q/AKLBeg8Cen Fv0Wdd7oL33odPWf4B8TJVC7vczzkO1ntp5xN2pu20FbJGMokUndlyxwlj3yIUsk mQP2LgrAeYHoNjgIu4mZodCOShbezxJaFJ5o05RdahHvHe9beaZx4wjz8okXEFLM = Received: (qmail 21171 invoked by alias); 7 May 2014 17:42:11 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 21157 invoked by uid 89); 7 May 2014 17:42:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com From: "Steve Ellcey " Date: Wed, 7 May 2014 10:42:02 -0700 To: Subject: [PATCH, MIPS] Fix *_SUB instruction macros User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-ID: <2a90dec6-6775-4804-a913-63afdb498242@BAMAIL02.ba.imgtec.org> While doing some work in glibc, I noticed that some of the *_SUB instruction macros in sysdeps/mips/sys/asm.h are defined to do addition instructions instead of subtraction instructions. I don't know why this is but it seems obviously wrong and it is different then the definitions in the linux kernel which do define these as subtract instructions (arch/mips/include/asm/asm.h). This patch changes the macros to do sub instructions instead of add. OK to checkin? Steve Ellcey sellcey@mips.com 2014-05-07 Steve Ellcey * sysdeps/mips/sys/asm.h (INT_SUB): Fix definition. (LONG_SUB): Ditto. (PTR_SUB): Ditto. diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h index 5015cb6..e479e9b 100644 --- a/sysdeps/mips/sys/asm.h +++ b/sysdeps/mips/sys/asm.h @@ -326,7 +326,7 @@ symbol = value # define INT_ADDI addi # define INT_ADDU addu # define INT_ADDIU addiu -# define INT_SUB add +# define INT_SUB sub # define INT_SUBI subi # define INT_SUBU subu # define INT_SUBIU subu @@ -339,7 +339,7 @@ symbol = value # define INT_ADDI daddi # define INT_ADDU daddu # define INT_ADDIU daddiu -# define INT_SUB dadd +# define INT_SUB dsub # define INT_SUBI dsubi # define INT_SUBU dsubu # define INT_SUBIU dsubu @@ -355,7 +355,7 @@ symbol = value # define LONG_ADDI addi # define LONG_ADDU addu # define LONG_ADDIU addiu -# define LONG_SUB add +# define LONG_SUB sub # define LONG_SUBI subi # define LONG_SUBU subu # define LONG_SUBIU subu @@ -374,7 +374,7 @@ symbol = value # define LONG_ADDI daddi # define LONG_ADDU daddu # define LONG_ADDIU daddiu -# define LONG_SUB dadd +# define LONG_SUB dsub # define LONG_SUBI dsubi # define LONG_SUBU dsubu # define LONG_SUBIU dsubu @@ -396,7 +396,7 @@ symbol = value # define PTR_ADDI addi # define PTR_ADDU addu # define PTR_ADDIU addiu -# define PTR_SUB add +# define PTR_SUB sub # define PTR_SUBI subi # define PTR_SUBU subu # define PTR_SUBIU subu @@ -418,7 +418,7 @@ symbol = value # define PTR_ADDI addi # define PTR_ADDU add /* no u */ # define PTR_ADDIU addi /* no u */ -# define PTR_SUB add +# define PTR_SUB sub # define PTR_SUBI subi # define PTR_SUBU sub /* no u */ # define PTR_SUBIU sub /* no u */ @@ -441,7 +441,7 @@ symbol = value # define PTR_ADDI daddi # define PTR_ADDU daddu # define PTR_ADDIU daddiu -# define PTR_SUB dadd +# define PTR_SUB dsub # define PTR_SUBI dsubi # define PTR_SUBU dsubu # define PTR_SUBIU dsubu