Date: Tue, 05 May 2009 08:17:01 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: tinguely@casselton.net Cc: channa.kad@gmail.com, freebsd-arm@freebsd.org, venkiece2005@gmail.com Subject: Re: strncmp issue Message-ID: <20090505.081701.569396874.imp@bsdimp.com> In-Reply-To: <200905051317.n45DHtKW044428@casselton.net> References: <6d53329e0905050004k27d957bve15d37113b5fedbb@mail.gmail.com> <200905051317.n45DHtKW044428@casselton.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200905051317.n45DHtKW044428@casselton.net> Mark Tinguely <tinguely@casselton.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090505.081701.569396874.imp>