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: 830 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id 855FA360098 for ; Wed, 7 May 2014 10:42:14 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 3D28A17E089A; Wed, 7 May 2014 10:42:14 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com 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 homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id A6AD515AF03E for ; Wed, 7 May 2014 10:42:13 -0700 (PDT) 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=I2oSF yhZ+scRzzSev6dd7UzJx6VXQalVEvUN7UEFeZ7cHejh1DtQjAZK4Muz/JcHBmUEL PqFva8Y0R95PkyDzZ6prrBBn0Bsss2/wG61ygK/Wbt7CLYinrh2FYITWAPZ8JsMO 8Xbk/lfDplD7TuLxJ1JT62K1E9oPJ70+dPKLPU= 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=c+iCAWWM45WFTC46so2BAojMb1K+AHsnabTJ829321U R/PMZ0/xGigWcMPW0wTyGPqYXzvHJLkerXgx0XoyzqXdvW+j02I/MvrZdpd0Mt1B Uvk72K7YtTfD7KNORkgy2C+QV6NTjTSf/bEYM8SQJ1zuhMZZyLmTQjddqORDIa08 = 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> X-DH-Original-To: glibc@patchwork.siddhesh.in 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