From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6444 invoked by alias); 27 Oct 2018 23:25:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 6434 invoked by uid 89); 27 Oct 2018 23:25:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=property X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 27 Oct 2018 23:25:44 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w9RNPE3F021217; Sat, 27 Oct 2018 18:25:17 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id w9RNP4h6021203; Sat, 27 Oct 2018 18:25:04 -0500 Date: Sun, 28 Oct 2018 03:19:00 -0000 From: Segher Boessenkool To: Stafford Horne Cc: GCC patches , Openrisc , Richard Henderson , Jeff Law , Joseph Myers , Joel Sherrill , Sebastian Huber Subject: Re: [PATCH v3 1/3] or1k: libgcc: initial support for openrisc Message-ID: <20181027232503.GG5766@gate.crashing.org> References: <20181027043702.18414-1-shorne@gmail.com> <20181027043702.18414-2-shorne@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181027043702.18414-2-shorne@gmail.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg01769.txt.bz2 Hi! On Sat, Oct 27, 2018 at 01:37:00PM +0900, Stafford Horne wrote: > + /* Given R = X * Y ... */ > +1: l.sfeq r4, r0 /* while (y != 0) */ > + l.bf 2f > + l.andi r5, r4, 1 /* if (y & 1) ... */ Do the extra leading spaces mean something? > + l.sfeqi r4, 0 /* division by zero; return 0. */ In some places (like here) you ident with 8 spaces instead of a tab. > +/* For signed division we do: > + * > + * -x / y = x / -y = -(x / y) > + * -x % y = -(x % y) > + * x % -y = x % b > + * > + * which has the property that (x/y)*y + (x%y) = x. > + */ You mean "y" instead of "b" I think. Segher