Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 1 "zigzag/zigzag.c"
- # 1 "/home/linaro/esim-test-bins//"
- # 1 "<command-line>"
- # 1 "zigzag/zigzag.c"
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 1 3
- # 29 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/_ansi.h" 1 3
- # 15 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/_ansi.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/newlib.h" 1 3
- # 16 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/_ansi.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/config.h" 1 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/ieeefp.h" 1 3
- # 5 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/config.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/features.h" 1 3
- # 6 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/config.h" 2 3
- # 17 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/_ansi.h" 2 3
- # 30 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 1 3 4
- # 212 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 3 4
- typedef long unsigned int size_t;
- # 35 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stdarg.h" 1 3 4
- # 40 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stdarg.h" 3 4
- typedef __builtin_va_list __gnuc_va_list;
- # 38 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 1 3
- # 13 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/_ansi.h" 1 3
- # 14 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/_types.h" 1 3
- # 12 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/_types.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/_types.h" 1 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/_default_types.h" 1 3
- # 26 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/_default_types.h" 3
- typedef signed char __int8_t ;
- typedef unsigned char __uint8_t ;
- # 36 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/_default_types.h" 3
- typedef signed short __int16_t;
- typedef unsigned short __uint16_t;
- # 46 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/_default_types.h" 3
- typedef __int16_t __int_least16_t;
- typedef __uint16_t __uint_least16_t;
- # 58 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/_default_types.h" 3
- typedef signed int __int32_t;
- typedef unsigned int __uint32_t;
- # 76 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/_default_types.h" 3
- typedef __int32_t __int_least32_t;
- typedef __uint32_t __uint_least32_t;
- # 99 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/_default_types.h" 3
- typedef signed long long __int64_t;
- typedef unsigned long long __uint64_t;
- # 8 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/_types.h" 2 3
- # 13 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/_types.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/lock.h" 1 3
- typedef int _LOCK_T;
- typedef int _LOCK_RECURSIVE_T;
- # 14 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/_types.h" 2 3
- typedef long _off_t;
- typedef short __dev_t;
- typedef unsigned short __uid_t;
- typedef unsigned short __gid_t;
- __extension__ typedef long long _off64_t;
- typedef long _fpos_t;
- # 56 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/_types.h" 3
- typedef int _ssize_t;
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 1 3 4
- # 353 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 3 4
- typedef unsigned int wint_t;
- # 64 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/_types.h" 2 3
- typedef struct
- {
- int __count;
- union
- {
- wint_t __wch;
- unsigned char __wchb[4];
- } __value;
- } _mbstate_t;
- typedef _LOCK_RECURSIVE_T _flock_t;
- typedef void *_iconv_t;
- # 15 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 2 3
- typedef unsigned long __ULong;
- # 37 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 3
- struct _reent;
- struct _Bigint
- {
- struct _Bigint *_next;
- int _k, _maxwds, _sign, _wds;
- __ULong _x[1];
- };
- struct __tm
- {
- int __tm_sec;
- int __tm_min;
- int __tm_hour;
- int __tm_mday;
- int __tm_mon;
- int __tm_year;
- int __tm_wday;
- int __tm_yday;
- int __tm_isdst;
- };
- struct _on_exit_args {
- void * _fnargs[32];
- void * _dso_handle[32];
- __ULong _fntypes;
- __ULong _is_cxa;
- };
- # 89 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 3
- struct _atexit {
- struct _atexit *_next;
- int _ind;
- void (*_fns[32])(void);
- struct _on_exit_args _on_exit_args;
- };
- # 105 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 3
- struct __sbuf {
- unsigned char *_base;
- int _size;
- };
- # 169 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 3
- struct __sFILE {
- unsigned char *_p;
- int _r;
- int _w;
- short _flags;
- short _file;
- struct __sbuf _bf;
- int _lbfsize;
- void * _cookie;
- int (* _read) (struct _reent *, void *, char *, int)
- ;
- int (* _write) (struct _reent *, void *, const char *, int)
- ;
- _fpos_t (* _seek) (struct _reent *, void *, _fpos_t, int);
- int (* _close) (struct _reent *, void *);
- struct __sbuf _ub;
- unsigned char *_up;
- int _ur;
- unsigned char _ubuf[3];
- unsigned char _nbuf[1];
- struct __sbuf _lb;
- int _blksize;
- int _offset;
- struct _reent *_data;
- _flock_t _lock;
- _mbstate_t _mbstate;
- int _flags2;
- };
- # 273 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 3
- typedef struct __sFILE __FILE;
- struct _glue
- {
- struct _glue *_next;
- int _niobs;
- __FILE *_iobs;
- };
- # 305 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 3
- struct _rand48 {
- unsigned short _seed[3];
- unsigned short _mult[3];
- unsigned short _add;
- };
- # 580 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 3
- struct _reent
- {
- int _errno;
- __FILE *_stdin, *_stdout, *_stderr;
- int _inc;
- char _emergency[25];
- int _current_category;
- const char *_current_locale;
- int __sdidinit;
- void (* __cleanup) (struct _reent *);
- struct _Bigint *_result;
- int _result_k;
- struct _Bigint *_p5s;
- struct _Bigint **_freelist;
- int _cvtlen;
- char *_cvtbuf;
- union
- {
- struct
- {
- unsigned int _unused_rand;
- char * _strtok_last;
- char _asctime_buf[26];
- struct __tm _localtime_buf;
- int _gamma_signgam;
- __extension__ unsigned long long _rand_next;
- struct _rand48 _r48;
- _mbstate_t _mblen_state;
- _mbstate_t _mbtowc_state;
- _mbstate_t _wctomb_state;
- char _l64a_buf[8];
- char _signal_buf[24];
- int _getdate_err;
- _mbstate_t _mbrlen_state;
- _mbstate_t _mbrtowc_state;
- _mbstate_t _mbsrtowcs_state;
- _mbstate_t _wcrtomb_state;
- _mbstate_t _wcsrtombs_state;
- int _h_errno;
- } _reent;
- struct
- {
- unsigned char * _nextf[30];
- unsigned int _nmalloc[30];
- } _unused;
- } _new;
- struct _atexit *_atexit;
- struct _atexit _atexit0;
- void (**(_sig_func))(int);
- struct _glue __sglue;
- __FILE __sf[3];
- };
- # 818 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/reent.h" 3
- extern struct _reent *_impure_ptr ;
- extern struct _reent *const _global_impure_ptr ;
- void _reclaim_reent (struct _reent *);
- # 46 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/types.h" 1 3
- # 69 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/types.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 1 3 4
- # 147 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 3 4
- typedef long int ptrdiff_t;
- # 324 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 3 4
- typedef unsigned int wchar_t;
- # 70 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/types.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/types.h" 1 3
- # 19 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/types.h" 3
- typedef long int __off_t;
- typedef int __pid_t;
- __extension__ typedef long long int __loff_t;
- # 71 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/types.h" 2 3
- # 92 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/types.h" 3
- typedef unsigned char u_char;
- typedef unsigned short u_short;
- typedef unsigned int u_int;
- typedef unsigned long u_long;
- typedef unsigned short ushort;
- typedef unsigned int uint;
- typedef unsigned long ulong;
- typedef unsigned long clock_t;
- typedef long time_t;
- struct timespec {
- time_t tv_sec;
- long tv_nsec;
- };
- struct itimerspec {
- struct timespec it_interval;
- struct timespec it_value;
- };
- typedef long daddr_t;
- typedef char * caddr_t;
- typedef unsigned short ino_t;
- # 163 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/types.h" 3
- typedef _off_t off_t;
- typedef __dev_t dev_t;
- typedef __uid_t uid_t;
- typedef __gid_t gid_t;
- typedef int pid_t;
- typedef long key_t;
- typedef _ssize_t ssize_t;
- # 196 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/types.h" 3
- typedef unsigned int mode_t __attribute__ ((__mode__ (__SI__)));
- typedef unsigned short nlink_t;
- # 223 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/types.h" 3
- typedef long fd_mask;
- typedef struct _types_fd_set {
- fd_mask fds_bits[(((64)+(((sizeof (fd_mask) * 8))-1))/((sizeof (fd_mask) * 8)))];
- } _types_fd_set;
- # 254 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/types.h" 3
- typedef unsigned long clockid_t;
- typedef unsigned long timer_t;
- typedef unsigned long useconds_t;
- typedef long suseconds_t;
- # 47 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 2 3
- typedef __FILE FILE;
- typedef _fpos_t fpos_t;
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/stdio.h" 1 3
- # 62 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 2 3
- # 171 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 3
- FILE * tmpfile (void);
- char * tmpnam (char *);
- int fclose (FILE *);
- int fflush (FILE *);
- FILE * freopen (const char *, const char *, FILE *);
- void setbuf (FILE *, char *);
- int setvbuf (FILE *, char *, int, size_t);
- int fprintf (FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)))
- ;
- int fscanf (FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)))
- ;
- int printf (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)))
- ;
- int scanf (const char *, ...) __attribute__ ((__format__ (__scanf__, 1, 2)))
- ;
- int sscanf (const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)))
- ;
- int vfprintf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)))
- ;
- int vprintf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0)))
- ;
- int vsprintf (char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)))
- ;
- int fgetc (FILE *);
- char * fgets (char *, int, FILE *);
- int fputc (int, FILE *);
- int fputs (const char *, FILE *);
- int getc (FILE *);
- int getchar (void);
- char * gets (char *);
- int putc (int, FILE *);
- int putchar (int);
- int puts (const char *);
- int ungetc (int, FILE *);
- size_t fread (void *, size_t _size, size_t _n, FILE *);
- size_t fwrite (const void * , size_t _size, size_t _n, FILE *);
- int fgetpos (FILE *, fpos_t *);
- int fseek (FILE *, long, int);
- int fsetpos (FILE *, const fpos_t *);
- long ftell ( FILE *);
- void rewind (FILE *);
- void clearerr (FILE *);
- int feof (FILE *);
- int ferror (FILE *);
- void perror (const char *);
- FILE * fopen (const char *_name, const char *_type);
- int sprintf (char *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)))
- ;
- int remove (const char *);
- int rename (const char *, const char *);
- int fseeko (FILE *, off_t, int);
- off_t ftello ( FILE *);
- int asiprintf (char **, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)))
- ;
- char * asniprintf (char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- char * asnprintf (char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- int asprintf (char **, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)))
- ;
- int diprintf (int, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)))
- ;
- int fcloseall (void);
- int fiprintf (FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)))
- ;
- int fiscanf (FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)))
- ;
- int iprintf (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)))
- ;
- int iscanf (const char *, ...) __attribute__ ((__format__ (__scanf__, 1, 2)))
- ;
- int siprintf (char *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)))
- ;
- int siscanf (const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)))
- ;
- int snprintf (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- int sniprintf (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- char * tempnam (const char *, const char *);
- int vasiprintf (char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)))
- ;
- char * vasniprintf (char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- char * vasnprintf (char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- int vasprintf (char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)))
- ;
- int vdiprintf (int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)))
- ;
- int vfiprintf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)))
- ;
- int vfiscanf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)))
- ;
- int vfscanf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)))
- ;
- int viprintf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0)))
- ;
- int viscanf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 1, 0)))
- ;
- int vscanf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 1, 0)))
- ;
- int vsiprintf (char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)))
- ;
- int vsiscanf (const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)))
- ;
- int vsniprintf (char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- int vsnprintf (char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- int vsscanf (const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)))
- ;
- # 313 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 3
- FILE * fdopen (int, const char *);
- int fileno (FILE *);
- int getw (FILE *);
- int pclose (FILE *);
- FILE * popen (const char *, const char *);
- int putw (int, FILE *);
- void setbuffer (FILE *, char *, int);
- int setlinebuf (FILE *);
- int getc_unlocked (FILE *);
- int getchar_unlocked (void);
- void flockfile (FILE *);
- int ftrylockfile (FILE *);
- void funlockfile (FILE *);
- int putc_unlocked (int, FILE *);
- int putchar_unlocked (int);
- # 338 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 3
- int dprintf (int, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)))
- ;
- FILE * fmemopen (void *, size_t, const char *);
- FILE * open_memstream (char **, size_t *);
- int vdprintf (int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)))
- ;
- int _asiprintf_r (struct _reent *, char **, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- char * _asniprintf_r (struct _reent *, char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)))
- ;
- char * _asnprintf_r (struct _reent *, char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)))
- ;
- int _asprintf_r (struct _reent *, char **, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- int _diprintf_r (struct _reent *, int, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- int _dprintf_r (struct _reent *, int, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- int _fclose_r (struct _reent *, FILE *);
- int _fcloseall_r (struct _reent *);
- FILE * _fdopen_r (struct _reent *, int, const char *);
- int _fflush_r (struct _reent *, FILE *);
- int _fgetc_r (struct _reent *, FILE *);
- char * _fgets_r (struct _reent *, char *, int, FILE *);
- int _fgetpos_r (struct _reent *, FILE *, fpos_t *);
- int _fsetpos_r (struct _reent *, FILE *, const fpos_t *);
- int _fiprintf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- int _fiscanf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)))
- ;
- FILE * _fmemopen_r (struct _reent *, void *, size_t, const char *);
- FILE * _fopen_r (struct _reent *, const char *, const char *);
- FILE * _freopen_r (struct _reent *, const char *, const char *, FILE *);
- int _fprintf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- int _fpurge_r (struct _reent *, FILE *);
- int _fputc_r (struct _reent *, int, FILE *);
- int _fputs_r (struct _reent *, const char *, FILE *);
- size_t _fread_r (struct _reent *, void *, size_t _size, size_t _n, FILE *);
- int _fscanf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)))
- ;
- int _fseek_r (struct _reent *, FILE *, long, int);
- int _fseeko_r (struct _reent *, FILE *, _off_t, int);
- long _ftell_r (struct _reent *, FILE *);
- _off_t _ftello_r (struct _reent *, FILE *);
- void _rewind_r (struct _reent *, FILE *);
- size_t _fwrite_r (struct _reent *, const void * , size_t _size, size_t _n, FILE *);
- int _getc_r (struct _reent *, FILE *);
- int _getc_unlocked_r (struct _reent *, FILE *);
- int _getchar_r (struct _reent *);
- int _getchar_unlocked_r (struct _reent *);
- char * _gets_r (struct _reent *, char *);
- int _iprintf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)))
- ;
- int _iscanf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)))
- ;
- FILE * _open_memstream_r (struct _reent *, char **, size_t *);
- void _perror_r (struct _reent *, const char *);
- int _printf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)))
- ;
- int _putc_r (struct _reent *, int, FILE *);
- int _putc_unlocked_r (struct _reent *, int, FILE *);
- int _putchar_unlocked_r (struct _reent *, int);
- int _putchar_r (struct _reent *, int);
- int _puts_r (struct _reent *, const char *);
- int _remove_r (struct _reent *, const char *);
- int _rename_r (struct _reent *, const char *_old, const char *_new)
- ;
- int _scanf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)))
- ;
- int _siprintf_r (struct _reent *, char *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- int _siscanf_r (struct _reent *, const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)))
- ;
- int _sniprintf_r (struct _reent *, char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)))
- ;
- int _snprintf_r (struct _reent *, char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)))
- ;
- int _sprintf_r (struct _reent *, char *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)))
- ;
- int _sscanf_r (struct _reent *, const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)))
- ;
- char * _tempnam_r (struct _reent *, const char *, const char *);
- FILE * _tmpfile_r (struct _reent *);
- char * _tmpnam_r (struct _reent *, char *);
- int _ungetc_r (struct _reent *, int, FILE *);
- int _vasiprintf_r (struct _reent *, char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- char * _vasniprintf_r (struct _reent*, char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)))
- ;
- char * _vasnprintf_r (struct _reent*, char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)))
- ;
- int _vasprintf_r (struct _reent *, char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- int _vdiprintf_r (struct _reent *, int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- int _vdprintf_r (struct _reent *, int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- int _vfiprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- int _vfiscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)))
- ;
- int _vfprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- int _vfscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)))
- ;
- int _viprintf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)))
- ;
- int _viscanf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)))
- ;
- int _vprintf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)))
- ;
- int _vscanf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)))
- ;
- int _vsiprintf_r (struct _reent *, char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- int _vsiscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)))
- ;
- int _vsniprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)))
- ;
- int _vsnprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)))
- ;
- int _vsprintf_r (struct _reent *, char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)))
- ;
- int _vsscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)))
- ;
- int fpurge (FILE *);
- ssize_t __getdelim (char **, size_t *, int, FILE *);
- ssize_t __getline (char **, size_t *, FILE *);
- # 515 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 3
- int __srget_r (struct _reent *, FILE *);
- int __swbuf_r (struct _reent *, int, FILE *);
- # 535 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 3
- FILE *funopen (const void * __cookie, int (*__readfn)(void * __cookie, char *__buf, int __n), int (*__writefn)(void * __cookie, const char *__buf, int __n), fpos_t (*__seekfn)(void * __cookie, fpos_t __off, int __whence), int (*__closefn)(void * __cookie))
- ;
- FILE *_funopen_r (struct _reent *, const void * __cookie, int (*__readfn)(void * __cookie, char *__buf, int __n), int (*__writefn)(void * __cookie, const char *__buf, int __n), fpos_t (*__seekfn)(void * __cookie, fpos_t __off, int __whence), int (*__closefn)(void * __cookie))
- ;
- typedef ssize_t cookie_read_function_t(void *__cookie, char *__buf, size_t __n);
- typedef ssize_t cookie_write_function_t(void *__cookie, const char *__buf,
- size_t __n);
- typedef int cookie_seek_function_t(void *__cookie, off_t *__off, int __whence);
- typedef int cookie_close_function_t(void *__cookie);
- typedef struct
- {
- cookie_read_function_t *read;
- cookie_write_function_t *write;
- cookie_seek_function_t *seek;
- cookie_close_function_t *close;
- } cookie_io_functions_t;
- FILE *fopencookie (void *__cookie, const char *__mode, cookie_io_functions_t __functions)
- ;
- FILE *_fopencookie_r (struct _reent *, void *__cookie, const char *__mode, cookie_io_functions_t __functions)
- ;
- # 683 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdio.h" 3
- # 2 "zigzag/zigzag.c" 2
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stdint.h" 1 3 4
- # 9 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stdint.h" 3 4
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 1 3 4
- # 41 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 3 4
- typedef signed char int8_t ;
- typedef unsigned char uint8_t ;
- typedef signed char int_least8_t;
- typedef unsigned char uint_least8_t;
- typedef signed short int16_t;
- typedef unsigned short uint16_t;
- # 67 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 3 4
- typedef int16_t int_least16_t;
- typedef uint16_t uint_least16_t;
- # 79 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 3 4
- typedef signed long int32_t;
- typedef unsigned long uint32_t;
- # 97 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 3 4
- typedef int32_t int_least32_t;
- typedef uint32_t uint_least32_t;
- # 119 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 3 4
- typedef signed long long int64_t;
- typedef unsigned long long uint64_t;
- # 129 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 3 4
- typedef int64_t int_least64_t;
- typedef uint64_t uint_least64_t;
- # 159 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 3 4
- typedef signed int int_fast8_t;
- typedef unsigned int uint_fast8_t;
- typedef signed int int_fast16_t;
- typedef unsigned int uint_fast16_t;
- typedef signed int int_fast32_t;
- typedef unsigned int uint_fast32_t;
- # 213 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 3 4
- typedef int_least64_t int_fast64_t;
- typedef uint_least64_t uint_fast64_t;
- typedef long long int intmax_t;
- # 231 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 3 4
- typedef long long unsigned int uintmax_t;
- # 243 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdint.h" 3 4
- typedef signed long int intptr_t;
- typedef unsigned long int uintptr_t;
- # 10 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stdint.h" 2 3 4
- # 3 "zigzag/zigzag.c" 2
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/string.h" 1 3
- # 12 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/string.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/cdefs.h" 1 3
- # 13 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/string.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 1 3 4
- # 16 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/string.h" 2 3
- void * memchr (const void *, int, size_t);
- int memcmp (const void *, const void *, size_t);
- void * memcpy (void *, const void *, size_t);
- void * memmove (void *, const void *, size_t);
- void * memset (void *, int, size_t);
- char *strcat (char *, const char *);
- char *strchr (const char *, int);
- int strcmp (const char *, const char *);
- int strcoll (const char *, const char *);
- char *strcpy (char *, const char *);
- size_t strcspn (const char *, const char *);
- char *strerror (int);
- size_t strlen (const char *);
- char *strncat (char *, const char *, size_t);
- int strncmp (const char *, const char *, size_t);
- char *strncpy (char *, const char *, size_t);
- char *strpbrk (const char *, const char *);
- char *strrchr (const char *, int);
- size_t strspn (const char *, const char *);
- char *strstr (const char *, const char *);
- char *strtok (char *, const char *);
- size_t strxfrm (char *, const char *, size_t);
- char *strtok_r (char *, const char *, char **);
- int bcmp (const void *, const void *, size_t);
- void bcopy (const void *, void *, size_t);
- void bzero (void *, size_t);
- int ffs (int);
- char *index (const char *, int);
- void * memccpy (void *, const void *, int, size_t);
- void * mempcpy (void *, const void *, size_t);
- void * memmem (const void *, size_t, const void *, size_t);
- char *rindex (const char *, int);
- char *stpcpy (char *, const char *);
- char *stpncpy (char *, const char *, size_t);
- int strcasecmp (const char *, const char *);
- char *strcasestr (const char *, const char *);
- char *strchrnul (const char *, int);
- char *strdup (const char *);
- char *_strdup_r (struct _reent *, const char *);
- char *strndup (const char *, size_t);
- char *_strndup_r (struct _reent *, const char *, size_t);
- # 79 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/string.h" 3
- int strerror_r (int, char *, size_t) __asm__ ("_" "__xpg_strerror_r");
- size_t strlcat (char *, const char *, size_t);
- size_t strlcpy (char *, const char *, size_t);
- int strncasecmp (const char *, const char *, size_t);
- size_t strnlen (const char *, size_t);
- char *strsep (char **, const char *);
- char *strlwr (char *);
- char *strupr (char *);
- char *strsignal (int __signo);
- char * _strerror_r (struct _reent *, int, int, int *);
- # 132 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/string.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/string.h" 1 3
- # 133 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/string.h" 2 3
- # 4 "zigzag/zigzag.c" 2
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdlib.h" 1 3
- # 10 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdlib.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/ieeefp.h" 1 3
- # 11 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdlib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 1 3 4
- # 16 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdlib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/machine/stdlib.h" 1 3
- static __inline__ long int
- random (void)
- {
- extern int rand(void);
- return rand ();
- }
- static __inline__ void
- srandom (unsigned int seed)
- {
- void srand(unsigned int seed);
- srand (seed);
- }
- # 19 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdlib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/alloca.h" 1 3
- # 21 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdlib.h" 2 3
- typedef struct
- {
- int quot;
- int rem;
- } div_t;
- typedef struct
- {
- long quot;
- long rem;
- } ldiv_t;
- typedef struct
- {
- long long int quot;
- long long int rem;
- } lldiv_t;
- # 58 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdlib.h" 3
- int __locale_mb_cur_max (void);
- void abort (void) __attribute__ ((noreturn));
- int abs (int);
- int atexit (void (*__func)(void));
- double atof (const char *__nptr);
- float atoff (const char *__nptr);
- int atoi (const char *__nptr);
- int _atoi_r (struct _reent *, const char *__nptr);
- long atol (const char *__nptr);
- long _atol_r (struct _reent *, const char *__nptr);
- void * bsearch (const void * __key, const void * __base, size_t __nmemb, size_t __size, int (* _compar) (const void *, const void *))
- ;
- void * calloc (size_t __nmemb, size_t __size) ;
- div_t div (int __numer, int __denom);
- void exit (int __status) __attribute__ ((noreturn));
- void free (void *) ;
- char * getenv (const char *__string);
- char * _getenv_r (struct _reent *, const char *__string);
- char * _findenv (const char *, int *);
- char * _findenv_r (struct _reent *, const char *, int *);
- extern char *suboptarg;
- int getsubopt (char **, char * const *, char **);
- long labs (long);
- ldiv_t ldiv (long __numer, long __denom);
- void * malloc (size_t __size) ;
- int mblen (const char *, size_t);
- int _mblen_r (struct _reent *, const char *, size_t, _mbstate_t *);
- int mbtowc (wchar_t *, const char *, size_t);
- int _mbtowc_r (struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *);
- int wctomb (char *, wchar_t);
- int _wctomb_r (struct _reent *, char *, wchar_t, _mbstate_t *);
- size_t mbstowcs (wchar_t *, const char *, size_t);
- size_t _mbstowcs_r (struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *);
- size_t wcstombs (char *, const wchar_t *, size_t);
- size_t _wcstombs_r (struct _reent *, char *, const wchar_t *, size_t, _mbstate_t *);
- char * mkdtemp (char *);
- int mkostemp (char *, int);
- int mkostemps (char *, int, int);
- int mkstemp (char *);
- int mkstemps (char *, int);
- char * mktemp (char *) __attribute__ ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead")));
- char * _mkdtemp_r (struct _reent *, char *);
- int _mkostemp_r (struct _reent *, char *, int);
- int _mkostemps_r (struct _reent *, char *, int, int);
- int _mkstemp_r (struct _reent *, char *);
- int _mkstemps_r (struct _reent *, char *, int);
- char * _mktemp_r (struct _reent *, char *) __attribute__ ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead")));
- void qsort (void * __base, size_t __nmemb, size_t __size, int(*_compar)(const void *, const void *));
- int rand (void);
- void * realloc (void * __r, size_t __size) ;
- void * reallocf (void * __r, size_t __size);
- void srand (unsigned __seed);
- double strtod (const char *__n, char **__end_PTR);
- double _strtod_r (struct _reent *,const char *__n, char **__end_PTR);
- float strtof (const char *__n, char **__end_PTR);
- long strtol (const char *__n, char **__end_PTR, int __base);
- long _strtol_r (struct _reent *,const char *__n, char **__end_PTR, int __base);
- unsigned long strtoul (const char *__n, char **__end_PTR, int __base);
- unsigned long _strtoul_r (struct _reent *,const char *__n, char **__end_PTR, int __base);
- int system (const char *__string);
- long a64l (const char *__input);
- char * l64a (long __input);
- char * _l64a_r (struct _reent *,long __input);
- int on_exit (void (*__func)(int, void *),void * __arg);
- void _Exit (int __status) __attribute__ ((noreturn));
- int putenv (char *__string);
- int _putenv_r (struct _reent *, char *__string);
- void * _reallocf_r (struct _reent *, void *, size_t);
- int setenv (const char *__string, const char *__value, int __overwrite);
- int _setenv_r (struct _reent *, const char *__string, const char *__value, int __overwrite);
- char * gcvt (double,int,char *);
- char * gcvtf (float,int,char *);
- char * fcvt (double,int,int *,int *);
- char * fcvtf (float,int,int *,int *);
- char * ecvt (double,int,int *,int *);
- char * ecvtbuf (double, int, int*, int*, char *);
- char * fcvtbuf (double, int, int*, int*, char *);
- char * ecvtf (float,int,int *,int *);
- char * dtoa (double, int, int, int *, int*, char**);
- int rand_r (unsigned *__seed);
- double drand48 (void);
- double _drand48_r (struct _reent *);
- double erand48 (unsigned short [3]);
- double _erand48_r (struct _reent *, unsigned short [3]);
- long jrand48 (unsigned short [3]);
- long _jrand48_r (struct _reent *, unsigned short [3]);
- void lcong48 (unsigned short [7]);
- void _lcong48_r (struct _reent *, unsigned short [7]);
- long lrand48 (void);
- long _lrand48_r (struct _reent *);
- long mrand48 (void);
- long _mrand48_r (struct _reent *);
- long nrand48 (unsigned short [3]);
- long _nrand48_r (struct _reent *, unsigned short [3]);
- unsigned short *
- seed48 (unsigned short [3]);
- unsigned short *
- _seed48_r (struct _reent *, unsigned short [3]);
- void srand48 (long);
- void _srand48_r (struct _reent *, long);
- long long atoll (const char *__nptr);
- long long _atoll_r (struct _reent *, const char *__nptr);
- long long llabs (long long);
- lldiv_t lldiv (long long __numer, long long __denom);
- long long strtoll (const char *__n, char **__end_PTR, int __base);
- long long _strtoll_r (struct _reent *, const char *__n, char **__end_PTR, int __base);
- unsigned long long strtoull (const char *__n, char **__end_PTR, int __base);
- unsigned long long _strtoull_r (struct _reent *, const char *__n, char **__end_PTR, int __base);
- void cfree (void *);
- int unsetenv (const char *__string);
- int _unsetenv_r (struct _reent *, const char *__string);
- # 206 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/stdlib.h" 3
- char * _dtoa_r (struct _reent *, double, int, int, int *, int*, char**);
- void * _malloc_r (struct _reent *, size_t) ;
- void * _calloc_r (struct _reent *, size_t, size_t) ;
- void _free_r (struct _reent *, void *) ;
- void * _realloc_r (struct _reent *, void *, size_t) ;
- void _mstats_r (struct _reent *, char *);
- int _system_r (struct _reent *, const char *);
- void __eprintf (const char *, const char *, unsigned int, const char *);
- extern long double strtold (const char *, char **);
- extern long double wcstold (const wchar_t *, wchar_t **);
- # 5 "zigzag/zigzag.c" 2
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/unistd.h" 1 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/unistd.h" 1 3
- # 13 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/unistd.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 1 3 4
- # 14 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/unistd.h" 2 3
- extern char **environ;
- void _exit (int __status ) __attribute__ ((noreturn));
- int access (const char *__path, int __amode );
- unsigned alarm (unsigned __secs );
- int chdir (const char *__path );
- int chmod (const char *__path, mode_t __mode );
- int chown (const char *__path, uid_t __owner, gid_t __group );
- int close (int __fildes );
- char * ctermid (char *__s );
- char * cuserid (char *__s );
- int dup (int __fildes );
- int dup2 (int __fildes, int __fildes2 );
- int execl (const char *__path, const char *, ... );
- int execle (const char *__path, const char *, ... );
- int execlp (const char *__file, const char *, ... );
- int execv (const char *__path, char * const __argv[] );
- int execve (const char *__path, char * const __argv[], char * const __envp[] );
- int execvp (const char *__file, char * const __argv[] );
- int fchmod (int __fildes, mode_t __mode );
- int fchown (int __fildes, uid_t __owner, gid_t __group );
- pid_t fork (void );
- long fpathconf (int __fd, int __name );
- int fsync (int __fd);
- int fdatasync (int __fd);
- char * getcwd (char *__buf, size_t __size );
- gid_t getegid (void );
- uid_t geteuid (void );
- gid_t getgid (void );
- int getgroups (int __gidsetsize, gid_t __grouplist[] );
- char * getlogin (void );
- char * getpass (const char *__prompt);
- int getpagesize (void);
- pid_t getpgid (pid_t);
- pid_t getpgrp (void );
- pid_t getpid (void );
- pid_t getppid (void );
- uid_t getuid (void );
- int isatty (int __fildes );
- int lchown (const char *__path, uid_t __owner, gid_t __group );
- int link (const char *__path1, const char *__path2 );
- int nice (int __nice_value );
- off_t lseek (int __fildes, off_t __offset, int __whence );
- # 133 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/unistd.h" 3
- long pathconf (const char *__path, int __name );
- int pause (void );
- int pipe (int __fildes[2] );
- ssize_t pread (int __fd, void *__buf, size_t __nbytes, off_t __offset);
- ssize_t pwrite (int __fd, const void *__buf, size_t __nbytes, off_t __offset);
- int read (int __fd, void *__buf, size_t __nbyte );
- int rmdir (const char *__path );
- void * sbrk (ptrdiff_t __incr);
- int setgid (gid_t __gid );
- int setpgid (pid_t __pid, pid_t __pgid );
- int setpgrp (void );
- pid_t setsid (void );
- int setuid (uid_t __uid );
- unsigned sleep (unsigned int __seconds );
- void swab (const void *, void *, ssize_t);
- long sysconf (int __name );
- pid_t tcgetpgrp (int __fildes );
- int tcsetpgrp (int __fildes, pid_t __pgrp_id );
- char * ttyname (int __fildes );
- int unlink (const char *__path );
- int usleep (useconds_t __useconds);
- int vhangup (void );
- int write (int __fd, const void *__buf, size_t __nbyte );
- extern char *optarg;
- extern int optind, opterr, optopt;
- int getopt(int, char * const [], const char *);
- extern int optreset;
- pid_t vfork (void );
- # 247 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/sys/unistd.h" 3
- ssize_t readlink (const char *__path, char *__buf, size_t __buflen);
- int symlink (const char *__name1, const char *__name2);
- # 5 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/unistd.h" 2 3
- # 6 "zigzag/zigzag.c" 2
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 1 3
- # 29 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_common.h" 1 3
- # 30 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_types.h" 1 3
- # 36 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_types.h" 3
- typedef enum {
- E_FALSE = 0,
- E_TRUE = 1,
- } e_bool_t;
- typedef enum {
- E_OK = 0,
- E_ERR = -1,
- E_WARN = -2,
- } e_return_stat_t;
- # 31 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_regs.h" 1 3
- # 29 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_regs.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_types.h" 1 3
- # 30 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_regs.h" 2 3
- typedef enum {
- E_CORE_GP_REG_BASE = 0xf0000,
- E_REG_R0 = E_CORE_GP_REG_BASE + 0x0000,
- E_REG_R1 = E_CORE_GP_REG_BASE + 0x0004,
- E_REG_R2 = E_CORE_GP_REG_BASE + 0x0008,
- E_REG_R3 = E_CORE_GP_REG_BASE + 0x000c,
- E_REG_R4 = E_CORE_GP_REG_BASE + 0x0010,
- E_REG_R5 = E_CORE_GP_REG_BASE + 0x0014,
- E_REG_R6 = E_CORE_GP_REG_BASE + 0x0018,
- E_REG_R7 = E_CORE_GP_REG_BASE + 0x001c,
- E_REG_R8 = E_CORE_GP_REG_BASE + 0x0020,
- E_REG_R9 = E_CORE_GP_REG_BASE + 0x0024,
- E_REG_R10 = E_CORE_GP_REG_BASE + 0x0028,
- E_REG_R11 = E_CORE_GP_REG_BASE + 0x002c,
- E_REG_R12 = E_CORE_GP_REG_BASE + 0x0030,
- E_REG_R13 = E_CORE_GP_REG_BASE + 0x0034,
- E_REG_R14 = E_CORE_GP_REG_BASE + 0x0038,
- E_REG_R15 = E_CORE_GP_REG_BASE + 0x003c,
- E_REG_R16 = E_CORE_GP_REG_BASE + 0x0040,
- E_REG_R17 = E_CORE_GP_REG_BASE + 0x0044,
- E_REG_R18 = E_CORE_GP_REG_BASE + 0x0048,
- E_REG_R19 = E_CORE_GP_REG_BASE + 0x004c,
- E_REG_R20 = E_CORE_GP_REG_BASE + 0x0050,
- E_REG_R21 = E_CORE_GP_REG_BASE + 0x0054,
- E_REG_R22 = E_CORE_GP_REG_BASE + 0x0058,
- E_REG_R23 = E_CORE_GP_REG_BASE + 0x005c,
- E_REG_R24 = E_CORE_GP_REG_BASE + 0x0060,
- E_REG_R25 = E_CORE_GP_REG_BASE + 0x0064,
- E_REG_R26 = E_CORE_GP_REG_BASE + 0x0068,
- E_REG_R27 = E_CORE_GP_REG_BASE + 0x006c,
- E_REG_R28 = E_CORE_GP_REG_BASE + 0x0070,
- E_REG_R29 = E_CORE_GP_REG_BASE + 0x0074,
- E_REG_R30 = E_CORE_GP_REG_BASE + 0x0078,
- E_REG_R31 = E_CORE_GP_REG_BASE + 0x007c,
- E_REG_R32 = E_CORE_GP_REG_BASE + 0x0080,
- E_REG_R33 = E_CORE_GP_REG_BASE + 0x0084,
- E_REG_R34 = E_CORE_GP_REG_BASE + 0x0088,
- E_REG_R35 = E_CORE_GP_REG_BASE + 0x008c,
- E_REG_R36 = E_CORE_GP_REG_BASE + 0x0090,
- E_REG_R37 = E_CORE_GP_REG_BASE + 0x0094,
- E_REG_R38 = E_CORE_GP_REG_BASE + 0x0098,
- E_REG_R39 = E_CORE_GP_REG_BASE + 0x009c,
- E_REG_R40 = E_CORE_GP_REG_BASE + 0x00a0,
- E_REG_R41 = E_CORE_GP_REG_BASE + 0x00a4,
- E_REG_R42 = E_CORE_GP_REG_BASE + 0x00a8,
- E_REG_R43 = E_CORE_GP_REG_BASE + 0x00ac,
- E_REG_R44 = E_CORE_GP_REG_BASE + 0x00b0,
- E_REG_R45 = E_CORE_GP_REG_BASE + 0x00b4,
- E_REG_R46 = E_CORE_GP_REG_BASE + 0x00b8,
- E_REG_R47 = E_CORE_GP_REG_BASE + 0x00bc,
- E_REG_R48 = E_CORE_GP_REG_BASE + 0x00c0,
- E_REG_R49 = E_CORE_GP_REG_BASE + 0x00c4,
- E_REG_R50 = E_CORE_GP_REG_BASE + 0x00c8,
- E_REG_R51 = E_CORE_GP_REG_BASE + 0x00cc,
- E_REG_R52 = E_CORE_GP_REG_BASE + 0x00d0,
- E_REG_R53 = E_CORE_GP_REG_BASE + 0x00d4,
- E_REG_R54 = E_CORE_GP_REG_BASE + 0x00d8,
- E_REG_R55 = E_CORE_GP_REG_BASE + 0x00dc,
- E_REG_R56 = E_CORE_GP_REG_BASE + 0x00e0,
- E_REG_R57 = E_CORE_GP_REG_BASE + 0x00e4,
- E_REG_R58 = E_CORE_GP_REG_BASE + 0x00e8,
- E_REG_R59 = E_CORE_GP_REG_BASE + 0x00ec,
- E_REG_R60 = E_CORE_GP_REG_BASE + 0x00f0,
- E_REG_R61 = E_CORE_GP_REG_BASE + 0x00f4,
- E_REG_R62 = E_CORE_GP_REG_BASE + 0x00f8,
- E_REG_R63 = E_CORE_GP_REG_BASE + 0x00fc,
- } e_gp_reg_id_t;
- typedef enum {
- E_CORE_SP_REG_BASE = 0xf0000,
- E_REG_CONFIG = E_CORE_SP_REG_BASE + 0x0400,
- E_REG_STATUS = E_CORE_SP_REG_BASE + 0x0404,
- E_REG_PC = E_CORE_SP_REG_BASE + 0x0408,
- E_REG_DEBUGSTATUS = E_CORE_SP_REG_BASE + 0x040c,
- E_REG_LC = E_CORE_SP_REG_BASE + 0x0414,
- E_REG_LS = E_CORE_SP_REG_BASE + 0x0418,
- E_REG_LE = E_CORE_SP_REG_BASE + 0x041c,
- E_REG_IRET = E_CORE_SP_REG_BASE + 0x0420,
- E_REG_IMASK = E_CORE_SP_REG_BASE + 0x0424,
- E_REG_ILAT = E_CORE_SP_REG_BASE + 0x0428,
- E_REG_ILATST = E_CORE_SP_REG_BASE + 0x042C,
- E_REG_ILATCL = E_CORE_SP_REG_BASE + 0x0430,
- E_REG_IPEND = E_CORE_SP_REG_BASE + 0x0434,
- E_REG_CTIMER0 = E_CORE_SP_REG_BASE + 0x0438,
- E_REG_CTIMER1 = E_CORE_SP_REG_BASE + 0x043C,
- E_REG_FSTATUS = E_CORE_SP_REG_BASE + 0x0440,
- E_REG_DEBUGCMD = E_CORE_SP_REG_BASE + 0x0448,
- E_REG_DMA0CONFIG = E_CORE_SP_REG_BASE + 0x0500,
- E_REG_DMA0STRIDE = E_CORE_SP_REG_BASE + 0x0504,
- E_REG_DMA0COUNT = E_CORE_SP_REG_BASE + 0x0508,
- E_REG_DMA0SRCADDR = E_CORE_SP_REG_BASE + 0x050C,
- E_REG_DMA0DSTADDR = E_CORE_SP_REG_BASE + 0x0510,
- E_REG_DMA0AUTODMA0 = E_CORE_SP_REG_BASE + 0x0514,
- E_REG_DMA0AUTODMA1 = E_CORE_SP_REG_BASE + 0x0518,
- E_REG_DMA0STATUS = E_CORE_SP_REG_BASE + 0x051C,
- E_REG_DMA1CONFIG = E_CORE_SP_REG_BASE + 0x0520,
- E_REG_DMA1STRIDE = E_CORE_SP_REG_BASE + 0x0524,
- E_REG_DMA1COUNT = E_CORE_SP_REG_BASE + 0x0528,
- E_REG_DMA1SRCADDR = E_CORE_SP_REG_BASE + 0x052C,
- E_REG_DMA1DSTADDR = E_CORE_SP_REG_BASE + 0x0530,
- E_REG_DMA1AUTODMA0 = E_CORE_SP_REG_BASE + 0x0534,
- E_REG_DMA1AUTODMA1 = E_CORE_SP_REG_BASE + 0x0538,
- E_REG_DMA1STATUS = E_CORE_SP_REG_BASE + 0x053C,
- E_REG_MEMSTATUS = E_CORE_SP_REG_BASE + 0x0604,
- E_REG_MEMPROTECT = E_CORE_SP_REG_BASE + 0x0608,
- E_REG_MESHCFG = E_CORE_SP_REG_BASE + 0x0700,
- E_REG_COREID = E_CORE_SP_REG_BASE + 0x0704,
- E_REG_CORE_RESET = E_CORE_SP_REG_BASE + 0x070c,
- } e_core_reg_id_t;
- typedef enum {
- E_CHIP_REG_BASE = 0xf0000,
- E_REG_IO_LINK_MODE_CFG = E_CHIP_REG_BASE + 0x0300,
- E_REG_IO_LINK_TX_CFG = E_CHIP_REG_BASE + 0x0304,
- E_REG_IO_LINK_RX_CFG = E_CHIP_REG_BASE + 0x0308,
- E_REG_IO_GPIO_CFG = E_CHIP_REG_BASE + 0x030c,
- E_REG_IO_FLAG_CFG = E_CHIP_REG_BASE + 0x0318,
- E_REG_IO_SYNC_CFG = E_CHIP_REG_BASE + 0x031c,
- E_REG_IO_HALT_CFG = E_CHIP_REG_BASE + 0x0320,
- E_REG_IO_RESET = E_CHIP_REG_BASE + 0x0324,
- E_REG_IO_LINK_DEBUG = E_CHIP_REG_BASE + 0x0328,
- } e_chip_reg_id_t;
- unsigned e_reg_read(e_core_reg_id_t reg_id);
- void e_reg_write(e_core_reg_id_t reg_id, unsigned val);
- # 32 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_dma.h" 1 3
- # 29 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_dma.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/lib/gcc/epiphany-elf/4.8.2/include/stddef.h" 1 3 4
- # 30 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_dma.h" 2 3
- typedef enum
- {
- E_DMA_ENABLE = (1<<0),
- E_DMA_MASTER = (1<<1),
- E_DMA_CHAIN = (1<<2),
- E_DMA_STARTUP = (1<<3),
- E_DMA_IRQEN = (1<<4),
- E_DMA_BYTE = (0<<5),
- E_DMA_HWORD = (1<<5),
- E_DMA_WORD = (2<<5),
- E_DMA_DWORD = (3<<5),
- E_DMA_MSGMODE = (1<<10),
- E_DMA_SHIFT_SRC_IN = (1<<12),
- E_DMA_SHIFT_DST_IN = (1<<13),
- E_DMA_SHIFT_SRC_OUT = (1<<14),
- E_DMA_SHIFT_DST_OUT = (1<<15),
- } e_dma_config_t;
- typedef enum
- {
- E_DMA_0 = 0,
- E_DMA_1 = 1,
- } e_dma_id_t;
- typedef struct
- {
- unsigned config;
- unsigned inner_stride;
- unsigned count;
- unsigned outer_stride;
- void *src_addr;
- void *dst_addr;
- } __attribute__ ((aligned (8))) e_dma_desc_t;
- int e_dma_start(e_dma_desc_t *descriptor, e_dma_id_t chan);
- int e_dma_busy(e_dma_id_t chan);
- void e_dma_wait(e_dma_id_t chan);
- int e_dma_copy(void *dst, void *src, size_t n);
- void e_dma_set_desc(e_dma_id_t chan,
- unsigned config, e_dma_desc_t *next_desc,
- unsigned strd_i_src, unsigned strd_i_dst,
- unsigned count_i, unsigned count_o,
- unsigned strd_o_src, unsigned strd_o_dst,
- void *addr_src, void *addr_dst,
- e_dma_desc_t *desc);
- # 33 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_ctimers.h" 1 3
- # 42 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_ctimers.h" 3
- typedef enum
- {
- E_CTIMER_0 = 0,
- E_CTIMER_1 = 1
- } e_ctimer_id_t;
- typedef enum
- {
- E_CTIMER_OFF = 0x0,
- E_CTIMER_CLK = 0x1,
- E_CTIMER_IDLE = 0x2,
- E_CTIMER_IALU_INST = 0x4,
- E_CTIMER_FPU_INST = 0x5,
- E_CTIMER_DUAL_INST = 0x6,
- E_CTIMER_E1_STALLS = 0x7,
- E_CTIMER_RA_STALLS = 0x8,
- E_CTIMER_EXT_FETCH_STALLS = 0xc,
- E_CTIMER_EXT_LOAD_STALLS = 0xd,
- } e_ctimer_config_t;
- unsigned e_ctimer_get(e_ctimer_id_t timer);
- unsigned e_ctimer_set(e_ctimer_id_t timer, unsigned int val);
- unsigned e_ctimer_start(e_ctimer_id_t timer, e_ctimer_config_t config);
- unsigned e_ctimer_stop(e_ctimer_id_t timer);
- void e_wait(e_ctimer_id_t timer, unsigned int clicks);
- # 34 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_ic.h" 1 3
- # 31 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_ic.h" 3
- typedef void (*sighandler_t)(int);
- typedef enum {
- E_SYNC = 0,
- E_SW_EXCEPTION = 1,
- E_MEM_FAULT = 2,
- E_TIMER0_INT = 3,
- E_TIMER1_INT = 4,
- E_MESSAGE_INT = 5,
- E_DMA0_INT = 6,
- E_DMA1_INT = 7,
- E_USER_INT = 9,
- } e_irq_type_t;
- void e_irq_attach(e_irq_type_t irq, sighandler_t handler);
- void e_irq_set(unsigned row, unsigned col, e_irq_type_t irq);
- void e_irq_clear(unsigned row, unsigned col, e_irq_type_t irq);
- void e_irq_global_mask(e_bool_t state);
- void e_irq_mask(e_irq_type_t irq, e_bool_t state);
- # 35 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_mem.h" 1 3
- # 30 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_mem.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_common.h" 1 3
- # 31 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_mem.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_coreid.h" 1 3
- # 32 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_coreid.h" 3
- typedef unsigned int e_coreid_t;
- typedef enum
- {
- E_GROUP_WRAP = 0,
- E_ROW_WRAP = 1,
- E_COL_WRAP = 2,
- E_PREV_CORE = 0,
- E_NEXT_CORE = 1,
- } e_coreid_wrap_t;
- typedef enum {
- E_NULL = 0,
- E_EPI_PLATFORM = 1,
- E_EPI_CHIP = 2,
- E_EPI_GROUP = 3,
- E_EPI_CORE = 4,
- E_EXT_MEM = 5,
- E_MAPPING = 6,
- E_SHARED_MEM = 7
- } e_objtype_t;
- typedef enum {
- E_E16G301 = 0,
- E_E64G401 = 1,
- } e_chiptype_t;
- typedef struct {
- e_objtype_t objtype;
- e_chiptype_t chiptype;
- e_coreid_t group_id;
- unsigned group_row;
- unsigned group_col;
- unsigned group_rows;
- unsigned group_cols;
- unsigned core_row;
- unsigned core_col;
- unsigned alignment_padding;
- } e_group_config_t;
- typedef struct {
- e_objtype_t objtype;
- unsigned base;
- } e_emem_config_t;
- extern const e_group_config_t e_group_config;
- extern const e_emem_config_t e_emem_config;
- e_coreid_t e_get_coreid(void);
- void *e_get_global_address(unsigned row, unsigned col, const void *ptr);
- e_coreid_t e_coreid_from_coords(unsigned row, unsigned col);
- void e_coords_from_coreid(e_coreid_t coreid, unsigned *row, unsigned *col);
- e_bool_t e_is_on_core(const void *ptr);
- void e_neighbor_id(e_coreid_wrap_t dir, e_coreid_wrap_t wrap, unsigned *row, unsigned *col);
- # 32 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_mem.h" 2 3
- typedef enum {
- E_RD = 1,
- E_WR = 2,
- E_RDWR = 3,
- } e_memtype_t;
- typedef struct {
- e_objtype_t objtype;
- off_t phy_base;
- off_t ephy_base;
- size_t size;
- e_memtype_t type;
- } e_memseg_t;
- void *e_read(const void *remote, void *dst, unsigned row, unsigned col, const void *src, size_t n);
- void *e_write(const void *remote, const void *src, unsigned row, unsigned col, void *dst, size_t n);
- # 36 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_mutex.h" 1 3
- # 31 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_mutex.h" 3
- typedef char e_barrier_t;
- typedef int e_mutex_t;
- typedef int e_mutexattr_t;
- void e_mutex_init(unsigned row, unsigned col, e_mutex_t *mutex, e_mutexattr_t *attr);
- void e_mutex_lock(unsigned row, unsigned col, e_mutex_t *mutex);
- unsigned e_mutex_trylock(unsigned row, unsigned col, e_mutex_t *mutex);
- void e_mutex_unlock(unsigned row, unsigned col, e_mutex_t *mutex);
- void e_barrier_init(volatile e_barrier_t bar_array[], e_barrier_t *tgt_bar_array[]);
- void e_barrier(volatile e_barrier_t *bar_array, e_barrier_t *tgt_bar_array[]);
- # 37 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_coreid.h" 1 3
- # 38 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 2 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_shm.h" 1 3
- # 33 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_shm.h" 3
- # 1 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_mem.h" 1 3
- # 34 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_shm.h" 2 3
- #pragma pack(push, 1)
- # 51 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_shm.h" 3
- typedef struct __attribute__ ((aligned (8))) e_shmseg {
- void *addr;
- char name[256];
- size_t size;
- void *paddr;
- off_t offset;
- } e_shmseg_t;
- typedef struct __attribute__ ((aligned (8))) e_shmseg_pvt {
- e_shmseg_t shm_seg;
- unsigned refcnt;
- unsigned valid;
- } e_shmseg_pvt_t;
- typedef struct __attribute__ ((aligned (8))) e_shmtable {
- unsigned int magic;
- unsigned int initialized;
- e_shmseg_pvt_t regions[64];
- unsigned int free_space;
- off_t next_free_offset;
- unsigned long paddr_epi;
- unsigned long paddr_cpu;
- char *heap;
- void *lock;
- } e_shmtable_t;
- #pragma pack(pop)
- int e_shm_attach(e_memseg_t *mem, const char* name);
- int e_shm_release(const char* name);
- # 39 "/opt/adapteva/esdk.2014.11-rc1/tools/e-gnu.armv7l/epiphany-elf/include/e_lib.h" 2 3
- # 8 "zigzag/zigzag.c" 2
- # 36 "zigzag/zigzag.c"
- uint16_t _msg_box[32*24 +1];
- void interrupt_handler() __attribute__ ((interrupt ("message")));
- void pass_message();
- void print_route();
- void __attribute__ ((aligned(8))) __attribute__ ((noinline)) e_idle()
- {
- asm("gie");
- asm("idle");
- }
- int main()
- {
- int i;
- e_irq_global_mask(E_TRUE);
- e_irq_mask(E_MESSAGE_INT, E_FALSE);
- e_irq_attach(E_MESSAGE_INT, interrupt_handler);
- if (e_get_coreid() == 0x808)
- {
- for (i=0; i < 1000000; ++i) ;
- pass_message();
- }
- e_irq_global_mask(E_FALSE);
- asm("idle");
- return 0;
- }
- void interrupt_handler()
- {
- if (e_get_coreid() == 0x808)
- {
- print_route();
- exit(3);
- }
- else
- {
- pass_message();
- _exit(2);
- }
- }
- e_coreid_t next_hop()
- {
- enum direction_t { LEFT, RIGHT } direction;
- e_coreid_t coreid;
- unsigned row, col, rel_row, rel_col;
- coreid = e_get_coreid();
- row = ((coreid) >> 6);
- col = ((coreid) & ((1<<6)-1));
- rel_row = row - ((0x808) >> 6);
- rel_col = col - ((0x808) & ((1<<6)-1));
- direction = (rel_row & 1) ? LEFT : RIGHT;
- if (coreid == 0x808)
- {
- if (rel_col < 24 -1)
- return (((row) << 6) | (col+1));
- else
- return (((row+1) << 6) | (col));
- }
- if (!rel_col)
- {
- if (rel_row == 1)
- return 0x808;
- else
- return (((row-1) << 6) | (col));
- }
- switch (direction)
- {
- case LEFT:
- if (rel_col == 1 && rel_row != 32 -1)
- return (((row+1) << 6) | (col));
- else
- return (((row) << 6) | (col-1));
- case RIGHT:
- if (rel_row == 32 -1 && rel_col == 24 -1)
- return (((row) << 6) | (((0x808) & ((1<<6)-1))));
- else if (rel_col == 24 -1)
- return (((row+1) << 6) | (col));
- else
- return (((row) << 6) | (col+1));
- }
- return 0x808;
- }
- void pass_message()
- {
- e_coreid_t next;
- uint16_t n;
- uint16_t *next_msgbox;
- uint16_t *msgbox = (uint16_t *) _msg_box;
- if (e_get_coreid() == 0x808)
- {
- *msgbox = 0;
- }
- msgbox[0]++;
- n = msgbox[0];
- msgbox[n] = (uint16_t) (((unsigned) e_get_coreid()) & 0xffff);
- next = next_hop();
- next_msgbox = (uint16_t *)
- e_get_global_address(((next) >> 6), ((next) & ((1<<6)-1)), (void *) _msg_box);
- memcpy((void *) next_msgbox, (void *) msgbox, (n+1)*sizeof(msgbox[0]));
- printf("Passing message to 0x%x (%p)\n", next, next_msgbox);
- e_irq_set(((next) >> 6), ((next) & ((1<<6)-1)), E_MESSAGE_INT);
- }
- inline void print_path(uint16_t path[32][24], uint16_t row, uint16_t col)
- {
- signed north, east, south, west;
- uint16_t next, prev;
- north = row == 0 ? -2 : path[row-1][col ];
- west = col == 0 ? -2 : path[row ][col-1];
- south = row == 32 -1 ? -2 : path[row+1][col ];
- east = col == 24 -1 ? -2 : path[row ][col+1];
- next = path[row][col] + 1;
- prev = path[row][col] - 1;
- if (!prev)
- fputs("○", (_impure_ptr->_stdout));
- else if (north == next)
- if (south == prev) fputs("|", (_impure_ptr->_stdout)); else fputs("▲", (_impure_ptr->_stdout));
- else if (south == next)
- if (north == prev) fputs("|", (_impure_ptr->_stdout)); else fputs("▼", (_impure_ptr->_stdout));
- else if (west == next)
- if (east == prev) fputs("—", (_impure_ptr->_stdout)); else fputs("◀", (_impure_ptr->_stdout));
- else if (east == next)
- if (west == prev) fputs("—", (_impure_ptr->_stdout)); else fputs("▶", (_impure_ptr->_stdout));
- else
- fputs("⚫", (_impure_ptr->_stdout));
- }
- void print_route()
- {
- int i,j;
- e_coreid_t core;
- unsigned row, col;
- uint16_t path[32][24];
- uint16_t *msgbox = (uint16_t *) _msg_box;
- printf("Got %d messages\n", msgbox[0]);
- printf("Message path:\n");
- for (i=0; i < msgbox[0]; i++)
- {
- core = msgbox[i+1];
- if (core)
- {
- row = ((core) >> 6) - ((0x808) >> 6);
- col = ((core) & ((1<<6)-1)) - ((0x808) & ((1<<6)-1));
- path[row][col] = i+1;
- }
- }
- for (i=0; i < 32; i++)
- {
- for (j=0; j < 24; j++)
- {
- if (path[i][j])
- print_path(path, i, j);
- else
- fputs("⨯", (_impure_ptr->_stdout));
- }
- fputs("\n", (_impure_ptr->_stdout));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement