]> git.wh0rd.org - ICEs.git/blame - bfin-strcmp/test.i.2
initial import
[ICEs.git] / bfin-strcmp / test.i.2
CommitLineData
45516216 1typedef long unsigned int size_t;
2typedef unsigned short __kernel_dev_t;
3typedef unsigned long __kernel_ino_t;
4typedef unsigned short __kernel_mode_t;
5typedef unsigned short __kernel_nlink_t;
6typedef long __kernel_off_t;
7typedef int __kernel_pid_t;
8typedef unsigned int __kernel_ipc_pid_t;
9typedef unsigned int __kernel_uid_t;
10typedef unsigned int __kernel_gid_t;
11typedef unsigned int __kernel_size_t;
12typedef int __kernel_ssize_t;
13typedef int __kernel_ptrdiff_t;
14typedef long __kernel_time_t;
15typedef long __kernel_suseconds_t;
16typedef long __kernel_clock_t;
17typedef int __kernel_daddr_t;
18typedef char * __kernel_caddr_t;
19typedef unsigned short __kernel_uid16_t;
20typedef unsigned short __kernel_gid16_t;
21typedef unsigned int __kernel_uid32_t;
22typedef unsigned int __kernel_gid32_t;
23typedef unsigned short __kernel_old_uid_t;
24typedef unsigned short __kernel_old_gid_t;
25typedef long long __kernel_loff_t;
26typedef __kernel_dev_t __kernel_old_dev_t;
27typedef struct {
28 int __val[2];
29} __kernel_fsid_t;
30typedef unsigned char __u_char;
31typedef unsigned short int __u_short;
32typedef unsigned int __u_int;
33typedef unsigned long int __u_long;
34typedef signed char __int8_t;
35typedef unsigned char __uint8_t;
36typedef signed short int __int16_t;
37typedef unsigned short int __uint16_t;
38typedef signed int __int32_t;
39typedef unsigned int __uint32_t;
40__extension__ typedef signed long long int __int64_t;
41__extension__ typedef unsigned long long int __uint64_t;
42__extension__ typedef long long int __quad_t;
43__extension__ typedef unsigned long long int __u_quad_t;
44__extension__ typedef __u_quad_t __dev_t;
45__extension__ typedef unsigned int __uid_t;
46__extension__ typedef unsigned int __gid_t;
47__extension__ typedef unsigned long int __ino_t;
48__extension__ typedef __u_quad_t __ino64_t;
49__extension__ typedef unsigned int __mode_t;
50__extension__ typedef unsigned int __nlink_t;
51__extension__ typedef long int __off_t;
52__extension__ typedef __quad_t __off64_t;
53__extension__ typedef int __pid_t;
54__extension__ typedef struct { int __val[2]; } __fsid_t;
55__extension__ typedef long int __clock_t;
56__extension__ typedef unsigned long int __rlim_t;
57__extension__ typedef __u_quad_t __rlim64_t;
58__extension__ typedef unsigned int __id_t;
59__extension__ typedef long int __time_t;
60__extension__ typedef unsigned int __useconds_t;
61__extension__ typedef long int __suseconds_t;
62__extension__ typedef int __daddr_t;
63__extension__ typedef long int __swblk_t;
64__extension__ typedef int __key_t;
65__extension__ typedef int __clockid_t;
66__extension__ typedef void * __timer_t;
67__extension__ typedef long int __blksize_t;
68__extension__ typedef long int __blkcnt_t;
69__extension__ typedef __quad_t __blkcnt64_t;
70__extension__ typedef unsigned long int __fsblkcnt_t;
71__extension__ typedef __u_quad_t __fsblkcnt64_t;
72__extension__ typedef unsigned long int __fsfilcnt_t;
73__extension__ typedef __u_quad_t __fsfilcnt64_t;
74__extension__ typedef long int __ssize_t;
75typedef __off64_t __loff_t;
76typedef __quad_t *__qaddr_t;
77typedef char *__caddr_t;
78__extension__ typedef int __intptr_t;
79__extension__ typedef unsigned int __socklen_t;
80typedef __kernel_ipc_pid_t __ipc_pid_t;
81struct __sched_param
82 {
83 int __sched_priority;
84 };
85struct _pthread_fastlock
86{
87 long int __status;
88 int __spinlock;
89};
90typedef struct _pthread_descr_struct *_pthread_descr;
91typedef struct __pthread_attr_s
92{
93 int __detachstate;
94 int __schedpolicy;
95 struct __sched_param __schedparam;
96 int __inheritsched;
97 int __scope;
98 size_t __guardsize;
99 int __stackaddr_set;
100 void *__stackaddr;
101 size_t __stacksize;
102} pthread_attr_t;
103typedef struct
104{
105 struct _pthread_fastlock __c_lock;
106 _pthread_descr __c_waiting;
107} pthread_cond_t;
108typedef struct
109{
110 int __dummy;
111} pthread_condattr_t;
112typedef unsigned int pthread_key_t;
113typedef struct
114{
115 int __m_reserved;
116 int __m_count;
117 _pthread_descr __m_owner;
118 int __m_kind;
119 struct _pthread_fastlock __m_lock;
120} pthread_mutex_t;
121typedef struct
122{
123 int __mutexkind;
124} pthread_mutexattr_t;
125typedef int pthread_once_t;
126typedef unsigned long int pthread_t;
127typedef struct __STDIO_FILE_STRUCT FILE;
128typedef struct __STDIO_FILE_STRUCT __FILE;
129struct timespec
130 {
131 __time_t tv_sec;
132 long int tv_nsec;
133 };
134struct sched_param
135 {
136 int __sched_priority;
137 };
138extern int clone (int (*__fn) (void *__arg), void *__child_stack,
139 int __flags, void *__arg, ...) __attribute__ ((__nothrow__));
140typedef unsigned long int __cpu_mask;
141typedef struct
142{
143 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
144} cpu_set_t;
145extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
146 __attribute__ ((__nothrow__));
147extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__));
148extern int sched_setscheduler (__pid_t __pid, int __policy,
149 __const struct sched_param *__param) __attribute__ ((__nothrow__));
150extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__));
151extern int sched_yield (void) __attribute__ ((__nothrow__));
152extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__));
153extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__));
154extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__));
155typedef __clock_t clock_t;
156typedef __time_t time_t;
157typedef __clockid_t clockid_t;
158typedef __timer_t timer_t;
159struct tm
160{
161 int tm_sec;
162 int tm_min;
163 int tm_hour;
164 int tm_mday;
165 int tm_mon;
166 int tm_year;
167 int tm_wday;
168 int tm_yday;
169 int tm_isdst;
170 long int tm_gmtoff;
171 __const char *tm_zone;
172};
173struct itimerspec
174 {
175 struct timespec it_interval;
176 struct timespec it_value;
177 };
178struct sigevent;
179extern clock_t clock (void) __attribute__ ((__nothrow__));
180extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));
181extern double difftime (time_t __time1, time_t __time0)
182 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
183extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));
184extern size_t strftime (char *__restrict __s, size_t __maxsize,
185 __const char *__restrict __format,
186 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
187extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));
188extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));
189extern struct tm *gmtime_r (__const time_t *__restrict __timer,
190 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
191extern struct tm *localtime_r (__const time_t *__restrict __timer,
192 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
193extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));
194extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));
195extern char *asctime_r (__const struct tm *__restrict __tp,
196 char *__restrict __buf) __attribute__ ((__nothrow__));
197extern char *ctime_r (__const time_t *__restrict __timer,
198 char *__restrict __buf) __attribute__ ((__nothrow__));
199extern char *tzname[2];
200extern void tzset (void) __attribute__ ((__nothrow__));
201extern int daylight;
202extern long int timezone;
203extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
204extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));
205extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));
206extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
207extern int nanosleep (__const struct timespec *__requested_time,
208 struct timespec *__remaining);
209extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));
210extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));
211extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
212 __attribute__ ((__nothrow__));
213extern int timer_create (clockid_t __clock_id,
214 struct sigevent *__restrict __evp,
215 timer_t *__restrict __timerid) __attribute__ ((__nothrow__));
216extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));
217extern int timer_settime (timer_t __timerid, int __flags,
218 __const struct itimerspec *__restrict __value,
219 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));
220extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
221 __attribute__ ((__nothrow__));
222extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
223typedef int __sig_atomic_t;
224typedef struct
225 {
226 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
227 } __sigset_t;
228typedef __sigset_t sigset_t;
229enum
230{
231 PTHREAD_CREATE_JOINABLE,
232 PTHREAD_CREATE_DETACHED
233};
234enum
235{
236 PTHREAD_INHERIT_SCHED,
237 PTHREAD_EXPLICIT_SCHED
238};
239enum
240{
241 PTHREAD_SCOPE_SYSTEM,
242 PTHREAD_SCOPE_PROCESS
243};
244enum
245{
246 PTHREAD_MUTEX_ADAPTIVE_NP,
247 PTHREAD_MUTEX_RECURSIVE_NP,
248 PTHREAD_MUTEX_ERRORCHECK_NP,
249 PTHREAD_MUTEX_TIMED_NP
250};
251enum
252{
253 PTHREAD_PROCESS_PRIVATE,
254 PTHREAD_PROCESS_SHARED
255};
256struct _pthread_cleanup_buffer
257{
258 void (*__routine) (void *);
259 void *__arg;
260 int __canceltype;
261 struct _pthread_cleanup_buffer *__prev;
262};
263enum
264{
265 PTHREAD_CANCEL_ENABLE,
266 PTHREAD_CANCEL_DISABLE
267};
268enum
269{
270 PTHREAD_CANCEL_DEFERRED,
271 PTHREAD_CANCEL_ASYNCHRONOUS
272};
273extern int pthread_create (pthread_t *__restrict __threadp,
274 __const pthread_attr_t *__restrict __attr,
275 void *(*__start_routine) (void *),
276 void *__restrict __arg) __attribute__ ((__nothrow__));
277extern pthread_t pthread_self (void) __attribute__ ((__nothrow__));
278extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__));
279extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
280extern int pthread_join (pthread_t __th, void **__thread_return);
281extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__));
282extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__));
283extern int pthread_attr_destroy (pthread_attr_t *__attr) __attribute__ ((__nothrow__));
284extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
285 int __detachstate) __attribute__ ((__nothrow__));
286extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
287 int *__detachstate) __attribute__ ((__nothrow__));
288extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
289 __const struct sched_param *__restrict
290 __param) __attribute__ ((__nothrow__));
291extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
292 __attr,
293 struct sched_param *__restrict __param)
294 __attribute__ ((__nothrow__));
295extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
296 __attribute__ ((__nothrow__));
297extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
298 __attr, int *__restrict __policy)
299 __attribute__ ((__nothrow__));
300extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
301 int __inherit) __attribute__ ((__nothrow__));
302extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
303 __attr, int *__restrict __inherit)
304 __attribute__ ((__nothrow__));
305extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
306 __attribute__ ((__nothrow__));
307extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
308 int *__restrict __scope) __attribute__ ((__nothrow__));
309extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
310 void *__stackaddr) __attribute__ ((__nothrow__));
311extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
312 __attr, void **__restrict __stackaddr)
313 __attribute__ ((__nothrow__));
314extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
315 size_t __stacksize) __attribute__ ((__nothrow__));
316extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
317 __attr, size_t *__restrict __stacksize)
318 __attribute__ ((__nothrow__));
319extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
320 __const struct sched_param *__param)
321 __attribute__ ((__nothrow__));
322extern int pthread_getschedparam (pthread_t __target_thread,
323 int *__restrict __policy,
324 struct sched_param *__restrict __param)
325 __attribute__ ((__nothrow__));
326extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
327 __const pthread_mutexattr_t *__restrict
328 __mutex_attr) __attribute__ ((__nothrow__));
329extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__));
330extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__));
331extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__));
332extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__));
333extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__));
334extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__));
335extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
336 __restrict __attr,
337 int *__restrict __pshared) __attribute__ ((__nothrow__));
338extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
339 int __pshared) __attribute__ ((__nothrow__));
340extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
341 __const pthread_condattr_t *__restrict
342 __cond_attr) __attribute__ ((__nothrow__));
343extern int pthread_cond_destroy (pthread_cond_t *__cond) __attribute__ ((__nothrow__));
344extern int pthread_cond_signal (pthread_cond_t *__cond) __attribute__ ((__nothrow__));
345extern int pthread_cond_broadcast (pthread_cond_t *__cond) __attribute__ ((__nothrow__));
346extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
347 pthread_mutex_t *__restrict __mutex);
348extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
349 pthread_mutex_t *__restrict __mutex,
350 __const struct timespec *__restrict
351 __abstime);
352extern int pthread_condattr_init (pthread_condattr_t *__attr) __attribute__ ((__nothrow__));
353extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __attribute__ ((__nothrow__));
354extern int pthread_condattr_getpshared (__const pthread_condattr_t *
355 __restrict __attr,
356 int *__restrict __pshared) __attribute__ ((__nothrow__));
357extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
358 int __pshared) __attribute__ ((__nothrow__));
359extern int pthread_key_create (pthread_key_t *__key,
360 void (*__destr_function) (void *)) __attribute__ ((__nothrow__));
361extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__));
362extern int pthread_setspecific (pthread_key_t __key,
363 __const void *__pointer) __attribute__ ((__nothrow__));
364extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__));
365extern int pthread_once (pthread_once_t *__once_control,
366 void (*__init_routine) (void));
367extern int pthread_setcancelstate (int __state, int *__oldstate);
368extern int pthread_setcanceltype (int __type, int *__oldtype);
369extern int pthread_cancel (pthread_t __cancelthread);
370extern void pthread_testcancel (void);
371extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer,
372 void (*__routine) (void *),
373 void *__arg) __attribute__ ((__nothrow__));
374extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer,
375 int __execute) __attribute__ ((__nothrow__));
376extern int pthread_sigmask (int __how,
377 __const __sigset_t *__restrict __newmask,
378 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__));
379extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__));
380extern int pthread_atfork (void (*__prepare) (void),
381 void (*__parent) (void),
382 void (*__child) (void)) __attribute__ ((__nothrow__));
383extern void pthread_kill_other_threads_np (void) __attribute__ ((__nothrow__));
384typedef struct {
385 __off_t __pos;
386} __STDIO_fpos_t;
387typedef struct {
388 __off64_t __pos;
389} __STDIO_fpos64_t;
390typedef __off64_t __offmax_t;
391struct __STDIO_FILE_STRUCT {
392 unsigned short __modeflags;
393 unsigned char __ungot[2];
394 int __filedes;
395 unsigned char *__bufstart;
396 unsigned char *__bufend;
397 unsigned char *__bufpos;
398 unsigned char *__bufread;
399 unsigned char *__bufgetc_u;
400 unsigned char *__bufputc_u;
401 struct __STDIO_FILE_STRUCT *__nextopen;
402 int __user_locking;
403 pthread_mutex_t __lock;
404};
405extern int __fgetc_unlocked(FILE *__stream);
406extern int __fputc_unlocked(int __c, FILE *__stream);
407extern FILE *__stdin;
408extern FILE *__stdout;
409typedef __builtin_va_list __gnuc_va_list;
410typedef __STDIO_fpos_t fpos_t;
411extern FILE *stdin;
412extern FILE *stdout;
413extern FILE *stderr;
414extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
415extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
416extern FILE *tmpfile (void);
417extern char *tmpnam (char *__s) __attribute__ ((__nothrow__));
418extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__));
419extern char *tempnam (__const char *__dir, __const char *__pfx)
420 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
421extern int fclose (FILE *__stream);
422extern int fflush (FILE *__stream);
423extern int fflush_unlocked (FILE *__stream);
424extern FILE *fopen (__const char *__restrict __filename,
425 __const char *__restrict __modes);
426extern FILE *freopen (__const char *__restrict __filename,
427 __const char *__restrict __modes,
428 FILE *__restrict __stream);
429extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__));
430extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
431extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
432 int __modes, size_t __n) __attribute__ ((__nothrow__));
433extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
434 size_t __size) __attribute__ ((__nothrow__));
435extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
436extern int fprintf (FILE *__restrict __stream,
437 __const char *__restrict __format, ...);
438extern int printf (__const char *__restrict __format, ...);
439extern int sprintf (char *__restrict __s,
440 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
441extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
442 __gnuc_va_list __arg);
443extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
444extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
445 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
446extern int snprintf (char *__restrict __s, size_t __maxlen,
447 __const char *__restrict __format, ...)
448 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
449extern int vsnprintf (char *__restrict __s, size_t __maxlen,
450 __const char *__restrict __format, __gnuc_va_list __arg)
451 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
452extern int fscanf (FILE *__restrict __stream,
453 __const char *__restrict __format, ...);
454extern int scanf (__const char *__restrict __format, ...);
455extern int sscanf (__const char *__restrict __s,
456 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
457extern int fgetc (FILE *__stream);
458extern int getc (FILE *__stream);
459extern int getchar (void);
460extern int getc_unlocked (FILE *__stream);
461extern int getchar_unlocked (void);
462extern int fgetc_unlocked (FILE *__stream);
463extern int fputc (int __c, FILE *__stream);
464extern int putc (int __c, FILE *__stream);
465extern int putchar (int __c);
466extern int fputc_unlocked (int __c, FILE *__stream);
467extern int putc_unlocked (int __c, FILE *__stream);
468extern int putchar_unlocked (int __c);
469extern int getw (FILE *__stream);
470extern int putw (int __w, FILE *__stream);
471extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);
472extern char *gets (char *__s);
473extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
474extern int puts (__const char *__s);
475extern int ungetc (int __c, FILE *__stream);
476extern size_t fread (void *__restrict __ptr, size_t __size,
477 size_t __n, FILE *__restrict __stream);
478extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
479 size_t __n, FILE *__restrict __s);
480extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
481 size_t __n, FILE *__restrict __stream);
482extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
483 size_t __n, FILE *__restrict __stream);
484extern int fseek (FILE *__stream, long int __off, int __whence);
485extern long int ftell (FILE *__stream);
486extern void rewind (FILE *__stream);
487extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
488extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
489extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
490extern int feof (FILE *__stream) __attribute__ ((__nothrow__));
491extern int ferror (FILE *__stream) __attribute__ ((__nothrow__));
492extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
493extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
494extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
495extern void perror (__const char *__s);
496extern int fileno (FILE *__stream) __attribute__ ((__nothrow__));
497extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
498extern FILE *popen (__const char *__command, __const char *__modes);
499extern int pclose (FILE *__stream);
500extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
501extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
502extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__));
503extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
504extern void *memcpy (void *__restrict __dest,
505 __const void *__restrict __src, size_t __n)
506 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
507extern void *memmove (void *__dest, __const void *__src, size_t __n)
508 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
509extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
510 int __c, size_t __n)
511 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
512extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
513extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
514 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
515extern void *memchr (__const void *__s, int __c, size_t __n)
516 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
517extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
518 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
519extern char *strncpy (char *__restrict __dest,
520 __const char *__restrict __src, size_t __n)
521 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
522extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
523 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
524extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
525 size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
526extern int strcmp (__const char *__s1, __const char *__s2)
527 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
528extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
529 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
530extern int strcoll (__const char *__s1, __const char *__s2)
531 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
532extern size_t strxfrm (char *__restrict __dest,
533 __const char *__restrict __src, size_t __n)
534 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
535extern char *strdup (__const char *__s)
536 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
537extern char *strchr (__const char *__s, int __c)
538 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
539extern char *strrchr (__const char *__s, int __c)
540 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
541extern size_t strcspn (__const char *__s, __const char *__reject)
542 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
543extern size_t strspn (__const char *__s, __const char *__accept)
544 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
545extern char *strpbrk (__const char *__s, __const char *__accept)
546 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
547extern char *strstr (__const char *__haystack, __const char *__needle)
548 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
549extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
550 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
551extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
552 char **__restrict __save_ptr)
553 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
554extern size_t strlen (__const char *__s)
555 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
556extern char *strerror (int __errnum) __attribute__ ((__nothrow__));
557extern char *__glibc_strerror_r (int __errnum, char *__buf, size_t __buflen)
558 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
559extern char * strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("_" "__glibc_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
560extern void bcopy (__const void *__src, void *__dest, size_t __n)
561 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
562extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
563extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
564 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
565extern char *index (__const char *__s, int __c)
566 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
567extern char *rindex (__const char *__s, int __c)
568 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
569extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
570extern int strcasecmp (__const char *__s1, __const char *__s2)
571 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
572extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
573 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
574extern char *strsep (char **__restrict __stringp,
575 __const char *__restrict __delim)
576 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
577extern size_t strlcat(char *__restrict dst, const char *__restrict src,
578 size_t n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
579extern size_t strlcpy(char *__restrict dst, const char *__restrict src,
580 size_t n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
581const char *it = "<UNSET>";
582size_t errors = 0;
583char one[50];
584char two[50];
585static void
586check (int thing, int number)
587{
588 if (!thing)
589 {
590 printf("%s flunked test %d\n", it, number);
591 ++errors;
592 }
593 else if (0)
594 {
595 printf("%s test %d ok\n", it, number);
596 }
597}
598static void
599equal (const char *a, const char *b, int number)
600{
601 check(a != ((void *)0) && b != ((void *)0) && (strcmp((a), (b)) == 0), number);
602}
603int _strcmp(const char *cs, const char *ct)
604{
605 int __res1, __res2;
606 __asm__
607 ("1:\t%2 = B[%0++] (Z);\n\t"
608 "%3 = B[%1++] (Z);\n\t"
609 "CC = %2 == %3;\n\t"
610 "if ! cc jump 2f;\n\t"
611 "CC = %2;\n\t"
612 "if cc jump 1b (bp);\n\t"
613 "jump.s 3f;\n"
614 "2:\t%2 = %2 - %3;\n"
615 "3:\n"
616 : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2)
617 : : "CC");
618 return __res1;
619}
620void
621test_strcmp (void)
622{
623 it = "strcmp";
624 {
625 char buf1[0x40], buf2[0x40];
626 int i, j;
627j = i = 0;
628 {
629 int k;
630 buf1[i] = buf1[0x3f] = 0;
631 buf2[j] = buf2[0x3f] = 0;
632k = 0;
633 {
634;
635;
636 buf1[i+k] = 'A' + i + k;
637 buf1[i+k+1] = 0;
638;
639;
640 check (_strcmp (buf1+i,buf2+j) > 0, 2);
641return;
642 }
643 }
644 }
645}
646int main(int argc, char *argv[])
647{
648 int status;
649 test_strcmp ();
650 if (errors == 0)
651 {
652 status = 0;
653 printf("TEST PASS.\n");
654 }
655 else
656 {
657 status = 1;
658 printf("%Zd errors.\n", errors);
659 printf("TEST FAIL.\n");
660 }
661 return status;
662}