strncmp issue

M. Warner Losh imp at bsdimp.com
Tue May 5 14:19:14 UTC 2009


In message: <200905051317.n45DHtKW044428 at casselton.net>
            Mark Tinguely <tinguely at 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


More information about the freebsd-arm mailing list