From owner-freebsd-arm@FreeBSD.ORG Tue May 5 14:19:13 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA6E8106564A for ; Tue, 5 May 2009 14:19:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 827458FC13 for ; Tue, 5 May 2009 14:19:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n45EH013037665; Tue, 5 May 2009 08:17:00 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 05 May 2009 08:17:01 -0600 (MDT) Message-Id: <20090505.081701.569396874.imp@bsdimp.com> To: tinguely@casselton.net From: "M. Warner Losh" In-Reply-To: <200905051317.n45DHtKW044428@casselton.net> References: <6d53329e0905050004k27d957bve15d37113b5fedbb@mail.gmail.com> <200905051317.n45DHtKW044428@casselton.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: channa.kad@gmail.com, freebsd-arm@freebsd.org, venkiece2005@gmail.com Subject: Re: strncmp issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 14:19:14 -0000 In message: <200905051317.n45DHtKW044428@casselton.net> Mark Tinguely writes: : : > I have tested strncmp("abcdefg", "abcdefh", 6) without beq 2f. : > It returns zero not -1. : > : > I have checked with conditional assembler but not normal assembler. : > The beq 2f is required for normal assembler. : > Right/Wrong? : : Yes, the compiler with FreeBSD-current needs the "beq 2f". : : Can can one do 2 unconditional "cmp" in sequence without losing the condition : codes of the first "cmp"? : : I am sure this is becoming a 'bikeshed' topic. I built way more than my : share of the shed. So, as long as it works, I will be happy. Is the hand rolled assembler still better than what gcc can produce? Warner