URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [builtins/] [lib/] [memcmp.c] - Rev 816
Compare with Previous | Blame | View Log
extern void abort(void); extern int inside_main; int memcmp (const void *s1, const void *s2, __SIZE_TYPE__ len) { const unsigned char *sp1, *sp2; #ifdef __OPTIMIZE__ if (inside_main) abort (); #endif sp1 = s1; sp2 = s2; while (len != 0 && *sp1 == *sp2) sp1++, sp2++, len--; if (len == 0) return 0; return *sp1 - *sp2; }