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