Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 702973 Details for
Bug 915830
gcc ICE: output_operand: invalid shift operand
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Preprocessed iwmxxt.c
ccdBhcMp.out (text/plain), 207.11 KB, created by
Brendan Conoboy
on 2013-02-26 15:27:50 UTC
(
hide
)
Description:
Preprocessed iwmxxt.c
Filename:
MIME Type:
Creator:
Brendan Conoboy
Created:
2013-02-26 15:27:50 UTC
Size:
207.11 KB
patch
obsolete
>// /usr/libexec/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/cc1 -fpreprocessed /tmp/ccache/tmp/iwmmxt.tmp.ts.28966.i -quiet -dumpbase iwmmxt.tmp.ts.28966.i -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -mtune=cortex-a8 -mabi=aapcs-linux -mtls-dialect=gnu -auxbase-strip /tmp/ccache/d/f/b95f0ee058fb5fa0a62c160e2d6520-211785.o.tmp.ts.28966 -g -O2 -Wall -fexceptions -fstack-protector --param ssp-buffer-size=4 -o - -frandom-seed=0 ># 1 "iwmmxt.c" ># 1 "/builddir/build/BUILD/crash-6.1.4/gdb-7.3.1/sim/arm//" ># 1 "<command-line>" ># 1 "/usr/include/stdc-predef.h" 1 3 4 ># 1 "<command-line>" 2 ># 1 "iwmmxt.c" ># 19 "iwmmxt.c" ># 1 "/usr/include/string.h" 1 3 4 ># 25 "/usr/include/string.h" 3 4 ># 1 "/usr/include/features.h" 1 3 4 ># 375 "/usr/include/features.h" 3 4 ># 1 "/usr/include/sys/cdefs.h" 1 3 4 ># 385 "/usr/include/sys/cdefs.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 386 "/usr/include/sys/cdefs.h" 2 3 4 ># 376 "/usr/include/features.h" 2 3 4 ># 399 "/usr/include/features.h" 3 4 ># 1 "/usr/include/gnu/stubs.h" 1 3 4 ># 10 "/usr/include/gnu/stubs.h" 3 4 ># 1 "/usr/include/gnu/stubs-hard.h" 1 3 4 ># 11 "/usr/include/gnu/stubs.h" 2 3 4 ># 400 "/usr/include/features.h" 2 3 4 ># 26 "/usr/include/string.h" 2 3 4 > > > > > > ># 1 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stddef.h" 1 3 4 ># 212 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stddef.h" 3 4 >typedef unsigned int size_t; ># 33 "/usr/include/string.h" 2 3 4 ># 42 "/usr/include/string.h" 3 4 >extern void *memcpy (void *__restrict __dest, const void *__restrict __src, > size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern void *memmove (void *__dest, const void *__src, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern void *memccpy (void *__restrict __dest, const void *__restrict __src, > int __c, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > >extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern int memcmp (const void *__s1, const void *__s2, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 92 "/usr/include/string.h" 3 4 >extern void *memchr (const void *__s, int __c, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); ># 123 "/usr/include/string.h" 3 4 > > >extern char *strcpy (char *__restrict __dest, const char *__restrict __src) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > >extern char *strncpy (char *__restrict __dest, > const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern char *strcat (char *__restrict __dest, const char *__restrict __src) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > >extern char *strncat (char *__restrict __dest, const char *__restrict __src, > size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strcmp (const char *__s1, const char *__s2) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > >extern int strncmp (const char *__s1, const char *__s2, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strcoll (const char *__s1, const char *__s2) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > >extern size_t strxfrm (char *__restrict __dest, > const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > > > > > > ># 1 "/usr/include/xlocale.h" 1 3 4 ># 27 "/usr/include/xlocale.h" 3 4 >typedef struct __locale_struct >{ > > struct __locale_data *__locales[13]; > > > const unsigned short int *__ctype_b; > const int *__ctype_tolower; > const int *__ctype_toupper; > > > const char *__names[13]; >} *__locale_t; > > >typedef __locale_t locale_t; ># 160 "/usr/include/string.h" 2 3 4 > > >extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); > >extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, > __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); > > > > > >extern char *strdup (const char *__s) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern char *strndup (const char *__string, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); ># 207 "/usr/include/string.h" 3 4 ># 232 "/usr/include/string.h" 3 4 >extern char *strchr (const char *__s, int __c) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); ># 259 "/usr/include/string.h" 3 4 >extern char *strrchr (const char *__s, int __c) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); ># 278 "/usr/include/string.h" 3 4 > > > >extern size_t strcspn (const char *__s, const char *__reject) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern size_t strspn (const char *__s, const char *__accept) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 311 "/usr/include/string.h" 3 4 >extern char *strpbrk (const char *__s, const char *__accept) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 338 "/usr/include/string.h" 3 4 >extern char *strstr (const char *__haystack, const char *__needle) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern char *strtok (char *__restrict __s, const char *__restrict __delim) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > > > > >extern char *__strtok_r (char *__restrict __s, > const char *__restrict __delim, > char **__restrict __save_ptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); > >extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, > char **__restrict __save_ptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); ># 393 "/usr/include/string.h" 3 4 > > >extern size_t strlen (const char *__s) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern size_t strnlen (const char *__string, size_t __maxlen) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__)); ># 423 "/usr/include/string.h" 3 4 >extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ , __leaf__)) > > __attribute__ ((__nonnull__ (2))); ># 441 "/usr/include/string.h" 3 4 >extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > >extern void bcopy (const void *__src, void *__dest, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern int bcmp (const void *__s1, const void *__s2, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 485 "/usr/include/string.h" 3 4 >extern char *index (const char *__s, int __c) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); ># 513 "/usr/include/string.h" 3 4 >extern char *rindex (const char *__s, int __c) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); > > > > >extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); ># 532 "/usr/include/string.h" 3 4 >extern int strcasecmp (const char *__s1, const char *__s2) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); ># 555 "/usr/include/string.h" 3 4 >extern char *strsep (char **__restrict __stringp, > const char *__restrict __delim) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > > >extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); > > >extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); >extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > >extern char *__stpncpy (char *__restrict __dest, > const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); >extern char *stpncpy (char *__restrict __dest, > const char *__restrict __src, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); ># 630 "/usr/include/string.h" 3 4 ># 1 "/usr/include/bits/string.h" 1 3 4 ># 631 "/usr/include/string.h" 2 3 4 > > ># 1 "/usr/include/bits/string2.h" 1 3 4 ># 79 "/usr/include/bits/string2.h" 3 4 >typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2; >typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3; >typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4; >typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5; >typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6; >typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7; >typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8; ># 393 "/usr/include/bits/string2.h" 3 4 >extern void *__rawmemchr (const void *__s, int __c); ># 968 "/usr/include/bits/string2.h" 3 4 >extern __inline size_t __strcspn_c1 (const char *__s, int __reject); >extern __inline size_t >__strcspn_c1 (const char *__s, int __reject) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject) > ++__result; > return __result; >} > >extern __inline size_t __strcspn_c2 (const char *__s, int __reject1, > int __reject2); >extern __inline size_t >__strcspn_c2 (const char *__s, int __reject1, int __reject2) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject1 > && __s[__result] != __reject2) > ++__result; > return __result; >} > >extern __inline size_t __strcspn_c3 (const char *__s, int __reject1, > int __reject2, int __reject3); >extern __inline size_t >__strcspn_c3 (const char *__s, int __reject1, int __reject2, > int __reject3) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject1 > && __s[__result] != __reject2 && __s[__result] != __reject3) > ++__result; > return __result; >} ># 1044 "/usr/include/bits/string2.h" 3 4 >extern __inline size_t __strspn_c1 (const char *__s, int __accept); >extern __inline size_t >__strspn_c1 (const char *__s, int __accept) >{ > register size_t __result = 0; > > while (__s[__result] == __accept) > ++__result; > return __result; >} > >extern __inline size_t __strspn_c2 (const char *__s, int __accept1, > int __accept2); >extern __inline size_t >__strspn_c2 (const char *__s, int __accept1, int __accept2) >{ > register size_t __result = 0; > > while (__s[__result] == __accept1 || __s[__result] == __accept2) > ++__result; > return __result; >} > >extern __inline size_t __strspn_c3 (const char *__s, int __accept1, > int __accept2, int __accept3); >extern __inline size_t >__strspn_c3 (const char *__s, int __accept1, int __accept2, int __accept3) >{ > register size_t __result = 0; > > while (__s[__result] == __accept1 || __s[__result] == __accept2 > || __s[__result] == __accept3) > ++__result; > return __result; >} ># 1120 "/usr/include/bits/string2.h" 3 4 >extern __inline char *__strpbrk_c2 (const char *__s, int __accept1, > int __accept2); >extern __inline char * >__strpbrk_c2 (const char *__s, int __accept1, int __accept2) >{ > > while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) > ++__s; > return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; >} > >extern __inline char *__strpbrk_c3 (const char *__s, int __accept1, > int __accept2, int __accept3); >extern __inline char * >__strpbrk_c3 (const char *__s, int __accept1, int __accept2, int __accept3) >{ > > while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 > && *__s != __accept3) > ++__s; > return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; >} ># 1170 "/usr/include/bits/string2.h" 3 4 >extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); >extern __inline char * >__strtok_r_1c (char *__s, char __sep, char **__nextp) >{ > char *__result; > if (__s == ((void *)0)) > __s = *__nextp; > while (*__s == __sep) > ++__s; > __result = ((void *)0); > if (*__s != '\0') > { > __result = __s++; > while (*__s != '\0') > if (*__s++ == __sep) > { > __s[-1] = '\0'; > break; > } > } > *__nextp = __s; > return __result; >} ># 1202 "/usr/include/bits/string2.h" 3 4 >extern char *__strsep_g (char **__stringp, const char *__delim); ># 1220 "/usr/include/bits/string2.h" 3 4 >extern __inline char *__strsep_1c (char **__s, char __reject); >extern __inline char * >__strsep_1c (char **__s, char __reject) >{ > register char *__retval = *__s; > if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) > *(*__s)++ = '\0'; > return __retval; >} > >extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); >extern __inline char * >__strsep_2c (char **__s, char __reject1, char __reject2) >{ > register char *__retval = *__s; > if (__retval != ((void *)0)) > { > register char *__cp = __retval; > while (1) > { > if (*__cp == '\0') > { > __cp = ((void *)0); > break; > } > if (*__cp == __reject1 || *__cp == __reject2) > { > *__cp++ = '\0'; > break; > } > ++__cp; > } > *__s = __cp; > } > return __retval; >} > >extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, > char __reject3); >extern __inline char * >__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) >{ > register char *__retval = *__s; > if (__retval != ((void *)0)) > { > register char *__cp = __retval; > while (1) > { > if (*__cp == '\0') > { > __cp = ((void *)0); > break; > } > if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) > { > *__cp++ = '\0'; > break; > } > ++__cp; > } > *__s = __cp; > } > return __retval; >} ># 1296 "/usr/include/bits/string2.h" 3 4 ># 1 "/usr/include/stdlib.h" 1 3 4 ># 32 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stddef.h" 1 3 4 ># 33 "/usr/include/stdlib.h" 2 3 4 ># 463 "/usr/include/stdlib.h" 3 4 > > >extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); > >extern void *calloc (size_t __nmemb, size_t __size) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); ># 964 "/usr/include/stdlib.h" 3 4 ># 1297 "/usr/include/bits/string2.h" 2 3 4 > > > > >extern char *__strdup (const char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)); ># 1320 "/usr/include/bits/string2.h" 3 4 >extern char *__strndup (const char *__string, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)); ># 634 "/usr/include/string.h" 2 3 4 > > > > ># 1 "/usr/include/bits/string3.h" 1 3 4 ># 22 "/usr/include/bits/string3.h" 3 4 >extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) > ; ># 47 "/usr/include/bits/string3.h" 3 4 >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * >__attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) > >{ > return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * >__attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len) >{ > return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); >} ># 75 "/usr/include/bits/string3.h" 3 4 >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * >__attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len) >{ > if (__builtin_constant_p (__len) && __len == 0 > && (!__builtin_constant_p (__ch) || __ch != 0)) > { > __warn_memset_zero_len (); > return __dest; > } > return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); >} > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void >__attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len) >{ > (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void >__attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len) >{ > (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); >} > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * >__attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src) >{ > return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); >} ># 116 "/usr/include/bits/string3.h" 3 4 >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * >__attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len) > >{ > return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); >} > > >extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n, > size_t __destlen) __attribute__ ((__nothrow__ , __leaf__)); >extern char *__stpncpy_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__ , __leaf__)) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * >__attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n) >{ > if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 > && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) > return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); > return __stpncpy_alias (__dest, __src, __n); >} > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * >__attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src) >{ > return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); >} > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * >__attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len) > >{ > return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); >} ># 639 "/usr/include/string.h" 2 3 4 ># 20 "iwmmxt.c" 2 > ># 1 "armdefs.h" 1 ># 18 "armdefs.h" ># 1 "config.h" 1 ># 19 "armdefs.h" 2 ># 1 "/usr/include/stdio.h" 1 3 4 ># 29 "/usr/include/stdio.h" 3 4 > > > > ># 1 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stddef.h" 1 3 4 ># 34 "/usr/include/stdio.h" 2 3 4 > ># 1 "/usr/include/bits/types.h" 1 3 4 ># 27 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 28 "/usr/include/bits/types.h" 2 3 4 > > >typedef unsigned char __u_char; >typedef unsigned short int __u_short; >typedef unsigned int __u_int; >typedef unsigned long int __u_long; > > >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef signed short int __int16_t; >typedef unsigned short int __uint16_t; >typedef signed int __int32_t; >typedef unsigned int __uint32_t; > > > > >__extension__ typedef signed long long int __int64_t; >__extension__ typedef unsigned long long int __uint64_t; > > > > > > > >__extension__ typedef long long int __quad_t; >__extension__ typedef unsigned long long int __u_quad_t; ># 130 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/typesizes.h" 1 3 4 ># 131 "/usr/include/bits/types.h" 2 3 4 > > >__extension__ typedef __u_quad_t __dev_t; >__extension__ typedef unsigned int __uid_t; >__extension__ typedef unsigned int __gid_t; >__extension__ typedef unsigned long int __ino_t; >__extension__ typedef __u_quad_t __ino64_t; >__extension__ typedef unsigned int __mode_t; >__extension__ typedef unsigned int __nlink_t; >__extension__ typedef long int __off_t; >__extension__ typedef __quad_t __off64_t; >__extension__ typedef int __pid_t; >__extension__ typedef struct { int __val[2]; } __fsid_t; >__extension__ typedef long int __clock_t; >__extension__ typedef unsigned long int __rlim_t; >__extension__ typedef __u_quad_t __rlim64_t; >__extension__ typedef unsigned int __id_t; >__extension__ typedef long int __time_t; >__extension__ typedef unsigned int __useconds_t; >__extension__ typedef long int __suseconds_t; > >__extension__ typedef int __daddr_t; >__extension__ typedef int __key_t; > > >__extension__ typedef int __clockid_t; > > >__extension__ typedef void * __timer_t; > > >__extension__ typedef long int __blksize_t; > > > > >__extension__ typedef long int __blkcnt_t; >__extension__ typedef __quad_t __blkcnt64_t; > > >__extension__ typedef unsigned long int __fsblkcnt_t; >__extension__ typedef __u_quad_t __fsblkcnt64_t; > > >__extension__ typedef unsigned long int __fsfilcnt_t; >__extension__ typedef __u_quad_t __fsfilcnt64_t; > > >__extension__ typedef int __fsword_t; > >__extension__ typedef int __ssize_t; > > >__extension__ typedef long int __syscall_slong_t; > >__extension__ typedef unsigned long int __syscall_ulong_t; > > > >typedef __off64_t __loff_t; >typedef __quad_t *__qaddr_t; >typedef char *__caddr_t; > > >__extension__ typedef int __intptr_t; > > >__extension__ typedef unsigned int __socklen_t; ># 36 "/usr/include/stdio.h" 2 3 4 ># 44 "/usr/include/stdio.h" 3 4 >struct _IO_FILE; > > > >typedef struct _IO_FILE FILE; ># 64 "/usr/include/stdio.h" 3 4 >typedef struct _IO_FILE __FILE; ># 74 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/libio.h" 1 3 4 ># 32 "/usr/include/libio.h" 3 4 ># 1 "/usr/include/_G_config.h" 1 3 4 ># 15 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stddef.h" 1 3 4 ># 16 "/usr/include/_G_config.h" 2 3 4 > > > > ># 1 "/usr/include/wchar.h" 1 3 4 ># 82 "/usr/include/wchar.h" 3 4 >typedef struct >{ > int __count; > union > { > > unsigned int __wch; > > > > char __wchb[4]; > } __value; >} __mbstate_t; ># 21 "/usr/include/_G_config.h" 2 3 4 >typedef struct >{ > __off_t __pos; > __mbstate_t __state; >} _G_fpos_t; >typedef struct >{ > __off64_t __pos; > __mbstate_t __state; >} _G_fpos64_t; ># 33 "/usr/include/libio.h" 2 3 4 ># 50 "/usr/include/libio.h" 3 4 ># 1 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stdarg.h" 1 3 4 ># 40 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stdarg.h" 3 4 >typedef __builtin_va_list __gnuc_va_list; ># 51 "/usr/include/libio.h" 2 3 4 ># 145 "/usr/include/libio.h" 3 4 >struct _IO_jump_t; struct _IO_FILE; ># 155 "/usr/include/libio.h" 3 4 >typedef void _IO_lock_t; > > > > > >struct _IO_marker { > struct _IO_marker *_next; > struct _IO_FILE *_sbuf; > > > > int _pos; ># 178 "/usr/include/libio.h" 3 4 >}; > > >enum __codecvt_result >{ > __codecvt_ok, > __codecvt_partial, > __codecvt_error, > __codecvt_noconv >}; ># 246 "/usr/include/libio.h" 3 4 >struct _IO_FILE { > int _flags; > > > > > char* _IO_read_ptr; > char* _IO_read_end; > char* _IO_read_base; > char* _IO_write_base; > char* _IO_write_ptr; > char* _IO_write_end; > char* _IO_buf_base; > char* _IO_buf_end; > > char *_IO_save_base; > char *_IO_backup_base; > char *_IO_save_end; > > struct _IO_marker *_markers; > > struct _IO_FILE *_chain; > > int _fileno; > > > > int _flags2; > > __off_t _old_offset; > > > > unsigned short _cur_column; > signed char _vtable_offset; > char _shortbuf[1]; > > > > _IO_lock_t *_lock; ># 294 "/usr/include/libio.h" 3 4 > __off64_t _offset; ># 303 "/usr/include/libio.h" 3 4 > void *__pad1; > void *__pad2; > void *__pad3; > void *__pad4; > size_t __pad5; > > int _mode; > > char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; > >}; > > >typedef struct _IO_FILE _IO_FILE; > > >struct _IO_FILE_plus; > >extern struct _IO_FILE_plus _IO_2_1_stdin_; >extern struct _IO_FILE_plus _IO_2_1_stdout_; >extern struct _IO_FILE_plus _IO_2_1_stderr_; ># 339 "/usr/include/libio.h" 3 4 >typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); > > > > > > > >typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf, > size_t __n); > > > > > > > >typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); > > >typedef int __io_close_fn (void *__cookie); ># 391 "/usr/include/libio.h" 3 4 >extern int __underflow (_IO_FILE *); >extern int __uflow (_IO_FILE *); >extern int __overflow (_IO_FILE *, int); ># 435 "/usr/include/libio.h" 3 4 >extern int _IO_getc (_IO_FILE *__fp); >extern int _IO_putc (int __c, _IO_FILE *__fp); >extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); >extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); > >extern int _IO_peekc_locked (_IO_FILE *__fp); > > > > > >extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); >extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); >extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); ># 465 "/usr/include/libio.h" 3 4 >extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, > __gnuc_va_list, int *__restrict); >extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, > __gnuc_va_list); >extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); >extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); > >extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); >extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); > >extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); ># 75 "/usr/include/stdio.h" 2 3 4 > > > > >typedef __gnuc_va_list va_list; ># 90 "/usr/include/stdio.h" 3 4 >typedef __off_t off_t; ># 102 "/usr/include/stdio.h" 3 4 >typedef __ssize_t ssize_t; > > > > > > > >typedef _G_fpos_t fpos_t; ># 164 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 165 "/usr/include/stdio.h" 2 3 4 > > > >extern struct _IO_FILE *stdin; >extern struct _IO_FILE *stdout; >extern struct _IO_FILE *stderr; > > > > > > > >extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)); > >extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int renameat (int __oldfd, const char *__old, int __newfd, > const char *__new) __attribute__ ((__nothrow__ , __leaf__)); ># 195 "/usr/include/stdio.h" 3 4 >extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); ># 209 "/usr/include/stdio.h" 3 4 >extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > >extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 227 "/usr/include/stdio.h" 3 4 >extern char *tempnam (const char *__dir, const char *__pfx) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); ># 237 "/usr/include/stdio.h" 3 4 >extern int fclose (FILE *__stream); > > > > >extern int fflush (FILE *__stream); ># 252 "/usr/include/stdio.h" 3 4 >extern int fflush_unlocked (FILE *__stream); ># 266 "/usr/include/stdio.h" 3 4 > > > > > > >extern FILE *fopen (const char *__restrict __filename, > const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); > > > > >extern FILE *freopen (const char *__restrict __filename, > const char *__restrict __modes, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); ># 295 "/usr/include/stdio.h" 3 4 ># 306 "/usr/include/stdio.h" 3 4 >extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 319 "/usr/include/stdio.h" 3 4 >extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > > >extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, > int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, > size_t __size) __attribute__ ((__nothrow__ , __leaf__)); > > >extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); ># 356 "/usr/include/stdio.h" 3 4 >extern int fprintf (FILE *__restrict __stream, > const char *__restrict __format, ...); > > > > >extern int printf (const char *__restrict __format, ...); > >extern int sprintf (char *__restrict __s, > const char *__restrict __format, ...) __attribute__ ((__nothrow__)); > > > > > >extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, > __gnuc_va_list __arg); > > > > >extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); > >extern int vsprintf (char *__restrict __s, const char *__restrict __format, > __gnuc_va_list __arg) __attribute__ ((__nothrow__)); > > > > > >extern int snprintf (char *__restrict __s, size_t __maxlen, > const char *__restrict __format, ...) > __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); > >extern int vsnprintf (char *__restrict __s, size_t __maxlen, > const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); ># 412 "/usr/include/stdio.h" 3 4 >extern int vdprintf (int __fd, const char *__restrict __fmt, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 2, 0))); >extern int dprintf (int __fd, const char *__restrict __fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); ># 425 "/usr/include/stdio.h" 3 4 >extern int fscanf (FILE *__restrict __stream, > const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); > > > > >extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); > >extern int sscanf (const char *__restrict __s, > const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); ># 443 "/usr/include/stdio.h" 3 4 >extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") > > __attribute__ ((__warn_unused_result__)); >extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") > __attribute__ ((__warn_unused_result__)); >extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__)) > > ; ># 463 "/usr/include/stdio.h" 3 4 ># 471 "/usr/include/stdio.h" 3 4 >extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); > > > > > >extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); > > >extern int vsscanf (const char *__restrict __s, > const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0))); ># 494 "/usr/include/stdio.h" 3 4 >extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf") > > > > __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); >extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf") > > __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); >extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__ ((__format__ (__scanf__, 2, 0))); ># 522 "/usr/include/stdio.h" 3 4 ># 531 "/usr/include/stdio.h" 3 4 >extern int fgetc (FILE *__stream); >extern int getc (FILE *__stream); > > > > > >extern int getchar (void); ># 550 "/usr/include/stdio.h" 3 4 >extern int getc_unlocked (FILE *__stream); >extern int getchar_unlocked (void); ># 561 "/usr/include/stdio.h" 3 4 >extern int fgetc_unlocked (FILE *__stream); ># 573 "/usr/include/stdio.h" 3 4 >extern int fputc (int __c, FILE *__stream); >extern int putc (int __c, FILE *__stream); > > > > > >extern int putchar (int __c); ># 594 "/usr/include/stdio.h" 3 4 >extern int fputc_unlocked (int __c, FILE *__stream); > > > > > > > >extern int putc_unlocked (int __c, FILE *__stream); >extern int putchar_unlocked (int __c); > > > > > > >extern int getw (FILE *__stream); > > >extern int putw (int __w, FILE *__stream); ># 622 "/usr/include/stdio.h" 3 4 >extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) > __attribute__ ((__warn_unused_result__)); ># 638 "/usr/include/stdio.h" 3 4 >extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)) __attribute__ ((__deprecated__)); ># 665 "/usr/include/stdio.h" 3 4 >extern __ssize_t __getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern __ssize_t getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); > > > > > > > >extern __ssize_t getline (char **__restrict __lineptr, > size_t *__restrict __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); ># 689 "/usr/include/stdio.h" 3 4 >extern int fputs (const char *__restrict __s, FILE *__restrict __stream); > > > > > >extern int puts (const char *__s); > > > > > > >extern int ungetc (int __c, FILE *__stream); > > > > > > >extern size_t fread (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); > > > > >extern size_t fwrite (const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __s); ># 737 "/usr/include/stdio.h" 3 4 >extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream); ># 749 "/usr/include/stdio.h" 3 4 >extern int fseek (FILE *__stream, long int __off, int __whence); > > > > >extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); > > > > >extern void rewind (FILE *__stream); ># 773 "/usr/include/stdio.h" 3 4 >extern int fseeko (FILE *__stream, __off_t __off, int __whence); > > > > >extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); ># 792 "/usr/include/stdio.h" 3 4 > > > > > > >extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); > > > > >extern int fsetpos (FILE *__stream, const fpos_t *__pos); ># 815 "/usr/include/stdio.h" 3 4 ># 824 "/usr/include/stdio.h" 3 4 > > >extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); > >extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > >extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); >extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); >extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 846 "/usr/include/stdio.h" 3 4 >extern void perror (const char *__s); > > > > > > ># 1 "/usr/include/bits/sys_errlist.h" 1 3 4 ># 26 "/usr/include/bits/sys_errlist.h" 3 4 >extern int sys_nerr; >extern const char *const sys_errlist[]; ># 854 "/usr/include/stdio.h" 2 3 4 > > > > >extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 873 "/usr/include/stdio.h" 3 4 >extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__)); > > > > > >extern int pclose (FILE *__stream); > > > > > >extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); ># 913 "/usr/include/stdio.h" 3 4 >extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > >extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); ># 934 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio.h" 1 3 4 ># 43 "/usr/include/bits/stdio.h" 3 4 >extern __inline int >getchar (void) >{ > return _IO_getc (stdin); >} > > > > >extern __inline int >fgetc_unlocked (FILE *__fp) >{ > return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); >} > > > > > >extern __inline int >getc_unlocked (FILE *__fp) >{ > return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); >} > > >extern __inline int >getchar_unlocked (void) >{ > return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); >} > > > > >extern __inline int >putchar (int __c) >{ > return _IO_putc (__c, stdout); >} > > > > >extern __inline int >fputc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > > > > >extern __inline int >putc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > >extern __inline int >putchar_unlocked (int __c) >{ > return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); >} ># 124 "/usr/include/bits/stdio.h" 3 4 >extern __inline int >__attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream) >{ > return (((__stream)->_flags & 0x10) != 0); >} > > >extern __inline int >__attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream) >{ > return (((__stream)->_flags & 0x20) != 0); >} ># 935 "/usr/include/stdio.h" 2 3 4 > > ># 1 "/usr/include/bits/stdio2.h" 1 3 4 ># 23 "/usr/include/bits/stdio2.h" 3 4 >extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, > const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); >extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, > const char *__restrict __format, > __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...) >{ > return __builtin___sprintf_chk (__s, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); >} > > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap) > >{ > return __builtin___vsprintf_chk (__s, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __ap); >} > > > >extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, > size_t __slen, const char *__restrict __format, > ...) __attribute__ ((__nothrow__ , __leaf__)); >extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, > size_t __slen, const char *__restrict __format, > __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...) > >{ > return __builtin___snprintf_chk (__s, __n, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); >} > > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap) > >{ > return __builtin___vsnprintf_chk (__s, __n, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __ap); >} > > > > > >extern int __fprintf_chk (FILE *__restrict __stream, int __flag, > const char *__restrict __format, ...); >extern int __printf_chk (int __flag, const char *__restrict __format, ...); >extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, > const char *__restrict __format, __gnuc_va_list __ap); >extern int __vprintf_chk (int __flag, const char *__restrict __format, > __gnuc_va_list __ap); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) >{ > return __fprintf_chk (__stream, 2 - 1, __fmt, > __builtin_va_arg_pack ()); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >printf (const char *__restrict __fmt, ...) >{ > return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); >} > > > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >vprintf (const char *__restrict __fmt, __gnuc_va_list __ap) >{ > > return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); > > > >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >vfprintf (FILE *__restrict __stream, > const char *__restrict __fmt, __gnuc_va_list __ap) >{ > return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); >} > > >extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt, > ...) __attribute__ ((__format__ (__printf__, 3, 4))); >extern int __vdprintf_chk (int __fd, int __flag, > const char *__restrict __fmt, __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 3, 0))); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >dprintf (int __fd, const char *__restrict __fmt, ...) >{ > return __dprintf_chk (__fd, 2 - 1, __fmt, > __builtin_va_arg_pack ()); >} > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap) >{ > return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); >} ># 227 "/usr/include/bits/stdio2.h" 3 4 >extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); >extern char *__gets_warn (char *__str) __asm__ ("" "gets") > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * >gets (char *__str) >{ > if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) > return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); > return __gets_warn (__str); >} > > >extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") > > __attribute__ ((__warn_unused_result__)); >extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * >fgets (char *__restrict __s, int __n, FILE *__restrict __stream) >{ > if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__n) || __n <= 0) > return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); > > if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) > return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); > } > return __fgets_alias (__s, __n, __stream); >} > >extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, > size_t __size, size_t __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") > > > __attribute__ ((__warn_unused_result__)); >extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") > > > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t >fread (void *__restrict __ptr, size_t __size, size_t __n, > FILE *__restrict __stream) >{ > if (__builtin_object_size (__ptr, 0) != (size_t) -1) > { > if (!__builtin_constant_p (__size) > || !__builtin_constant_p (__n) > || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) > return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); > > if (__size * __n > __builtin_object_size (__ptr, 0)) > return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); > } > return __fread_alias (__ptr, __size, __n, __stream); >} ># 327 "/usr/include/bits/stdio2.h" 3 4 >extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, > size_t __size, size_t __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") > > > __attribute__ ((__warn_unused_result__)); >extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") > > > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t >fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, > FILE *__restrict __stream) >{ > if (__builtin_object_size (__ptr, 0) != (size_t) -1) > { > if (!__builtin_constant_p (__size) > || !__builtin_constant_p (__n) > || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) > return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, > __stream); > > if (__size * __n > __builtin_object_size (__ptr, 0)) > return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, > __stream); > } > > > if (__builtin_constant_p (__size) > && __builtin_constant_p (__n) > && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) > && __size * __n <= 8) > { > size_t __cnt = __size * __n; > char *__cptr = (char *) __ptr; > if (__cnt == 0) > return 0; > > for (; __cnt > 0; --__cnt) > { > int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); > if (__c == (-1)) > break; > *__cptr++ = __c; > } > return (__cptr - (char *) __ptr) / __size; > } > > return __fread_unlocked_alias (__ptr, __size, __n, __stream); >} ># 938 "/usr/include/stdio.h" 2 3 4 ># 20 "armdefs.h" 2 ># 1 "/usr/include/stdlib.h" 1 3 4 ># 32 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stddef.h" 1 3 4 ># 324 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stddef.h" 3 4 >typedef unsigned int wchar_t; ># 33 "/usr/include/stdlib.h" 2 3 4 ># 41 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/include/bits/waitflags.h" 1 3 4 ># 42 "/usr/include/stdlib.h" 2 3 4 ># 1 "/usr/include/bits/waitstatus.h" 1 3 4 ># 64 "/usr/include/bits/waitstatus.h" 3 4 ># 1 "/usr/include/endian.h" 1 3 4 ># 36 "/usr/include/endian.h" 3 4 ># 1 "/usr/include/bits/endian.h" 1 3 4 ># 37 "/usr/include/endian.h" 2 3 4 ># 60 "/usr/include/endian.h" 3 4 ># 1 "/usr/include/bits/byteswap.h" 1 3 4 ># 34 "/usr/include/bits/byteswap.h" 3 4 ># 1 "/usr/include/bits/byteswap-16.h" 1 3 4 ># 35 "/usr/include/bits/byteswap.h" 2 3 4 ># 43 "/usr/include/bits/byteswap.h" 3 4 >static __inline unsigned int >__bswap_32 (unsigned int __bsx) >{ > return __builtin_bswap32 (__bsx); >} ># 74 "/usr/include/bits/byteswap.h" 3 4 >static __inline __uint64_t >__bswap_64 (__uint64_t __bsx) >{ > return __builtin_bswap64 (__bsx); >} ># 61 "/usr/include/endian.h" 2 3 4 ># 65 "/usr/include/bits/waitstatus.h" 2 3 4 > >union wait > { > int w_status; > struct > { > > unsigned int __w_termsig:7; > unsigned int __w_coredump:1; > unsigned int __w_retcode:8; > unsigned int:16; > > > > > > > > } __wait_terminated; > struct > { > > unsigned int __w_stopval:8; > unsigned int __w_stopsig:8; > unsigned int:16; > > > > > > > } __wait_stopped; > }; ># 43 "/usr/include/stdlib.h" 2 3 4 ># 67 "/usr/include/stdlib.h" 3 4 >typedef union > { > union wait *__uptr; > int *__iptr; > } __WAIT_STATUS __attribute__ ((__transparent_union__)); ># 95 "/usr/include/stdlib.h" 3 4 > > >typedef struct > { > int quot; > int rem; > } div_t; > > > >typedef struct > { > long int quot; > long int rem; > } ldiv_t; > > > > > > > >__extension__ typedef struct > { > long long int quot; > long long int rem; > } lldiv_t; ># 139 "/usr/include/stdlib.h" 3 4 >extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern double atof (const char *__nptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > >extern int atoi (const char *__nptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > >extern long int atol (const char *__nptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > >__extension__ extern long long int atoll (const char *__nptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > > >extern double strtod (const char *__restrict __nptr, > char **__restrict __endptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern float strtof (const char *__restrict __nptr, > char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > >extern long double strtold (const char *__restrict __nptr, > char **__restrict __endptr) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern long int strtol (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > >extern unsigned long int strtoul (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > >__extension__ >extern long long int strtoq (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > >__extension__ >extern unsigned long long int strtouq (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > >__extension__ >extern long long int strtoll (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > >__extension__ >extern unsigned long long int strtoull (const char *__restrict __nptr, > char **__restrict __endptr, int __base) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); ># 276 "/usr/include/stdlib.h" 3 4 > >extern __inline int >__attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr) >{ > return (int) strtol (__nptr, (char **) ((void *)0), 10); >} >extern __inline long int >__attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr) >{ > return strtol (__nptr, (char **) ((void *)0), 10); >} > > > > >__extension__ extern __inline long long int >__attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr) >{ > return strtoll (__nptr, (char **) ((void *)0), 10); >} ># 305 "/usr/include/stdlib.h" 3 4 >extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > >extern long int a64l (const char *__s) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); > > > > ># 1 "/usr/include/sys/types.h" 1 3 4 ># 27 "/usr/include/sys/types.h" 3 4 > > > > > > >typedef __u_char u_char; >typedef __u_short u_short; >typedef __u_int u_int; >typedef __u_long u_long; >typedef __quad_t quad_t; >typedef __u_quad_t u_quad_t; >typedef __fsid_t fsid_t; > > > > >typedef __loff_t loff_t; > > > >typedef __ino_t ino_t; ># 60 "/usr/include/sys/types.h" 3 4 >typedef __dev_t dev_t; > > > > >typedef __gid_t gid_t; > > > > >typedef __mode_t mode_t; > > > > >typedef __nlink_t nlink_t; > > > > >typedef __uid_t uid_t; ># 98 "/usr/include/sys/types.h" 3 4 >typedef __pid_t pid_t; > > > > > >typedef __id_t id_t; ># 115 "/usr/include/sys/types.h" 3 4 >typedef __daddr_t daddr_t; >typedef __caddr_t caddr_t; > > > > > >typedef __key_t key_t; ># 132 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 57 "/usr/include/time.h" 3 4 > > >typedef __clock_t clock_t; ># 73 "/usr/include/time.h" 3 4 > > >typedef __time_t time_t; ># 91 "/usr/include/time.h" 3 4 >typedef __clockid_t clockid_t; ># 103 "/usr/include/time.h" 3 4 >typedef __timer_t timer_t; ># 133 "/usr/include/sys/types.h" 2 3 4 ># 146 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stddef.h" 1 3 4 ># 147 "/usr/include/sys/types.h" 2 3 4 > > > >typedef unsigned long int ulong; >typedef unsigned short int ushort; >typedef unsigned int uint; ># 194 "/usr/include/sys/types.h" 3 4 >typedef int int8_t __attribute__ ((__mode__ (__QI__))); >typedef int int16_t __attribute__ ((__mode__ (__HI__))); >typedef int int32_t __attribute__ ((__mode__ (__SI__))); >typedef int int64_t __attribute__ ((__mode__ (__DI__))); > > >typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); >typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); >typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); >typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); > >typedef int register_t __attribute__ ((__mode__ (__word__))); ># 219 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/sys/select.h" 1 3 4 ># 30 "/usr/include/sys/select.h" 3 4 ># 1 "/usr/include/bits/select.h" 1 3 4 ># 31 "/usr/include/sys/select.h" 2 3 4 > > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 23 "/usr/include/bits/sigset.h" 3 4 >typedef int __sig_atomic_t; > > > > >typedef struct > { > unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; > } __sigset_t; ># 34 "/usr/include/sys/select.h" 2 3 4 > > > >typedef __sigset_t sigset_t; > > > > > ># 1 "/usr/include/time.h" 1 3 4 ># 120 "/usr/include/time.h" 3 4 >struct timespec > { > __time_t tv_sec; > __syscall_slong_t tv_nsec; > }; ># 44 "/usr/include/sys/select.h" 2 3 4 > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 30 "/usr/include/bits/time.h" 3 4 >struct timeval > { > __time_t tv_sec; > __suseconds_t tv_usec; > }; ># 46 "/usr/include/sys/select.h" 2 3 4 > > >typedef __suseconds_t suseconds_t; > > > > > >typedef long int __fd_mask; ># 64 "/usr/include/sys/select.h" 3 4 >typedef struct > { > > > > > > > __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; > > > } fd_set; > > > > > > >typedef __fd_mask fd_mask; ># 96 "/usr/include/sys/select.h" 3 4 ># 106 "/usr/include/sys/select.h" 3 4 >extern int select (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > struct timeval *__restrict __timeout); ># 118 "/usr/include/sys/select.h" 3 4 >extern int pselect (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > const struct timespec *__restrict __timeout, > const __sigset_t *__restrict __sigmask); > > > > > ># 1 "/usr/include/bits/select2.h" 1 3 4 ># 24 "/usr/include/bits/select2.h" 3 4 >extern long int __fdelt_chk (long int __d); >extern long int __fdelt_warn (long int __d) > __attribute__((__warning__ ("bit outside of fd_set selected"))); ># 129 "/usr/include/sys/select.h" 2 3 4 ># 220 "/usr/include/sys/types.h" 2 3 4 > > ># 1 "/usr/include/sys/sysmacros.h" 1 3 4 ># 29 "/usr/include/sys/sysmacros.h" 3 4 > > >__extension__ >extern unsigned int gnu_dev_major (unsigned long long int __dev) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); >__extension__ >extern unsigned int gnu_dev_minor (unsigned long long int __dev) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); >__extension__ >extern unsigned long long int gnu_dev_makedev (unsigned int __major, > unsigned int __minor) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); > > >__extension__ extern __inline __attribute__ ((__const__)) unsigned int >__attribute__ ((__nothrow__ , __leaf__)) gnu_dev_major (unsigned long long int __dev) >{ > return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); >} > >__extension__ extern __inline __attribute__ ((__const__)) unsigned int >__attribute__ ((__nothrow__ , __leaf__)) gnu_dev_minor (unsigned long long int __dev) >{ > return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); >} > >__extension__ extern __inline __attribute__ ((__const__)) unsigned long long int >__attribute__ ((__nothrow__ , __leaf__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) >{ > return ((__minor & 0xff) | ((__major & 0xfff) << 8) > | (((unsigned long long int) (__minor & ~0xff)) << 12) > | (((unsigned long long int) (__major & ~0xfff)) << 32)); >} ># 223 "/usr/include/sys/types.h" 2 3 4 > > > > > >typedef __blksize_t blksize_t; > > > > > > >typedef __blkcnt_t blkcnt_t; > > > >typedef __fsblkcnt_t fsblkcnt_t; > > > >typedef __fsfilcnt_t fsfilcnt_t; ># 270 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 ># 37 "/usr/include/bits/pthreadtypes.h" 3 4 >typedef unsigned long int pthread_t; > > >union pthread_attr_t >{ > char __size[36]; > long int __align; >}; > >typedef union pthread_attr_t pthread_attr_t; > > > > >typedef struct __pthread_internal_slist >{ > struct __pthread_internal_slist *__next; >} __pthread_slist_t; > > > > >typedef union >{ > struct __pthread_mutex_s > { > int __lock; > unsigned int __count; > int __owner; > > > int __kind; > unsigned int __nusers; > __extension__ union > { > int __spins; > __pthread_slist_t __list; > }; > } __data; > char __size[24]; > long int __align; >} pthread_mutex_t; > >typedef union >{ > char __size[4]; > long int __align; >} pthread_mutexattr_t; > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __futex; > __extension__ unsigned long long int __total_seq; > __extension__ unsigned long long int __wakeup_seq; > __extension__ unsigned long long int __woken_seq; > void *__mutex; > unsigned int __nwaiters; > unsigned int __broadcast_seq; > } __data; > char __size[48]; > __extension__ long long int __align; >} pthread_cond_t; > >typedef union >{ > char __size[4]; > long int __align; >} pthread_condattr_t; > > > >typedef unsigned int pthread_key_t; > > > >typedef int pthread_once_t; > > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __nr_readers; > unsigned int __readers_wakeup; > unsigned int __writer_wakeup; > unsigned int __nr_readers_queued; > unsigned int __nr_writers_queued; ># 144 "/usr/include/bits/pthreadtypes.h" 3 4 > unsigned char __flags; > unsigned char __shared; > unsigned char __pad1; > unsigned char __pad2; > > int __writer; > } __data; > char __size[32]; > long int __align; >} pthread_rwlock_t; > >typedef union >{ > char __size[8]; > long int __align; >} pthread_rwlockattr_t; > > > > > >typedef volatile int pthread_spinlock_t; > > > > >typedef union >{ > char __size[20]; > long int __align; >} pthread_barrier_t; > >typedef union >{ > char __size[4]; > int __align; >} pthread_barrierattr_t; ># 271 "/usr/include/sys/types.h" 2 3 4 ># 315 "/usr/include/stdlib.h" 2 3 4 > > > > > > >extern long int random (void) __attribute__ ((__nothrow__ , __leaf__)); > > >extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); > > > > > >extern char *initstate (unsigned int __seed, char *__statebuf, > size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > > > >extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > > > >struct random_data > { > int32_t *fptr; > int32_t *rptr; > int32_t *state; > int rand_type; > int rand_deg; > int rand_sep; > int32_t *end_ptr; > }; > >extern int random_r (struct random_data *__restrict __buf, > int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > >extern int srandom_r (unsigned int __seed, struct random_data *__buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > >extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, > size_t __statelen, > struct random_data *__restrict __buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); > >extern int setstate_r (char *__restrict __statebuf, > struct random_data *__restrict __buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern int rand (void) __attribute__ ((__nothrow__ , __leaf__)); > >extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > > >extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__)); >extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); >extern long int nrand48 (unsigned short int __xsubi[3]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); >extern long int jrand48 (unsigned short int __xsubi[3]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > >extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__)); >extern unsigned short int *seed48 (unsigned short int __seed16v[3]) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); >extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > >struct drand48_data > { > unsigned short int __x[3]; > unsigned short int __old_x[3]; > unsigned short int __c; > unsigned short int __init; > unsigned long long int __a; > }; > > >extern int drand48_r (struct drand48_data *__restrict __buffer, > double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); >extern int erand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int lrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); >extern int nrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int mrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); >extern int jrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > > >extern int srand48_r (long int __seedval, struct drand48_data *__buffer) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > >extern int seed48_r (unsigned short int __seed16v[3], > struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); > >extern int lcong48_r (unsigned short int __param[7], > struct drand48_data *__buffer) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); ># 473 "/usr/include/stdlib.h" 3 4 > > > > > > >extern void *realloc (void *__ptr, size_t __size) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > >extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); > > > ># 1 "/usr/include/alloca.h" 1 3 4 ># 24 "/usr/include/alloca.h" 3 4 ># 1 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stddef.h" 1 3 4 ># 25 "/usr/include/alloca.h" 2 3 4 > > > > > > > >extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__)); ># 492 "/usr/include/stdlib.h" 2 3 4 > > > > > >extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); > > > > >extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 512 "/usr/include/stdlib.h" 3 4 > > >extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); > > > >extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); ># 529 "/usr/include/stdlib.h" 3 4 > > > > > >extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); ># 556 "/usr/include/stdlib.h" 3 4 >extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); > > > > > > >extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 577 "/usr/include/stdlib.h" 3 4 >extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > >extern int setenv (const char *__name, const char *__value, int __replace) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); > > >extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > > > > > >extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__)); ># 605 "/usr/include/stdlib.h" 3 4 >extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); ># 619 "/usr/include/stdlib.h" 3 4 >extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 641 "/usr/include/stdlib.h" 3 4 >extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 662 "/usr/include/stdlib.h" 3 4 >extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 711 "/usr/include/stdlib.h" 3 4 > > > > > >extern int system (const char *__command) __attribute__ ((__warn_unused_result__)); ># 733 "/usr/include/stdlib.h" 3 4 >extern char *realpath (const char *__restrict __name, > char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > > >typedef int (*__compar_fn_t) (const void *, const void *); ># 751 "/usr/include/stdlib.h" 3 4 > > > >extern void *bsearch (const void *__key, const void *__base, > size_t __nmemb, size_t __size, __compar_fn_t __compar) > __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); > > > >extern void qsort (void *__base, size_t __nmemb, size_t __size, > __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); ># 770 "/usr/include/stdlib.h" 3 4 >extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); >extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); > > > >__extension__ extern long long int llabs (long long int __x) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); > > > > > > > >extern div_t div (int __numer, int __denom) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); >extern ldiv_t ldiv (long int __numer, long int __denom) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); > > > > >__extension__ extern lldiv_t lldiv (long long int __numer, > long long int __denom) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); ># 807 "/usr/include/stdlib.h" 3 4 >extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); > > > > >extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); > > > > >extern char *gcvt (double __value, int __ndigit, char *__buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); > > > > >extern char *qecvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); >extern char *qfcvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); >extern char *qgcvt (long double __value, int __ndigit, char *__buf) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); > > > > >extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); >extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); > >extern int qecvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); >extern int qfcvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); > > > > > > > >extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > >extern int mbtowc (wchar_t *__restrict __pwc, > const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > >extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > >extern size_t mbstowcs (wchar_t *__restrict __pwcs, > const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); > >extern size_t wcstombs (char *__restrict __s, > const wchar_t *__restrict __pwcs, size_t __n) > __attribute__ ((__nothrow__ , __leaf__)); ># 884 "/usr/include/stdlib.h" 3 4 >extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ># 895 "/usr/include/stdlib.h" 3 4 >extern int getsubopt (char **__restrict __optionp, > char *const *__restrict __tokens, > char **__restrict __valuep) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); ># 947 "/usr/include/stdlib.h" 3 4 >extern int getloadavg (double __loadavg[], int __nelem) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); > > ># 1 "/usr/include/bits/stdlib-float.h" 1 3 4 ># 24 "/usr/include/bits/stdlib-float.h" 3 4 > >extern __inline double >__attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr) >{ > return strtod (__nptr, (char **) ((void *)0)); >} ># 952 "/usr/include/stdlib.h" 2 3 4 > > > ># 1 "/usr/include/bits/stdlib.h" 1 3 4 ># 23 "/usr/include/bits/stdlib.h" 3 4 >extern char *__realpath_chk (const char *__restrict __name, > char *__restrict __resolved, > size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); >extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__)) > > __attribute__ ((__warn_unused_result__)); >extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__warn_unused_result__)) > __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * >__attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved) >{ > if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) > { > > > > > return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); > } > > return __realpath_alias (__name, __resolved); >} > > >extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, > size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); >extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__)) > > __attribute__ ((__nonnull__ (2))); >extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) >{ > if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__buflen)) > return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > if (__buflen > __builtin_object_size (__buf, 2 > 1)) > return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); > } > return __ptsname_r_alias (__fd, __buf, __buflen); >} > > >extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); >extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__)) > __attribute__ ((__warn_unused_result__)); > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int >__attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar) >{ > > > > > > > > if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) > return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); > return __wctomb_alias (__s, __wchar); >} > > >extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, > const char *__restrict __src, > size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)); >extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__)) > > > ; >extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t >__attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) > >{ > if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__len)) > return __mbstowcs_chk (__dst, __src, __len, > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); > > if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) > return __mbstowcs_chk_warn (__dst, __src, __len, > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); > } > return __mbstowcs_alias (__dst, __src, __len); >} > > >extern size_t __wcstombs_chk (char *__restrict __dst, > const wchar_t *__restrict __src, > size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)); >extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__)) > > > ; >extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t >__attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) > >{ > if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__len)) > return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); > if (__len > __builtin_object_size (__dst, 2 > 1)) > return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); > } > return __wcstombs_alias (__dst, __src, __len); >} ># 956 "/usr/include/stdlib.h" 2 3 4 ># 964 "/usr/include/stdlib.h" 3 4 ># 21 "armdefs.h" 2 ># 34 "armdefs.h" ># 1 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stdint.h" 1 3 4 ># 9 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stdint.h" 3 4 ># 1 "/usr/include/stdint.h" 1 3 4 ># 26 "/usr/include/stdint.h" 3 4 ># 1 "/usr/include/bits/wchar.h" 1 3 4 ># 27 "/usr/include/stdint.h" 2 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 28 "/usr/include/stdint.h" 2 3 4 ># 48 "/usr/include/stdint.h" 3 4 >typedef unsigned char uint8_t; >typedef unsigned short int uint16_t; > >typedef unsigned int uint32_t; > > > > > >__extension__ >typedef unsigned long long int uint64_t; > > > > > > >typedef signed char int_least8_t; >typedef short int int_least16_t; >typedef int int_least32_t; > > > >__extension__ >typedef long long int int_least64_t; > > > >typedef unsigned char uint_least8_t; >typedef unsigned short int uint_least16_t; >typedef unsigned int uint_least32_t; > > > >__extension__ >typedef unsigned long long int uint_least64_t; > > > > > > >typedef signed char int_fast8_t; > > > > > >typedef int int_fast16_t; >typedef int int_fast32_t; >__extension__ >typedef long long int int_fast64_t; > > > >typedef unsigned char uint_fast8_t; > > > > > >typedef unsigned int uint_fast16_t; >typedef unsigned int uint_fast32_t; >__extension__ >typedef unsigned long long int uint_fast64_t; ># 125 "/usr/include/stdint.h" 3 4 >typedef int intptr_t; > > >typedef unsigned int uintptr_t; ># 137 "/usr/include/stdint.h" 3 4 >__extension__ >typedef long long int intmax_t; >__extension__ >typedef unsigned long long int uintmax_t; ># 10 "/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.8.0/include/stdint.h" 2 3 4 ># 35 "armdefs.h" 2 >typedef uint32_t ARMword; >typedef int32_t ARMsword; >typedef uint64_t ARMdword; >typedef int64_t ARMsdword; > > > > > > >typedef struct ARMul_State ARMul_State; > >typedef unsigned ARMul_CPInits (ARMul_State * state); >typedef unsigned ARMul_CPExits (ARMul_State * state); >typedef unsigned ARMul_LDCs (ARMul_State * state, unsigned type, > ARMword instr, ARMword value); >typedef unsigned ARMul_STCs (ARMul_State * state, unsigned type, > ARMword instr, ARMword * value); >typedef unsigned ARMul_MRCs (ARMul_State * state, unsigned type, > ARMword instr, ARMword * value); >typedef unsigned ARMul_MCRs (ARMul_State * state, unsigned type, > ARMword instr, ARMword value); >typedef unsigned ARMul_CDPs (ARMul_State * state, unsigned type, > ARMword instr); >typedef unsigned ARMul_CPReads (ARMul_State * state, unsigned reg, > ARMword * value); >typedef unsigned ARMul_CPWrites (ARMul_State * state, unsigned reg, > ARMword value); > >struct ARMul_State >{ > ARMword Emulate; > unsigned EndCondition; > unsigned ErrorCode; > ARMword Reg[16]; > ARMword RegBank[7][16]; > > > ARMdword Accumulator; > ARMword Cpsr; > ARMword Spsr[7]; > ARMword NFlag, ZFlag, CFlag, VFlag, IFFlags; > ARMword SFlag; > > ARMword TFlag; > > ARMword Bank; > ARMword Mode; > ARMword instr, pc, temp; > ARMword loaded, decoded; > unsigned long NumScycles, NumNcycles, NumIcycles, NumCcycles, NumFcycles; > unsigned long NumInstrs; > unsigned NextInstr; > unsigned VectorCatch; > unsigned CallDebug; > unsigned CanWatch; > > > unsigned MemReadDebug, MemWriteDebug; > unsigned long StopHandle; > > unsigned char *MemDataPtr; > unsigned char *MemInPtr; > unsigned char *MemOutPtr; > unsigned char *MemSparePtr; > ARMword MemSize; > > unsigned char *OSptr; > char *CommandLine; > > ARMul_CPInits *CPInit[16]; > ARMul_CPExits *CPExit[16]; > ARMul_LDCs *LDC[16]; > ARMul_STCs *STC[16]; > ARMul_MRCs *MRC[16]; > ARMul_MCRs *MCR[16]; > ARMul_CDPs *CDP[16]; > ARMul_CPReads *CPRead[16]; > ARMul_CPWrites *CPWrite[16]; > unsigned char *CPData[16]; > unsigned char const *CPRegWords[16]; > unsigned long LastTime; > ARMword CP14R0_CCD; > > > unsigned EventSet; > unsigned long Now; > struct EventNode **EventPtr; > > unsigned Exception; > unsigned Debug; > unsigned NresetSig; > unsigned NfiqSig; > unsigned NirqSig; > > unsigned abortSig; > unsigned NtransSig; > unsigned bigendSig; > unsigned prog32Sig; > unsigned data32Sig; > unsigned lateabtSig; > ARMword Vector; > ARMword Aborted; > ARMword Reseted; > ARMword Inted, LastInted; > ARMword Base; > ARMword AbortAddr; > > const struct Dbg_HostosInterface *hostif; > > unsigned is_v4; > unsigned is_v5; > unsigned is_v5e; > unsigned is_v6; > unsigned is_XScale; > unsigned is_iWMMXt; > unsigned is_ep9312; > unsigned verbose; >}; ># 253 "armdefs.h" >extern void ARMul_EmulateInit (void); >extern ARMul_State *ARMul_NewState (void); >extern void ARMul_Reset (ARMul_State * state); >extern ARMword ARMul_DoProg (ARMul_State * state); >extern ARMword ARMul_DoInstr (ARMul_State * state); > > > > > >extern void ARMul_ScheduleEvent (ARMul_State * state, unsigned long delay, > unsigned (*func) ()); >extern void ARMul_EnvokeEvent (ARMul_State * state); >extern unsigned long ARMul_Time (ARMul_State * state); > > > > > >extern ARMword ARMul_GetReg (ARMul_State * state, unsigned mode, > unsigned reg); >extern void ARMul_SetReg (ARMul_State * state, unsigned mode, unsigned reg, > ARMword value); >extern ARMword ARMul_GetPC (ARMul_State * state); >extern ARMword ARMul_GetNextPC (ARMul_State * state); >extern void ARMul_SetPC (ARMul_State * state, ARMword value); >extern ARMword ARMul_GetR15 (ARMul_State * state); >extern void ARMul_SetR15 (ARMul_State * state, ARMword value); > >extern ARMword ARMul_GetCPSR (ARMul_State * state); >extern void ARMul_SetCPSR (ARMul_State * state, ARMword value); >extern ARMword ARMul_GetSPSR (ARMul_State * state, ARMword mode); >extern void ARMul_SetSPSR (ARMul_State * state, ARMword mode, ARMword value); > > > > > >extern void ARMul_Abort (ARMul_State * state, ARMword address); ># 303 "armdefs.h" >extern unsigned ARMul_MemoryInit (ARMul_State * state, > unsigned long initmemsize); >extern void ARMul_MemoryExit (ARMul_State * state); > >extern ARMword ARMul_LoadInstrS (ARMul_State * state, ARMword address, > ARMword isize); >extern ARMword ARMul_LoadInstrN (ARMul_State * state, ARMword address, > ARMword isize); >extern ARMword ARMul_ReLoadInstr (ARMul_State * state, ARMword address, > ARMword isize); > >extern ARMword ARMul_LoadWordS (ARMul_State * state, ARMword address); >extern ARMword ARMul_LoadWordN (ARMul_State * state, ARMword address); >extern ARMword ARMul_LoadHalfWord (ARMul_State * state, ARMword address); >extern ARMword ARMul_LoadByte (ARMul_State * state, ARMword address); > >extern void ARMul_StoreWordS (ARMul_State * state, ARMword address, > ARMword data); >extern void ARMul_StoreWordN (ARMul_State * state, ARMword address, > ARMword data); >extern void ARMul_StoreHalfWord (ARMul_State * state, ARMword address, > ARMword data); >extern void ARMul_StoreByte (ARMul_State * state, ARMword address, > ARMword data); > >extern ARMword ARMul_SwapWord (ARMul_State * state, ARMword address, > ARMword data); >extern ARMword ARMul_SwapByte (ARMul_State * state, ARMword address, > ARMword data); > >extern void ARMul_Icycles (ARMul_State * state, unsigned number, > ARMword address); >extern void ARMul_Ccycles (ARMul_State * state, unsigned number, > ARMword address); > >extern ARMword ARMul_ReadWord (ARMul_State * state, ARMword address); >extern ARMword ARMul_ReadByte (ARMul_State * state, ARMword address); >extern ARMword ARMul_SafeReadByte (ARMul_State * state, ARMword address); >extern void ARMul_WriteWord (ARMul_State * state, ARMword address, > ARMword data); >extern void ARMul_WriteByte (ARMul_State * state, ARMword address, > ARMword data); >extern void ARMul_SafeWriteByte (ARMul_State * state, ARMword address, > ARMword data); > >extern ARMword ARMul_MemAccess (ARMul_State * state, ARMword, ARMword, > ARMword, ARMword, ARMword, ARMword, ARMword, > ARMword, ARMword, ARMword); ># 391 "armdefs.h" >extern unsigned ARMul_CoProInit (ARMul_State * state); >extern void ARMul_CoProExit (ARMul_State * state); >extern void ARMul_CoProAttach (ARMul_State * state, unsigned number, > ARMul_CPInits * init, ARMul_CPExits * exit, > ARMul_LDCs * ldc, ARMul_STCs * stc, > ARMul_MRCs * mrc, ARMul_MCRs * mcr, > ARMul_CDPs * cdp, > ARMul_CPReads * read, ARMul_CPWrites * write); >extern void ARMul_CoProDetach (ARMul_State * state, unsigned number); >extern void XScale_check_memacc (ARMul_State * state, ARMword * address, > int store); >extern void XScale_set_fsr_far (ARMul_State * state, ARMword fsr, ARMword far); >extern int XScale_debug_moe (ARMul_State * state, int moe); > > > > > >extern unsigned ARMul_OSInit (ARMul_State * state); >extern void ARMul_OSExit (ARMul_State * state); >extern unsigned ARMul_OSHandleSWI (ARMul_State * state, ARMword number); >extern ARMword ARMul_OSLastErrorP (ARMul_State * state); > >extern ARMword ARMul_Debug (ARMul_State * state, ARMword pc, ARMword instr); >extern unsigned ARMul_OSException (ARMul_State * state, ARMword vector, > ARMword pc); >extern int rdi_log; ># 429 "armdefs.h" >extern void ARMul_UndefInstr (ARMul_State *, ARMword); >extern void ARMul_FixCPSR (ARMul_State *, ARMword, ARMword); >extern void ARMul_FixSPSR (ARMul_State *, ARMword, ARMword); >extern void ARMul_ConsolePrint (ARMul_State *, const char *, ...); >extern void ARMul_SelectProcessor (ARMul_State *, unsigned); ># 22 "iwmmxt.c" 2 ># 1 "armos.h" 1 ># 91 "armos.h" >extern unsigned long fpecode[]; >extern unsigned long fpesize; > >extern int SWI_vector_installed; ># 23 "iwmmxt.c" 2 ># 1 "armemu.h" 1 ># 18 "armemu.h" >extern ARMword isize; ># 443 "armemu.h" >extern unsigned ARMul_MultTable[]; >extern ARMword ARMul_ImmedTable[]; >extern char ARMul_BitList[]; > > > > >typedef enum >{ > t_undefined, > t_decoded, > t_branch >} >tdstate; ># 485 "armemu.h" >extern unsigned ARMul_NthReg (ARMword, unsigned); >extern int AddOverflow (ARMword, ARMword, ARMword); >extern int SubOverflow (ARMword, ARMword, ARMword); >extern ARMword ARMul_Emulate26 (ARMul_State *); >extern ARMword ARMul_Emulate32 (ARMul_State *); >extern unsigned IntPending (ARMul_State *); >extern void ARMul_CPSRAltered (ARMul_State *); >extern void ARMul_R15Altered (ARMul_State *); >extern ARMword ARMul_GetPC (ARMul_State *); >extern ARMword ARMul_GetNextPC (ARMul_State *); >extern ARMword ARMul_GetR15 (ARMul_State *); >extern ARMword ARMul_GetCPSR (ARMul_State *); >extern void ARMul_EnvokeEvent (ARMul_State *); >extern unsigned long ARMul_Time (ARMul_State *); >extern void ARMul_NegZero (ARMul_State *, ARMword); >extern void ARMul_SetPC (ARMul_State *, ARMword); >extern void ARMul_SetR15 (ARMul_State *, ARMword); >extern void ARMul_SetCPSR (ARMul_State *, ARMword); >extern ARMword ARMul_GetSPSR (ARMul_State *, ARMword); >extern void ARMul_Abort26 (ARMul_State *, ARMword); >extern void ARMul_Abort32 (ARMul_State *, ARMword); >extern ARMword ARMul_MRC (ARMul_State *, ARMword); >extern void ARMul_CDP (ARMul_State *, ARMword); >extern void ARMul_LDC (ARMul_State *, ARMword, ARMword); >extern void ARMul_STC (ARMul_State *, ARMword, ARMword); >extern void ARMul_MCR (ARMul_State *, ARMword, ARMword); >extern void ARMul_SetSPSR (ARMul_State *, ARMword, ARMword); >extern ARMword ARMul_SwitchMode (ARMul_State *, ARMword, ARMword); >extern ARMword ARMul_Align (ARMul_State *, ARMword, ARMword); >extern ARMword ARMul_SwitchMode (ARMul_State *, ARMword, ARMword); >extern void ARMul_MSRCpsr (ARMul_State *, ARMword, ARMword); >extern void ARMul_SubOverflow (ARMul_State *, ARMword, ARMword, ARMword); >extern void ARMul_AddOverflow (ARMul_State *, ARMword, ARMword, ARMword); >extern void ARMul_SubCarry (ARMul_State *, ARMword, ARMword, ARMword); >extern void ARMul_AddCarry (ARMul_State *, ARMword, ARMword, ARMword); >extern tdstate ARMul_ThumbDecode (ARMul_State *, ARMword, ARMword, ARMword *); >extern ARMword ARMul_GetReg (ARMul_State *, unsigned, unsigned); >extern void ARMul_SetReg (ARMul_State *, unsigned, unsigned, ARMword); >extern void ARMul_ScheduleEvent (ARMul_State *, unsigned long, unsigned (*) (ARMul_State *)); > >extern unsigned ARMul_CoProInit (ARMul_State *); >extern void ARMul_CoProExit (ARMul_State *); >extern void ARMul_CoProAttach (ARMul_State *, unsigned, ARMul_CPInits *, ARMul_CPExits *, > ARMul_LDCs *, ARMul_STCs *, ARMul_MRCs *, ARMul_MCRs *, > ARMul_CDPs *, ARMul_CPReads *, ARMul_CPWrites *); >extern void ARMul_CoProDetach (ARMul_State *, unsigned); >extern ARMword read_cp15_reg (unsigned, unsigned, unsigned); > >extern unsigned DSPLDC4 (ARMul_State *, unsigned, ARMword, ARMword); >extern unsigned DSPMCR4 (ARMul_State *, unsigned, ARMword, ARMword); >extern unsigned DSPMRC4 (ARMul_State *, unsigned, ARMword, ARMword *); >extern unsigned DSPSTC4 (ARMul_State *, unsigned, ARMword, ARMword *); >extern unsigned DSPCDP4 (ARMul_State *, unsigned, ARMword); >extern unsigned DSPMCR5 (ARMul_State *, unsigned, ARMword, ARMword); >extern unsigned DSPMRC5 (ARMul_State *, unsigned, ARMword, ARMword *); >extern unsigned DSPLDC5 (ARMul_State *, unsigned, ARMword, ARMword); >extern unsigned DSPSTC5 (ARMul_State *, unsigned, ARMword, ARMword *); >extern unsigned DSPCDP5 (ARMul_State *, unsigned, ARMword); >extern unsigned DSPMCR6 (ARMul_State *, unsigned, ARMword, ARMword); >extern unsigned DSPMRC6 (ARMul_State *, unsigned, ARMword, ARMword *); >extern unsigned DSPCDP6 (ARMul_State *, unsigned, ARMword); ># 24 "iwmmxt.c" 2 ># 1 "../../include/ansidecl.h" 1 ># 25 "iwmmxt.c" 2 ># 1 "iwmmxt.h" 1 ># 19 "iwmmxt.h" >extern unsigned IwmmxtLDC (ARMul_State *, unsigned, ARMword, ARMword); >extern unsigned IwmmxtSTC (ARMul_State *, unsigned, ARMword, ARMword *); >extern unsigned IwmmxtMCR (ARMul_State *, unsigned, ARMword, ARMword); >extern unsigned IwmmxtMRC (ARMul_State *, unsigned, ARMword, ARMword *); >extern unsigned IwmmxtCDP (ARMul_State *, unsigned, ARMword); > >extern int ARMul_HandleIwmmxt (ARMul_State *, ARMword); > >extern int Fetch_Iwmmxt_Register (unsigned int, unsigned char *); >extern int Store_Iwmmxt_Register (unsigned int, unsigned char *); ># 26 "iwmmxt.c" 2 ># 34 "iwmmxt.c" >static ARMdword wR[16]; >static ARMword wC[16] = { 0x69051010 }; ># 137 "iwmmxt.c" >static ARMword Add32 (ARMword, ARMword, int *, int *, ARMword); >static ARMdword AddS32 (ARMdword, ARMdword, int *, int *); >static ARMdword AddU32 (ARMdword, ARMdword, int *, int *); >static ARMword AddS16 (ARMword, ARMword, int *, int *); >static ARMword AddU16 (ARMword, ARMword, int *, int *); >static ARMword AddS8 (ARMword, ARMword, int *, int *); >static ARMword AddU8 (ARMword, ARMword, int *, int *); >static ARMword Sub32 (ARMword, ARMword, int *, int *, ARMword); >static ARMdword SubS32 (ARMdword, ARMdword, int *, int *); >static ARMdword SubU32 (ARMdword, ARMdword, int *, int *); >static ARMword SubS16 (ARMword, ARMword, int *, int *); >static ARMword SubS8 (ARMword, ARMword, int *, int *); >static ARMword SubU16 (ARMword, ARMword, int *, int *); >static ARMword SubU8 (ARMword, ARMword, int *, int *); >static unsigned char IwmmxtSaturateU8 (signed short, int *); >static signed char IwmmxtSaturateS8 (signed short, int *); >static unsigned short IwmmxtSaturateU16 (signed int, int *); >static signed short IwmmxtSaturateS16 (signed int, int *); >static unsigned long IwmmxtSaturateU32 (signed long long, int *); >static signed long IwmmxtSaturateS32 (signed long long, int *); >static ARMword Compute_Iwmmxt_Address (ARMul_State *, ARMword, int *); >static ARMdword Iwmmxt_Load_Double_Word (ARMul_State *, ARMword); >static ARMword Iwmmxt_Load_Word (ARMul_State *, ARMword); >static ARMword Iwmmxt_Load_Half_Word (ARMul_State *, ARMword); >static ARMword Iwmmxt_Load_Byte (ARMul_State *, ARMword); >static void Iwmmxt_Store_Double_Word (ARMul_State *, ARMword, ARMdword); >static void Iwmmxt_Store_Word (ARMul_State *, ARMword, ARMword); >static void Iwmmxt_Store_Half_Word (ARMul_State *, ARMword, ARMword); >static void Iwmmxt_Store_Byte (ARMul_State *, ARMword, ARMword); >static int Process_Instruction (ARMul_State *, ARMword); > >static int TANDC (ARMul_State *, ARMword); >static int TBCST (ARMul_State *, ARMword); >static int TEXTRC (ARMul_State *, ARMword); >static int TEXTRM (ARMul_State *, ARMword); >static int TINSR (ARMul_State *, ARMword); >static int TMCR (ARMul_State *, ARMword); >static int TMCRR (ARMul_State *, ARMword); >static int TMIA (ARMul_State *, ARMword); >static int TMIAPH (ARMul_State *, ARMword); >static int TMIAxy (ARMul_State *, ARMword); >static int TMOVMSK (ARMul_State *, ARMword); >static int TMRC (ARMul_State *, ARMword); >static int TMRRC (ARMul_State *, ARMword); >static int TORC (ARMul_State *, ARMword); >static int WACC (ARMul_State *, ARMword); >static int WADD (ARMul_State *, ARMword); >static int WALIGNI (ARMword); >static int WALIGNR (ARMul_State *, ARMword); >static int WAND (ARMword); >static int WANDN (ARMword); >static int WAVG2 (ARMword); >static int WCMPEQ (ARMul_State *, ARMword); >static int WCMPGT (ARMul_State *, ARMword); >static int WLDR (ARMul_State *, ARMword); >static int WMAC (ARMword); >static int WMADD (ARMword); >static int WMAX (ARMul_State *, ARMword); >static int WMIN (ARMul_State *, ARMword); >static int WMUL (ARMword); >static int WOR (ARMword); >static int WPACK (ARMul_State *, ARMword); >static int WROR (ARMul_State *, ARMword); >static int WSAD (ARMword); >static int WSHUFH (ARMword); >static int WSLL (ARMul_State *, ARMword); >static int WSRA (ARMul_State *, ARMword); >static int WSRL (ARMul_State *, ARMword); >static int WSTR (ARMul_State *, ARMword); >static int WSUB (ARMul_State *, ARMword); >static int WUNPCKEH (ARMul_State *, ARMword); >static int WUNPCKEL (ARMul_State *, ARMword); >static int WUNPCKIH (ARMul_State *, ARMword); >static int WUNPCKIL (ARMul_State *, ARMword); >static int WXOR (ARMword); > > > > >static ARMword >Add32 (ARMword a1, > ARMword a2, > int * carry_ptr, > int * overflow_ptr, > ARMword sign_mask) >{ > ARMword result = (a1 + a2); > unsigned int uresult = (unsigned int) result; > unsigned int ua1 = (unsigned int) a1; > > > > * carry_ptr = ((uresult == ua1) ? (a2 != 0) : (uresult < ua1)); > > > > * overflow_ptr = ( ( (result & sign_mask) && !(a1 & sign_mask) && !(a2 & sign_mask)) > || (!(result & sign_mask) && (a1 & sign_mask) && (a2 & sign_mask))); > > return result; >} > >static ARMdword >AddS32 (ARMdword a1, ARMdword a2, int * carry_ptr, int * overflow_ptr) >{ > ARMdword result; > unsigned int uresult; > unsigned int ua1; > > a1 = ((a1) & 0x80000000ULL ? ((a1) | 0xffffffff00000000ULL) : (a1)); > a2 = ((a2) & 0x80000000ULL ? ((a2) | 0xffffffff00000000ULL) : (a2)); > > result = a1 + a2; > uresult = (unsigned int) result; > ua1 = (unsigned int) a1; > > * carry_ptr = ((uresult == a1) ? (a2 != 0) : (uresult < ua1)); > > * overflow_ptr = ( ( (result & 0x80000000ULL) && !(a1 & 0x80000000ULL) && !(a2 & 0x80000000ULL)) > || (!(result & 0x80000000ULL) && (a1 & 0x80000000ULL) && (a2 & 0x80000000ULL))); > > return result; >} > >static ARMdword >AddU32 (ARMdword a1, ARMdword a2, int * carry_ptr, int * overflow_ptr) >{ > ARMdword result; > unsigned int uresult; > unsigned int ua1; > > a1 &= 0xffffffff; > a2 &= 0xffffffff; > > result = a1 + a2; > uresult = (unsigned int) result; > ua1 = (unsigned int) a1; > > * carry_ptr = ((uresult == a1) ? (a2 != 0) : (uresult < ua1)); > > * overflow_ptr = ( ( (result & 0x80000000ULL) && !(a1 & 0x80000000ULL) && !(a2 & 0x80000000ULL)) > || (!(result & 0x80000000ULL) && (a1 & 0x80000000ULL) && (a2 & 0x80000000ULL))); > > return result; >} > >static ARMword >AddS16 (ARMword a1, ARMword a2, int * carry_ptr, int * overflow_ptr) >{ > a1 = ((a1) & 0x8000 ? ((a1) | 0xffff0000) : (a1)); > a2 = ((a2) & 0x8000 ? ((a2) | 0xffff0000) : (a2)); > > return Add32 (a1, a2, carry_ptr, overflow_ptr, 0x8000); >} > >static ARMword >AddU16 (ARMword a1, ARMword a2, int * carry_ptr, int * overflow_ptr) >{ > a1 &= 0xffff; > a2 &= 0xffff; > > return Add32 (a1, a2, carry_ptr, overflow_ptr, 0x8000); >} > >static ARMword >AddS8 (ARMword a1, ARMword a2, int * carry_ptr, int * overflow_ptr) >{ > a1 = ((a1) & 0x80 ? ((a1) | 0xffffff00) : (a1)); > a2 = ((a2) & 0x80 ? ((a2) | 0xffffff00) : (a2)); > > return Add32 (a1, a2, carry_ptr, overflow_ptr, 0x80); >} > >static ARMword >AddU8 (ARMword a1, ARMword a2, int * carry_ptr, int * overflow_ptr) >{ > a1 &= 0xff; > a2 &= 0xff; > > return Add32 (a1, a2, carry_ptr, overflow_ptr, 0x80); >} > >static ARMword >Sub32 (ARMword a1, > ARMword a2, > int * borrow_ptr, > int * overflow_ptr, > ARMword sign_mask) >{ > ARMword result = (a1 - a2); > unsigned int ua1 = (unsigned int) a1; > unsigned int ua2 = (unsigned int) a2; > > > > * borrow_ptr = ! (ua2 > ua1); > > > > > > * overflow_ptr = ( (! (a1 & sign_mask) && (a2 & sign_mask) && (result & sign_mask)) > || ((a1 & sign_mask) && ! (a2 & sign_mask) && ! (result & sign_mask))); > > return result; >} > >static ARMdword >SubS32 (ARMdword a1, ARMdword a2, int * borrow_ptr, int * overflow_ptr) >{ > ARMdword result; > unsigned int ua1; > unsigned int ua2; > > a1 = ((a1) & 0x80000000ULL ? ((a1) | 0xffffffff00000000ULL) : (a1)); > a2 = ((a2) & 0x80000000ULL ? ((a2) | 0xffffffff00000000ULL) : (a2)); > > result = a1 - a2; > ua1 = (unsigned int) a1; > ua2 = (unsigned int) a2; > > * borrow_ptr = ! (ua2 > ua1); > > * overflow_ptr = ( (! (a1 & 0x80000000ULL) && (a2 & 0x80000000ULL) && (result & 0x80000000ULL)) > || ((a1 & 0x80000000ULL) && ! (a2 & 0x80000000ULL) && ! (result & 0x80000000ULL))); > > return result; >} > >static ARMword >SubS16 (ARMword a1, ARMword a2, int * carry_ptr, int * overflow_ptr) >{ > a1 = ((a1) & 0x8000 ? ((a1) | 0xffff0000) : (a1)); > a2 = ((a2) & 0x8000 ? ((a2) | 0xffff0000) : (a2)); > > return Sub32 (a1, a2, carry_ptr, overflow_ptr, 0x8000); >} > >static ARMword >SubS8 (ARMword a1, ARMword a2, int * carry_ptr, int * overflow_ptr) >{ > a1 = ((a1) & 0x80 ? ((a1) | 0xffffff00) : (a1)); > a2 = ((a2) & 0x80 ? ((a2) | 0xffffff00) : (a2)); > > return Sub32 (a1, a2, carry_ptr, overflow_ptr, 0x80); >} > >static ARMword >SubU16 (ARMword a1, ARMword a2, int * carry_ptr, int * overflow_ptr) >{ > a1 &= 0xffff; > a2 &= 0xffff; > > return Sub32 (a1, a2, carry_ptr, overflow_ptr, 0x8000); >} > >static ARMword >SubU8 (ARMword a1, ARMword a2, int * carry_ptr, int * overflow_ptr) >{ > a1 &= 0xff; > a2 &= 0xff; > > return Sub32 (a1, a2, carry_ptr, overflow_ptr, 0x80); >} > >static ARMdword >SubU32 (ARMdword a1, ARMdword a2, int * borrow_ptr, int * overflow_ptr) >{ > ARMdword result; > unsigned int ua1; > unsigned int ua2; > > a1 &= 0xffffffff; > a2 &= 0xffffffff; > > result = a1 - a2; > ua1 = (unsigned int) a1; > ua2 = (unsigned int) a2; > > * borrow_ptr = ! (ua2 > ua1); > > * overflow_ptr = ( (! (a1 & 0x80000000ULL) && (a2 & 0x80000000ULL) && (result & 0x80000000ULL)) > || ((a1 & 0x80000000ULL) && ! (a2 & 0x80000000ULL) && ! (result & 0x80000000ULL))); > > return result; >} > > > >static unsigned char >IwmmxtSaturateU8 (signed short val, int * sat) >{ > unsigned char rv; > > if (val < 0) > { > rv = 0; > *sat = 1; > } > else if (val > 0xff) > { > rv = 0xff; > *sat = 1; > } > else > { > rv = val & 0xff; > *sat = 0; > } > return rv; >} > >static signed char >IwmmxtSaturateS8 (signed short val, int * sat) >{ > signed char rv; > > if (val < -0x80) > { > rv = -0x80; > *sat = 1; > } > else if (val > 0x7f) > { > rv = 0x7f; > *sat = 1; > } > else > { > rv = val & 0xff; > *sat = 0; > } > return rv; >} > >static unsigned short >IwmmxtSaturateU16 (signed int val, int * sat) >{ > unsigned short rv; > > if (val < 0) > { > rv = 0; > *sat = 1; > } > else if (val > 0xffff) > { > rv = 0xffff; > *sat = 1; > } > else > { > rv = val & 0xffff; > *sat = 0; > } > return rv; >} > >static signed short >IwmmxtSaturateS16 (signed int val, int * sat) >{ > signed short rv; > > if (val < -0x8000) > { > rv = - 0x8000; > *sat = 1; > } > else if (val > 0x7fff) > { > rv = 0x7fff; > *sat = 1; > } > else > { > rv = val & 0xffff; > *sat = 0; > } > return rv; >} > >static unsigned long >IwmmxtSaturateU32 (signed long long val, int * sat) >{ > unsigned long rv; > > if (val < 0) > { > rv = 0; > *sat = 1; > } > else if (val > 0xffffffff) > { > rv = 0xffffffff; > *sat = 1; > } > else > { > rv = val & 0xffffffff; > *sat = 0; > } > return rv; >} > >static signed long >IwmmxtSaturateS32 (signed long long val, int * sat) >{ > signed long rv; > > if (val < -0x80000000LL) > { > rv = -0x80000000; > *sat = 1; > } > else if (val > 0x7fffffff) > { > rv = 0x7fffffff; > *sat = 1; > } > else > { > rv = val & 0xffffffff; > *sat = 0; > } > return rv; >} > > > >unsigned >IwmmxtLDC (ARMul_State * state __attribute__ ((__unused__)), > unsigned type __attribute__ ((__unused__)), > ARMword instr, > ARMword data) >{ > return 1; >} > >unsigned >IwmmxtSTC (ARMul_State * state __attribute__ ((__unused__)), > unsigned type __attribute__ ((__unused__)), > ARMword instr, > ARMword * data) >{ > return 1; >} > >unsigned >IwmmxtMRC (ARMul_State * state __attribute__ ((__unused__)), > unsigned type __attribute__ ((__unused__)), > ARMword instr, > ARMword * value) >{ > return 1; >} > >unsigned >IwmmxtMCR (ARMul_State * state __attribute__ ((__unused__)), > unsigned type __attribute__ ((__unused__)), > ARMword instr, > ARMword value) >{ > return 1; >} > >unsigned >IwmmxtCDP (ARMul_State * state, unsigned type, ARMword instr) >{ > return 1; >} > > > >static int >TANDC (ARMul_State * state, ARMword instr) >{ > ARMword cpsr; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > > if (( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) != 15) > return 1; > > > if (( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ) != 3) > return 1; > > > if (( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ) != 0) > return 1; > > cpsr = ARMul_GetCPSR (state) & 0x0fffffff; > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > cpsr |= ( (((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (31))) >> (((sizeof (ARMword) * 8 - 1) - (31)) + (28))) & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (27))) >> (((sizeof (ARMword) * 8 - 1) - (27)) + (24))) > & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (23))) >> (((sizeof (ARMword) * 8 - 1) - (23)) + (20))) & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (19))) >> (((sizeof (ARMword) * 8 - 1) - (19)) + (16))) > & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (15))) >> (((sizeof (ARMword) * 8 - 1) - (15)) + (12))) & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (11))) >> (((sizeof (ARMword) * 8 - 1) - (11)) + (8))) > & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (7))) >> (((sizeof (ARMword) * 8 - 1) - (7)) + (4))) & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (3))) >> (((sizeof (ARMword) * 8 - 1) - (3)) + (0)))) << 28); > break; > > case 1: > cpsr |= ( (((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (31))) >> (((sizeof (ARMword) * 8 - 1) - (31)) + (28))) & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (23))) >> (((sizeof (ARMword) * 8 - 1) - (23)) + (20))) > & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (15))) >> (((sizeof (ARMword) * 8 - 1) - (15)) + (12))) & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (7))) >> (((sizeof (ARMword) * 8 - 1) - (7)) + (4)))) << 28); > break; > > case 2: > cpsr |= ((((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (31))) >> (((sizeof (ARMword) * 8 - 1) - (31)) + (28))) & ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (15))) >> (((sizeof (ARMword) * 8 - 1) - (15)) + (12)))) << 28); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > ARMul_SetCPSR (state, cpsr); > > return 0; >} > >static int >TBCST (ARMul_State * state, ARMword instr) >{ > ARMdword Rn; > int wRd; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > Rn = state->Reg [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]; > if (( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) == 15) > Rn &= 0xfffffffc; > > wRd = ( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ); > > switch (( (ARMword)(instr<<(31-(7))) >> ((31-(7))+(6)) )) > { > case 0: > Rn &= 0xff; > wR [wRd] = (Rn << 56) | (Rn << 48) | (Rn << 40) | (Rn << 32) > | (Rn << 24) | (Rn << 16) | (Rn << 8) | Rn; > break; > > case 1: > Rn &= 0xffff; > wR [wRd] = (Rn << 48) | (Rn << 32) | (Rn << 16) | Rn; > break; > > case 2: > Rn &= 0xffffffff; > wR [wRd] = (Rn << 32) | Rn; > break; > > default: > ARMul_UndefInstr (state, instr); > break; > } > > wC [1] |= (1 << 1); > return 0; >} > >static int >TEXTRC (ARMul_State * state, ARMword instr) >{ > ARMword cpsr; > ARMword selector; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > > if (( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) != 15) > return 1; > > > if (( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ) != 3) > return 1; > > > if (( (ARMword)(instr>>(3))&1) != 0) > return 1; > > selector = ( (ARMword)(instr<<(31-(2))) >> ((31-(2))+(0)) ); > cpsr = ARMul_GetCPSR (state) & 0x0fffffff; > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: selector *= 4; break; > case 1: selector = ((selector & 3) * 8) + 4; break; > case 2: selector = ((selector & 1) * 16) + 12; break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > cpsr |= ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (selector + 3))) >> (((sizeof (ARMword) * 8 - 1) - (selector + 3)) + (selector))) << 28; > ARMul_SetCPSR (state, cpsr); > > return 0; >} > >static int >TEXTRM (ARMul_State * state, ARMword instr) >{ > ARMword Rd; > int offset; > int wRn; > int sign; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > wRn = ( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ); > sign = ( (ARMword)(instr>>(3))&1); > offset = ( (ARMword)(instr<<(31-(2))) >> ((31-(2))+(0)) ); > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > offset *= 8; > Rd = ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (offset + 7))) >> (((sizeof (ARMdword) * 8 - 1) - (offset + 7)) + (offset))); > if (sign) > Rd = ((Rd) & 0x80 ? ((Rd) | 0xffffff00) : (Rd)); > break; > > case 1: > offset = (offset & 3) * 16; > Rd = ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (offset + 15))) >> (((sizeof (ARMdword) * 8 - 1) - (offset + 15)) + (offset))); > if (sign) > Rd = ((Rd) & 0x8000 ? ((Rd) | 0xffff0000) : (Rd)); > break; > > case 2: > offset = (offset & 1) * 32; > Rd = ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (offset + 31))) >> (((sizeof (ARMdword) * 8 - 1) - (offset + 31)) + (offset))); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > if (( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) == 15) > ARMul_UndefInstr (state, instr); > else > state->Reg [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = Rd; > > return 0; >} > >static int >TINSR (ARMul_State * state, ARMword instr) >{ > ARMdword data; > ARMword offset; > int wRd; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > wRd = ( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ); > data = state->Reg [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]; > offset = ( (ARMword)(instr<<(31-(2))) >> ((31-(2))+(0)) ); > > switch (( (ARMword)(instr<<(31-(7))) >> ((31-(7))+(6)) )) > { > case 0: > data &= 0xff; > switch (offset) > { > case 0: wR [wRd] = data | (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (8))) << 8); break; > case 1: wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (7))) >> (((sizeof (ARMdword) * 8 - 1) - (7)) + (0))) | (data << 8) | (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (16))) << 16); break; > case 2: wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (15))) >> (((sizeof (ARMdword) * 8 - 1) - (15)) + (0))) | (data << 16) | (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (24))) << 24); break; > case 3: wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (23))) >> (((sizeof (ARMdword) * 8 - 1) - (23)) + (0))) | (data << 24) | (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (32))) << 32); break; > case 4: wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (31))) >> (((sizeof (ARMdword) * 8 - 1) - (31)) + (0))) | (data << 32) | (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (40))) << 40); break; > case 5: wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (39))) >> (((sizeof (ARMdword) * 8 - 1) - (39)) + (0))) | (data << 40) | (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (48))) << 48); break; > case 6: wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (47))) >> (((sizeof (ARMdword) * 8 - 1) - (47)) + (0))) | (data << 48) | (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (56))) << 56); break; > case 7: wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (55))) >> (((sizeof (ARMdword) * 8 - 1) - (55)) + (0))) | (data << 56); break; > } > break; > > case 1: > data &= 0xffff; > > switch (offset & 3) > { > case 0: wR [wRd] = data | (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (16))) << 16); break; > case 1: wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (15))) >> (((sizeof (ARMdword) * 8 - 1) - (15)) + (0))) | (data << 16) | (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (32))) << 32); break; > case 2: wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (31))) >> (((sizeof (ARMdword) * 8 - 1) - (31)) + (0))) | (data << 32) | (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (48))) << 48); break; > case 3: wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (47))) >> (((sizeof (ARMdword) * 8 - 1) - (47)) + (0))) | (data << 48); break; > } > break; > > case 2: > if (offset & 1) > wR [wRd] = ((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (31))) >> (((sizeof (ARMdword) * 8 - 1) - (31)) + (0))) | (data << 32); > else > wR [wRd] = (((ARMdword)(wR[wRd] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (32))) << 32) | data; > break; > > default: > ARMul_UndefInstr (state, instr); > break; > } > > wC [1] |= (1 << 1); > return 0; >} > >static int >TMCR (ARMul_State * state, ARMword instr) >{ > ARMword val; > int wCreg; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > if (( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ) != 0) > return 1; > > val = state->Reg [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]; > if (( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) == 15) > val &= 0xfffffffc; > > wCreg = ( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ); > > switch (wCreg) > { > case 0: > > break; > > case 1: > > wC [1] &= ~ (val & 0x3); > break; > > case 2: > > > wC [2] = (val & 0xff); > wC [1] |= (1 << 0); > break; > > default: > wC [wCreg] = val; > wC [1] |= (1 << 0); > break; > } > > return 0; >} > >static int >TMCRR (ARMul_State * state, ARMword instr) >{ > ARMdword RdHi = state->Reg [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )]; > ARMword RdLo = state->Reg [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > if ((( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ) == 15) || (( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) == 15)) > return 1; > > wR [( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] = (RdHi << 32) | RdLo; > > wC [1] |= (1 << 1); > > return 0; >} > >static int >TMIA (ARMul_State * state, ARMword instr) >{ > signed long long a, b; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > if ((( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ) == 15) || (( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) == 15)) > { > ARMul_UndefInstr (state, instr); > return 0; > } > > a = state->Reg [( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )]; > b = state->Reg [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]; > > a = ((a) & 0x80000000ULL ? ((a) | 0xffffffff00000000ULL) : (a)); > b = ((b) & 0x80000000ULL ? ((b) | 0xffffffff00000000ULL) : (b)); > > wR [( (ARMword)(instr<<(31-(8))) >> ((31-(8))+(5)) )] += a * b; > wC [1] |= (1 << 1); > > return 0; >} > >static int >TMIAPH (ARMul_State * state, ARMword instr) >{ > signed long a, b, result; > signed long long r; > ARMword Rm = state->Reg [( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )]; > ARMword Rs = state->Reg [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > if (( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ) == 15 || ( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) == 15) > { > ARMul_UndefInstr (state, instr); > return 0; > } > > a = ((ARMword)(Rs << ((sizeof (ARMword) * 8 - 1) - (31))) >> (((sizeof (ARMword) * 8 - 1) - (31)) + (16))); > b = ((ARMword)(Rm << ((sizeof (ARMword) * 8 - 1) - (31))) >> (((sizeof (ARMword) * 8 - 1) - (31)) + (16))); > > a = ((a) & 0x8000 ? ((a) | 0xffff0000) : (a)); > b = ((b) & 0x8000 ? ((b) | 0xffff0000) : (b)); > > result = a * b; > > r = result; > r = ((r) & 0x80000000ULL ? ((r) | 0xffffffff00000000ULL) : (r)); > > wR [( (ARMword)(instr<<(31-(8))) >> ((31-(8))+(5)) )] += r; > > a = ((ARMword)(Rs << ((sizeof (ARMword) * 8 - 1) - (15))) >> (((sizeof (ARMword) * 8 - 1) - (15)) + (0))); > b = ((ARMword)(Rm << ((sizeof (ARMword) * 8 - 1) - (15))) >> (((sizeof (ARMword) * 8 - 1) - (15)) + (0))); > > a = ((a) & 0x8000 ? ((a) | 0xffff0000) : (a)); > b = ((b) & 0x8000 ? ((b) | 0xffff0000) : (b)); > > result = a * b; > > r = result; > r = ((r) & 0x80000000ULL ? ((r) | 0xffffffff00000000ULL) : (r)); > > wR [( (ARMword)(instr<<(31-(8))) >> ((31-(8))+(5)) )] += r; > wC [1] |= (1 << 1); > > return 0; >} > >static int >TMIAxy (ARMul_State * state, ARMword instr) >{ > ARMword Rm; > ARMword Rs; > long long temp; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > if (( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ) == 15 || ( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) == 15) > { > ARMul_UndefInstr (state, instr); > return 0; > } > > Rm = state->Reg [( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )]; > if (( (ARMword)(instr>>(17))&1)) > Rm >>= 16; > else > Rm &= 0xffff; > > Rs = state->Reg [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]; > if (( (ARMword)(instr>>(16))&1)) > Rs >>= 16; > else > Rs &= 0xffff; > > if (Rm & (1 << 15)) > Rm -= 1 << 16; > > if (Rs & (1 << 15)) > Rs -= 1 << 16; > > Rm *= Rs; > temp = Rm; > > if (temp & (1 << 31)) > temp -= 1ULL << 32; > > wR [( (ARMword)(instr<<(31-(8))) >> ((31-(8))+(5)) )] += temp; > wC [1] |= (1 << 1); > > return 0; >} > >static int >TMOVMSK (ARMul_State * state, ARMword instr) >{ > ARMdword result; > int wRn; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > > if (( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ) != 0) > return 1; > > wRn = ( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ); > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > result = ( (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (63))) << 7) > | (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (55))) >> (((sizeof (ARMdword) * 8 - 1) - (55)) + (55))) << 6) > | (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (47))) >> (((sizeof (ARMdword) * 8 - 1) - (47)) + (47))) << 5) > | (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (39))) >> (((sizeof (ARMdword) * 8 - 1) - (39)) + (39))) << 4) > | (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (31))) >> (((sizeof (ARMdword) * 8 - 1) - (31)) + (31))) << 3) > | (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (23))) >> (((sizeof (ARMdword) * 8 - 1) - (23)) + (23))) << 2) > | (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (15))) >> (((sizeof (ARMdword) * 8 - 1) - (15)) + (15))) << 1) > | (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (7))) >> (((sizeof (ARMdword) * 8 - 1) - (7)) + (7))) << 0)); > break; > > case 1: > result = ( (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (63))) << 3) > | (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (47))) >> (((sizeof (ARMdword) * 8 - 1) - (47)) + (47))) << 2) > | (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (31))) >> (((sizeof (ARMdword) * 8 - 1) - (31)) + (31))) << 1) > | (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (15))) >> (((sizeof (ARMdword) * 8 - 1) - (15)) + (15))) << 0)); > break; > > case 2: > result = (((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (63))) << 1) | ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (31))) >> (((sizeof (ARMdword) * 8 - 1) - (31)) + (31))); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > state->Reg [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = result; > > return 0; >} > >static int >TMRC (ARMul_State * state, ARMword instr) >{ > int reg = ( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ); > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > if (( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ) != 0) > return 1; > > if (reg == 15) > ARMul_UndefInstr (state, instr); > else > state->Reg [reg] = wC [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )]; > > return 0; >} > >static int >TMRRC (ARMul_State * state, ARMword instr) >{ > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > if ((( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ) == 15) || (( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) == 15) || (( (ARMword)(instr<<(31-(11))) >> ((31-(11))+(4)) ) != 0)) > ARMul_UndefInstr (state, instr); > else > { > state->Reg [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] = ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (32))); > state->Reg [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (31))) >> (((sizeof (ARMdword) * 8 - 1) - (31)) + (0))); > } > > return 0; >} > >static int >TORC (ARMul_State * state, ARMword instr) >{ > ARMword cpsr = ARMul_GetCPSR (state); > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > > if (( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) ) != 15) > return 1; > > > if (( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ) != 3) > return 1; > > > if (( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ) != 0) > return 1; > > cpsr &= 0x0fffffff; > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > cpsr |= ( (((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (31))) >> (((sizeof (ARMword) * 8 - 1) - (31)) + (28))) | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (27))) >> (((sizeof (ARMword) * 8 - 1) - (27)) + (24))) > | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (23))) >> (((sizeof (ARMword) * 8 - 1) - (23)) + (20))) | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (19))) >> (((sizeof (ARMword) * 8 - 1) - (19)) + (16))) > | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (15))) >> (((sizeof (ARMword) * 8 - 1) - (15)) + (12))) | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (11))) >> (((sizeof (ARMword) * 8 - 1) - (11)) + (8))) > | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (7))) >> (((sizeof (ARMword) * 8 - 1) - (7)) + (4))) | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (3))) >> (((sizeof (ARMword) * 8 - 1) - (3)) + (0)))) << 28); > break; > > case 1: > cpsr |= ( (((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (31))) >> (((sizeof (ARMword) * 8 - 1) - (31)) + (28))) | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (23))) >> (((sizeof (ARMword) * 8 - 1) - (23)) + (20))) > | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (15))) >> (((sizeof (ARMword) * 8 - 1) - (15)) + (12))) | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (7))) >> (((sizeof (ARMword) * 8 - 1) - (7)) + (4)))) << 28); > break; > > case 2: > cpsr |= ((((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (31))) >> (((sizeof (ARMword) * 8 - 1) - (31)) + (28))) | ((ARMword)(wC[3] << ((sizeof (ARMword) * 8 - 1) - (15))) >> (((sizeof (ARMword) * 8 - 1) - (15)) + (12)))) << 28); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > ARMul_SetCPSR (state, cpsr); > > return 0; >} > >static int >WACC (ARMul_State * state, ARMword instr) >{ > int wRn; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > wRn = ( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ); > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = > ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (56))) + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (55))) >> (((sizeof (ARMdword) * 8 - 1) - (55)) + (48))) > + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (47))) >> (((sizeof (ARMdword) * 8 - 1) - (47)) + (40))) + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (39))) >> (((sizeof (ARMdword) * 8 - 1) - (39)) + (32))) > + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (31))) >> (((sizeof (ARMdword) * 8 - 1) - (31)) + (24))) + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (23))) >> (((sizeof (ARMdword) * 8 - 1) - (23)) + (16))) > + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (15))) >> (((sizeof (ARMdword) * 8 - 1) - (15)) + (8))) + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (7))) >> (((sizeof (ARMdword) * 8 - 1) - (7)) + (0))); > break; > > case 1: > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = > ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (48))) + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (47))) >> (((sizeof (ARMdword) * 8 - 1) - (47)) + (32))) > + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (31))) >> (((sizeof (ARMdword) * 8 - 1) - (31)) + (16))) + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (15))) >> (((sizeof (ARMdword) * 8 - 1) - (15)) + (0))); > break; > > case 2: > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (32))) + ((ARMdword)(wR[wRn] << ((sizeof (ARMdword) * 8 - 1) - (31))) >> (((sizeof (ARMdword) * 8 - 1) - (31)) + (0))); > break; > > default: > ARMul_UndefInstr (state, instr); > break; > } > > wC [1] |= (1 << 1); > return 0; >} > >static int >WADD (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMdword x; > ARMdword s; > ARMword psr = 0; > int i; > int carry; > int overflow; > int satrv[8]; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; ># 1294 "iwmmxt.c" > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > for (i = 0; i < 8; i++) > { > switch (( (ARMword)(instr<<(31-(21))) >> ((31-(21))+(20)) )) > { > case 0: > s = (*AddS8) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), & carry, & overflow); > satrv [(i)] = 0; > r |= (s & 0xff) << (i * 8); > (psr) |= ((((s) & 0x80) != 0) << ((((i) + 1) * 4) + (-1))); > (psr) |= (((((s) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > (psr) |= ((carry != 0) << ((((i) + 1) * 4) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 4) + (-4))); > break; > > case 1: > s = (*AddU8) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), & carry, & overflow); > x = IwmmxtSaturateU8 (s, satrv + (i)); > r |= (x & 0xff) << (i * 8); > (psr) |= ((((x) & 0x80) != 0) << ((((i) + 1) * 4) + (-1))); > (psr) |= (((((x) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > if (! satrv [(i)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 4) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 4) + (-4))); > } > break; > > case 3: > s = (*AddS8) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), & carry, & overflow); > x = IwmmxtSaturateS8 (s, satrv + (i)); > r |= (x & 0xff) << (i * 8); > (psr) |= ((((x) & 0x80) != 0) << ((((i) + 1) * 4) + (-1))); > (psr) |= (((((x) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > if (! satrv [(i)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 4) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 4) + (-4))); > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > } > break; > > case 1: > satrv[0] = satrv[2] = satrv[4] = satrv[6] = 0; > > for (i = 0; i < 4; i++) > { > switch (( (ARMword)(instr<<(31-(21))) >> ((31-(21))+(20)) )) > { > case 0: > s = (*AddS16) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), & carry, & overflow); > satrv [(((i) + 1) * 2 - 1)] = 0; > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > (psr) |= ((carry != 0) << ((((i) + 1) * 8) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 8) + (-4))); > break; > > case 1: > s = (*AddU16) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), & carry, & overflow); > x = IwmmxtSaturateU16 (s, satrv + (((i) + 1) * 2 - 1)); > r |= (x & 0xffff) << (i * 16); > (psr) |= ((((x) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((x) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > if (! satrv [(((i) + 1) * 2 - 1)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 8) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 8) + (-4))); > } > break; > > case 3: > s = (*AddS16) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), & carry, & overflow); > x = IwmmxtSaturateS16 (s, satrv + (((i) + 1) * 2 - 1)); > r |= (x & 0xffff) << (i * 16); > (psr) |= ((((x) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((x) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > if (! satrv [(((i) + 1) * 2 - 1)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 8) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 8) + (-4))); > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > } > break; > > case 2: > satrv[0] = satrv[1] = satrv[2] = satrv[4] = satrv[5] = satrv[6] = 0; > > for (i = 0; i < 2; i++) > { > switch (( (ARMword)(instr<<(31-(21))) >> ((31-(21))+(20)) )) > { > case 0: > s = (*AddS32) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), & carry, & overflow); > satrv [(((i) + 1) * 4 - 1)] = 0; > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > (psr) |= ((carry != 0) << ((((i) + 1) * 16) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 16) + (-4))); > break; > > case 1: > s = (*AddU32) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), & carry, & overflow); > x = IwmmxtSaturateU32 (s, satrv + (((i) + 1) * 4 - 1)); > r |= (x & 0xffffffff) << (i * 32); > (psr) |= ((((x) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((x) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > if (! satrv [(((i) + 1) * 4 - 1)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 16) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 16) + (-4))); > } > break; > > case 3: > s = (*AddS32) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), & carry, & overflow); > x = IwmmxtSaturateS32 (s, satrv + (((i) + 1) * 4 - 1)); > r |= (x & 0xffffffff) << (i * 32); > (psr) |= ((((x) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((x) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > if (! satrv [(((i) + 1) * 4 - 1)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 16) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 16) + (-4))); > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 1) | (1 << 0)); > > wC[2] = ((((satrv)[7]) != 0) << 7) | ((((satrv)[6]) != 0) << 6) | ((((satrv)[5]) != 0) << 5) | ((((satrv)[4]) != 0) << 4) | ((((satrv)[3]) != 0) << 3) | ((((satrv)[2]) != 0) << 2) | ((((satrv)[1]) != 0) << 1) | ((((satrv)[0]) != 0) << 0);; > > > > return 0; >} > >static int >WALIGNI (ARMword instr) >{ > int shift = ( (ARMword)(instr<<(31-(22))) >> ((31-(22))+(20)) ) * 8; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > if (shift) > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = > ((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (shift))) > | (((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (shift))) >> (((sizeof (ARMdword) * 8 - 1) - (shift)) + (0))) << ((64 - shift))); > else > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = wR [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )]; > > wC [1] |= (1 << 1); > return 0; >} > >static int >WALIGNR (ARMul_State * state, ARMword instr) >{ > int shift = (wC [( (ARMword)(instr<<(31-(21))) >> ((31-(21))+(20)) ) + 8] & 0x7) * 8; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > if (shift) > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = > ((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (63))) >> (((sizeof (ARMdword) * 8 - 1) - (63)) + (shift))) > | (((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (shift))) >> (((sizeof (ARMdword) * 8 - 1) - (shift)) + (0))) << ((64 - shift))); > else > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = wR [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )]; > > wC [1] |= (1 << 1); > return 0; >} > >static int >WAND (ARMword instr) >{ > ARMdword result; > ARMword psr = 0; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > result = wR [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] & wR [( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )]; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = result; > > (psr) |= (((result == 0) != 0) << (32 + (-2))); > (psr) |= (((result & (1ULL << 63)) != 0) << (32 + (-1))); > > wC [3] = psr; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WANDN (ARMword instr) >{ > ARMdword result; > ARMword psr = 0; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > result = wR [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] & ~ wR [( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )]; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = result; > > (psr) |= (((result == 0) != 0) << (32 + (-2))); > (psr) |= (((result & (1ULL << 63)) != 0) << (32 + (-1))); > > wC [3] = psr; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WAVG2 (ARMword instr) >{ > ARMdword r = 0; > ARMword psr = 0; > ARMdword s; > int i; > int round = ( (ARMword)(instr>>(20))&1) ? 1 : 0; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; ># 1576 "iwmmxt.c" > if (( (ARMword)(instr>>(22))&1)) > { > for (i = 0; i < 4; i++) > { > s = (((((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff)) + (((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff)) + round) / 2) & 0xffff; > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > r |= s << (i * 16); > } > } > else > { > for (i = 0; i < 8; i++) > { > s = (((((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff)) + (((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff)) + round) / 2) & 0xff; > (psr) |= (((((s) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > r |= s << (i * 8); > } > } > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [3] = psr; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WCMPEQ (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMword psr = 0; > ARMdword s; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > for (i = 0; i < 8; i++) > { > s = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))) == ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))) ? 0xff : 0; > r |= s << (i * 8); > (psr) |= ((((s) & 0x80) != 0) << ((((i) + 1) * 4) + (-1))); > (psr) |= (((((s) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > } > break; > > case 1: > for (i = 0; i < 4; i++) > { > s = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))) == ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))) ? 0xffff : 0; > r |= s << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > break; > > case 2: > for (i = 0; i < 2; i++) > { > s = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))) == ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))) ? 0xffffffff : 0; > r |= s << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WCMPGT (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMword psr = 0; > ARMdword s; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > if (( (ARMword)(instr>>(21))&1)) > { > > for (i = 0; i < 8; i++) > { > signed char a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > > s = (a > b) ? 0xff : 0; > r |= s << (i * 8); > (psr) |= ((((s) & 0x80) != 0) << ((((i) + 1) * 4) + (-1))); > (psr) |= (((((s) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > } > } > else > { > for (i = 0; i < 8; i++) > { > s = (((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))) > ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8)))) > ? 0xff : 0; > r |= s << (i * 8); > (psr) |= ((((s) & 0x80) != 0) << ((((i) + 1) * 4) + (-1))); > (psr) |= (((((s) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > } > } > break; > > case 1: > if (( (ARMword)(instr>>(21))&1)) > { > for (i = 0; i < 4; i++) > { > signed int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > a = ((a) & 0x8000 ? ((a) | 0xffff0000) : (a)); > > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > b = ((b) & 0x8000 ? ((b) | 0xffff0000) : (b)); > > s = (a > b) ? 0xffff : 0; > r |= s << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > } > else > { > for (i = 0; i < 4; i++) > { > s = (((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))) > ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16)))) > ? 0xffff : 0; > r |= s << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > } > break; > > case 2: > if (( (ARMword)(instr>>(21))&1)) > { > for (i = 0; i < 2; i++) > { > signed long a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > > s = (a > b) ? 0xffffffff : 0; > r |= s << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > } > } > else > { > for (i = 0; i < 2; i++) > { > s = (((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))) > ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32)))) > ? 0xffffffff : 0; > r |= s << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > } > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static ARMword >Compute_Iwmmxt_Address (ARMul_State * state, ARMword instr, int * pFailed) >{ > ARMword Rn; > ARMword addr; > ARMword offset; > ARMword multiplier; > > * pFailed = 0; > Rn = ( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ); > addr = state->Reg [Rn]; > offset = ( (ARMword)(instr<<(31-(7))) >> ((31-(7))+(0)) ); > multiplier = ( (ARMword)(instr>>(8))&1) ? 4 : 1; > > if (( (ARMword)(instr>>(24))&1)) > { > > if (( (ARMword)(instr>>(23))&1)) > addr += offset * multiplier; > else > addr -= offset * multiplier; > > > if (( (ARMword)(instr>>(21))&1)) > { > if (Rn == 15) > { > > > > > * pFailed = 1; > } > else > state->Reg [Rn] = addr; > } > } > else > { > > if (( (ARMword)(instr>>(21))&1)) > { > > if (Rn == 15) > { > > > > > * pFailed = 1; > } > else > { > ARMword increment; > > if (( (ARMword)(instr>>(23))&1)) > increment = offset * multiplier; > else > increment = - (offset * multiplier); > > state->Reg [Rn] = addr + increment; > } > } > else > { > > if (( (ARMword)(instr>>(23))&1) == 0) > { > > > > * pFailed = 1; > } > } > } > > return addr; >} > >static ARMdword >Iwmmxt_Load_Double_Word (ARMul_State * state, ARMword address) >{ > ARMdword value; > > > if (address & 0x7) > { > fprintf (stderr, "iWMMXt: At addr 0x%x: Unaligned double word load from 0x%x\n", > (state->Reg[15] - 8) & ~0x3, address); > > > > > > ARMul_Abort (state, 16L); > } > > > if (! state->bigendSig) > { > value = ARMul_LoadWordN (state, address + 4); > value <<= 32; > value |= ARMul_LoadWordN (state, address); > } > else > { > value = ARMul_LoadWordN (state, address); > value <<= 32; > value |= ARMul_LoadWordN (state, address + 4); > } > > > if (state->Aborted) > ARMul_Abort (state, 16L); > else > ARMul_Icycles (state, 2, 0L); > > return value; >} > >static ARMword >Iwmmxt_Load_Word (ARMul_State * state, ARMword address) >{ > ARMword value; > > > if (address & 3) > { > if ((read_cp15_reg (1, 0, 0) & 0x0002)) > ARMul_Abort (state, 16L); > else > address &= ~ 3; > } > > value = ARMul_LoadWordN (state, address); > > if (state->Aborted) > ARMul_Abort (state, 16L); > else > ARMul_Icycles (state, 1, 0L); > > return value; >} > >static ARMword >Iwmmxt_Load_Half_Word (ARMul_State * state, ARMword address) >{ > ARMword value; > > > if (address & 1) > { > if ((read_cp15_reg (1, 0, 0) & 0x0002)) > ARMul_Abort (state, 16L); > else > address &= ~ 1; > } > > value = ARMul_LoadHalfWord (state, address); > > if (state->Aborted) > ARMul_Abort (state, 16L); > else > ARMul_Icycles (state, 1, 0L); > > return value; >} > >static ARMword >Iwmmxt_Load_Byte (ARMul_State * state, ARMword address) >{ > ARMword value; > > value = ARMul_LoadByte (state, address); > > if (state->Aborted) > ARMul_Abort (state, 16L); > else > ARMul_Icycles (state, 1, 0L); > > return value; >} > >static void >Iwmmxt_Store_Double_Word (ARMul_State * state, ARMword address, ARMdword value) >{ > > if (address & 0x7) > { > fprintf (stderr, "iWMMXt: At addr 0x%x: Unaligned double word store to 0x%x\n", > (state->Reg[15] - 8) & ~0x3, address); > > > > > > ARMul_Abort (state, 16L); > } > > > if (! state->bigendSig) > { > ARMul_StoreWordN (state, address, value); > ARMul_StoreWordN (state, address + 4, value >> 32); > } > else > { > ARMul_StoreWordN (state, address + 4, value); > ARMul_StoreWordN (state, address, value >> 32); > } > > > if (state->Aborted) > ARMul_Abort (state, 16L); > else > ARMul_Icycles (state, 2, 0L); >} > >static void >Iwmmxt_Store_Word (ARMul_State * state, ARMword address, ARMword value) >{ > > if (address & 3) > { > if ((read_cp15_reg (1, 0, 0) & 0x0002)) > ARMul_Abort (state, 16L); > else > address &= ~ 3; > } > > ARMul_StoreWordN (state, address, value); > > if (state->Aborted) > ARMul_Abort (state, 16L); >} > >static void >Iwmmxt_Store_Half_Word (ARMul_State * state, ARMword address, ARMword value) >{ > > if (address & 1) > { > if ((read_cp15_reg (1, 0, 0) & 0x0002)) > ARMul_Abort (state, 16L); > else > address &= ~ 1; > } > > ARMul_StoreHalfWord (state, address, value); > > if (state->Aborted) > ARMul_Abort (state, 16L); >} > >static void >Iwmmxt_Store_Byte (ARMul_State * state, ARMword address, ARMword value) >{ > ARMul_StoreByte (state, address, value); > > if (state->Aborted) > ARMul_Abort (state, 16L); >} > >static int >WLDR (ARMul_State * state, ARMword instr) >{ > ARMword address; > int failed; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > address = Compute_Iwmmxt_Address (state, instr, & failed); > if (failed) > return 1; > > if (( (ARMword)(instr<<(31-(31))) >> ((31-(31))+(28)) ) == 0xf) > { > > wC [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = Iwmmxt_Load_Word (state, address); > } > else if (( (ARMword)(instr>>(8))&1) == 0) > { > if (( (ARMword)(instr>>(22))&1) == 0) > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = Iwmmxt_Load_Byte (state, address); > else > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = Iwmmxt_Load_Half_Word (state, address); > } > else > { > if (( (ARMword)(instr>>(22))&1) == 0) > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = Iwmmxt_Load_Word (state, address); > else > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = Iwmmxt_Load_Double_Word (state, address); > } > > wC [1] |= (1 << 1); > > return 0; >} > >static int >WMAC (ARMword instr) >{ > int i; > ARMdword t = 0; > ARMword a, b; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > for (i = 0; i < 4; i++) > { > if (( (ARMword)(instr>>(21))&1)) > { > > signed long s; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > a = ((a) & 0x8000 ? ((a) | 0xffff0000) : (a)); > > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > b = ((b) & 0x8000 ? ((b) | 0xffff0000) : (b)); > > s = (signed long) a * (signed long) b; > > t = t + (ARMdword) s; > } > else > { > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > > t += a * b; > } > } > > if (( (ARMword)(instr>>(20))&1)) > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = 0; > > if (( (ARMword)(instr>>(21))&1)) > wR[( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] += t; > else > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] += t; > > wC [1] |= (1 << 1); > > return 0; >} > >static int >WMADD (ARMword instr) >{ > ARMdword r = 0; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > for (i = 0; i < 2; i++) > { > ARMdword s1, s2; > > if (( (ARMword)(instr>>(21))&1)) > { > signed long a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i * 2) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i * 2) * 16 + 15)) + ((i * 2) * 16))); > a = ((a) & 0x8000 ? ((a) | 0xffff0000) : (a)); > > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i * 2) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i * 2) * 16 + 15)) + ((i * 2) * 16))); > b = ((b) & 0x8000 ? ((b) | 0xffff0000) : (b)); > > s1 = (ARMdword) (a * b); > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i * 2 + 1) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i * 2 + 1) * 16 + 15)) + ((i * 2 + 1) * 16))); > a = ((a) & 0x8000 ? ((a) | 0xffff0000) : (a)); > > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i * 2 + 1) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i * 2 + 1) * 16 + 15)) + ((i * 2 + 1) * 16))); > b = ((b) & 0x8000 ? ((b) | 0xffff0000) : (b)); > > s2 = (ARMdword) (a * b); > } > else > { > unsigned long a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i * 2) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i * 2) * 16 + 15)) + ((i * 2) * 16))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i * 2) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i * 2) * 16 + 15)) + ((i * 2) * 16))); > > s1 = (ARMdword) (a * b); > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i * 2 + 1) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i * 2 + 1) * 16 + 15)) + ((i * 2 + 1) * 16))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i * 2 + 1) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i * 2 + 1) * 16 + 15)) + ((i * 2 + 1) * 16))); > > s2 = (ARMdword) a * b; > } > > r |= (ARMdword) ((s1 + s2) & 0xffffffff) << (i ? 32 : 0); > } > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= (1 << 1); > > return 0; >} > >static int >WMAX (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMdword s; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > for (i = 0; i < 8; i++) > if (( (ARMword)(instr>>(21))&1)) > { > int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > a = ((a) & 0x80 ? ((a) | 0xffffff00) : (a)); > > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > b = ((b) & 0x80 ? ((b) | 0xffffff00) : (b)); > > if (a > b) > s = a; > else > s = b; > > r |= (s & 0xff) << (i * 8); > } > else > { > unsigned int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > > if (a > b) > s = a; > else > s = b; > > r |= (s & 0xff) << (i * 8); > } > break; > > case 1: > for (i = 0; i < 4; i++) > if (( (ARMword)(instr>>(21))&1)) > { > int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > a = ((a) & 0x8000 ? ((a) | 0xffff0000) : (a)); > > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > b = ((b) & 0x8000 ? ((b) | 0xffff0000) : (b)); > > if (a > b) > s = a; > else > s = b; > > r |= (s & 0xffff) << (i * 16); > } > else > { > unsigned int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > > if (a > b) > s = a; > else > s = b; > > r |= (s & 0xffff) << (i * 16); > } > break; > > case 2: > for (i = 0; i < 2; i++) > if (( (ARMword)(instr>>(21))&1)) > { > int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > > if (a > b) > s = a; > else > s = b; > > r |= (s & 0xffffffff) << (i * 32); > } > else > { > unsigned int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > > if (a > b) > s = a; > else > s = b; > > r |= (s & 0xffffffff) << (i * 32); > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= (1 << 1); > > return 0; >} > >static int >WMIN (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMdword s; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > for (i = 0; i < 8; i++) > if (( (ARMword)(instr>>(21))&1)) > { > int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > a = ((a) & 0x80 ? ((a) | 0xffffff00) : (a)); > > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > b = ((b) & 0x80 ? ((b) | 0xffffff00) : (b)); > > if (a < b) > s = a; > else > s = b; > > r |= (s & 0xff) << (i * 8); > } > else > { > unsigned int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > > if (a < b) > s = a; > else > s = b; > > r |= (s & 0xff) << (i * 8); > } > break; > > case 1: > for (i = 0; i < 4; i++) > if (( (ARMword)(instr>>(21))&1)) > { > int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > a = ((a) & 0x8000 ? ((a) | 0xffff0000) : (a)); > > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > b = ((b) & 0x8000 ? ((b) | 0xffff0000) : (b)); > > if (a < b) > s = a; > else > s = b; > > r |= (s & 0xffff) << (i * 16); > } > else > { > > unsigned int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > > if (a < b) > s = a; > else > s = b; > > r |= (s & 0xffff) << (i * 16); > } > break; > > case 2: > for (i = 0; i < 2; i++) > if (( (ARMword)(instr>>(21))&1)) > { > int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > > if (a < b) > s = a; > else > s = b; > > r |= (s & 0xffffffff) << (i * 32); > } > else > { > unsigned int a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > > if (a < b) > s = a; > else > s = b; > > r |= (s & 0xffffffff) << (i * 32); > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= (1 << 1); > > return 0; >} > >static int >WMUL (ARMword instr) >{ > ARMdword r = 0; > ARMdword s; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > for (i = 0; i < 4; i++) > if (( (ARMword)(instr>>(21))&1)) > { > long a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > a = ((a) & 0x8000 ? ((a) | 0xffff0000) : (a)); > > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > b = ((b) & 0x8000 ? ((b) | 0xffff0000) : (b)); > > s = a * b; > > if (( (ARMword)(instr>>(20))&1)) > r |= ((s >> 16) & 0xffff) << (i * 16); > else > r |= (s & 0xffff) << (i * 16); > } > else > { > unsigned long a, b; > > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > > s = a * b; > > if (( (ARMword)(instr>>(20))&1)) > r |= ((s >> 16) & 0xffff) << (i * 16); > else > r |= (s & 0xffff) << (i * 16); > } > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= (1 << 1); > > return 0; >} > >static int >WOR (ARMword instr) >{ > ARMword psr = 0; > ARMdword result; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > result = wR [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] | wR [( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )]; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = result; > > (psr) |= (((result == 0) != 0) << (32 + (-2))); > (psr) |= (((result & (1ULL << 63)) != 0) << (32 + (-1))); > > wC [3] = psr; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WPACK (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMword psr = 0; > ARMdword x; > ARMdword s; > int i; > int satrv[8]; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 1: > for (i = 0; i < 8; i++) > { > x = ((ARMdword)(wR[(i < 4 ? ( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ) : ( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i & 3) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i & 3) * 16 + 15)) + ((i & 3) * 16))); > > switch (( (ARMword)(instr<<(31-(21))) >> ((31-(21))+(20)) )) > { > case 1: > s = IwmmxtSaturateU8 (x, satrv + (i)); > break; > > case 3: > s = IwmmxtSaturateS8 (x, satrv + (i)); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > r |= (s & 0xff) << (i * 8); > (psr) |= ((((s) & 0x80) != 0) << ((((i) + 1) * 4) + (-1))); > (psr) |= (((((s) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > } > break; > > case 2: > satrv[0] = satrv[2] = satrv[4] = satrv[6] = 0; > > for (i = 0; i < 4; i++) > { > x = ((ARMdword)(wR[(i < 2 ? ( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ) : ( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i & 1) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i & 1) * 32 + 31)) + ((i & 1) * 32))); > > switch (( (ARMword)(instr<<(31-(21))) >> ((31-(21))+(20)) )) > { > case 1: > s = IwmmxtSaturateU16 (x, satrv + (((i) + 1) * 2 - 1)); > break; > > case 3: > s = IwmmxtSaturateS16 (x, satrv + (((i) + 1) * 2 - 1)); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > break; > > case 3: > satrv[0] = satrv[1] = satrv[2] = satrv[4] = satrv[5] = satrv[6] = 0; > > for (i = 0; i < 2; i++) > { > x = wR [i ? ( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ) : ( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )]; > > switch (( (ARMword)(instr<<(31-(21))) >> ((31-(21))+(20)) )) > { > case 1: > s = IwmmxtSaturateU32 (x, satrv + (((i) + 1) * 4 - 1)); > break; > > case 3: > s = IwmmxtSaturateS32 (x, satrv + (((i) + 1) * 4 - 1)); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC[2] = ((((satrv)[7]) != 0) << 7) | ((((satrv)[6]) != 0) << 6) | ((((satrv)[5]) != 0) << 5) | ((((satrv)[4]) != 0) << 4) | ((((satrv)[3]) != 0) << 3) | ((((satrv)[2]) != 0) << 2) | ((((satrv)[1]) != 0) << 1) | ((((satrv)[0]) != 0) << 0);; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WROR (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMdword s; > ARMword psr = 0; > int i; > int shift; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > { unsigned int reg; reg = ( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ); if (( (ARMword)(instr>>(8))&1)) { if (reg < 8 || reg > 11) { ARMul_UndefInstr (state, instr); return 0; } shift = wC [reg]; } else shift = wR [reg]; shift &= 0xff; }; > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 1: > shift &= 0xf; > for (i = 0; i < 4; i++) > { > s = ((((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))) & 0xffff) << (16 - shift)) > | ((((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))) & 0xffff) >> shift); > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > break; > > case 2: > shift &= 0x1f; > for (i = 0; i < 2; i++) > { > s = ((((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))) & 0xffffffff) << (32 - shift)) > | ((((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))) & 0xffffffff) >> shift); > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > } > break; > > case 3: > shift &= 0x3f; > r = (wR [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] >> shift) > | (wR [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << (64 - shift)); > > (psr) |= ((((r) & 0x8000000000000000ULL) != 0) << (32 + (-1))); > (psr) |= (((r == 0) != 0) << (32 + (-2))); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WSAD (ARMword instr) >{ > ARMdword r; > int s; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > > r = ( (ARMword)(instr>>(20))&1) ? 0 : (wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] & 0xffffffff); > > if (( (ARMword)(instr>>(22))&1)) > > for (i = 0; i < 4; i++) > { > s = (((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))) - ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16)))); > r += abs (s); > } > else > > for (i = 0; i < 8; i++) > { > s = (((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))) - ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8)))); > r += abs (s); > } > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= (1 << 1); > > return 0; >} > >static int >WSHUFH (ARMword instr) >{ > ARMdword r = 0; > ARMword psr = 0; > ARMdword s; > int i; > int imm8; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > imm8 = (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(20)) ) << 4) | ( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ); > > for (i = 0; i < 4; i++) > { > s = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((((imm8 >> (i * 2) & 3)) & 0xff) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((((imm8 >> (i * 2) & 3)) & 0xff) * 16 + 15)) + ((((imm8 >> (i * 2) & 3)) & 0xff) * 16))); > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WSLL (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMdword s; > ARMword psr = 0; > int i; > unsigned shift; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > { unsigned int reg; reg = ( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ); if (( (ARMword)(instr>>(8))&1)) { if (reg < 8 || reg > 11) { ARMul_UndefInstr (state, instr); return 0; } shift = wC [reg]; } else shift = wR [reg]; shift &= 0xff; }; > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 1: > for (i = 0; i < 4; i++) > { > if (shift > 15) > s = 0; > else > s = ((((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))) & 0xffff) << shift); > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > break; > > case 2: > for (i = 0; i < 2; i++) > { > if (shift > 31) > s = 0; > else > s = ((((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))) & 0xffffffff) << shift); > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > } > break; > > case 3: > if (shift > 63) > r = 0; > else > r = ((wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] & 0xffffffffffffffffULL) << shift); > > (psr) |= ((((r) & 0x8000000000000000ULL) != 0) << (32 + (-1))); > (psr) |= (((r == 0) != 0) << (32 + (-2))); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WSRA (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMdword s; > ARMword psr = 0; > int i; > unsigned shift; > signed long t; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > { unsigned int reg; reg = ( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ); if (( (ARMword)(instr>>(8))&1)) { if (reg < 8 || reg > 11) { ARMul_UndefInstr (state, instr); return 0; } shift = wC [reg]; } else shift = wR [reg]; shift &= 0xff; }; > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 1: > for (i = 0; i < 4; i++) > { > if (shift > 15) > t = (((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))) & 0x8000) ? 0xffff : 0; > else > { > t = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > t = ((t) & 0x8000 ? ((t) | 0xffff0000) : (t)); > t >>= shift; > } > > s = t; > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > break; > > case 2: > for (i = 0; i < 2; i++) > { > if (shift > 31) > t = (((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))) & 0x80000000) ? 0xffffffff : 0; > else > { > t = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))); > t >>= shift; > } > s = t; > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > } > break; > > case 3: > if (shift > 63) > r = (wR [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] & 0x8000000000000000ULL) ? 0xffffffffffffffffULL : 0; > else > r = ((signed long long) (wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] & 0xffffffffffffffffULL) >> shift); > (psr) |= ((((r) & 0x8000000000000000ULL) != 0) << (32 + (-1))); > (psr) |= (((r == 0) != 0) << (32 + (-2))); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WSRL (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMdword s; > ARMword psr = 0; > int i; > unsigned int shift; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > { unsigned int reg; reg = ( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ); if (( (ARMword)(instr>>(8))&1)) { if (reg < 8 || reg > 11) { ARMul_UndefInstr (state, instr); return 0; } shift = wC [reg]; } else shift = wR [reg]; shift &= 0xff; }; > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 1: > for (i = 0; i < 4; i++) > { > if (shift > 15) > s = 0; > else > s = ((unsigned) (((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))) & 0xffff) >> shift); > > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > break; > > case 2: > for (i = 0; i < 2; i++) > { > if (shift > 31) > s = 0; > else > s = ((unsigned long) (((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 32 + 31)) + ((i) * 32))) & 0xffffffff) >> shift); > > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > } > break; > > case 3: > if (shift > 63) > r = 0; > else > r = (wR [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] & 0xffffffffffffffffULL) >> shift; > > (psr) |= ((((r) & 0x8000000000000000ULL) != 0) << (32 + (-1))); > (psr) |= (((r == 0) != 0) << (32 + (-2))); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WSTR (ARMul_State * state, ARMword instr) >{ > ARMword address; > int failed; > > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > address = Compute_Iwmmxt_Address (state, instr, & failed); > if (failed) > return 1; > > if (( (ARMword)(instr<<(31-(31))) >> ((31-(31))+(28)) ) == 0xf) > { > > Iwmmxt_Store_Word (state, address, wC [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]); > } > else if (( (ARMword)(instr>>(8))&1) == 0) > { > if (( (ARMword)(instr>>(22))&1) == 0) > > Iwmmxt_Store_Byte (state, address, wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]); > else > > Iwmmxt_Store_Half_Word (state, address, wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]); > } > else > { > if (( (ARMword)(instr>>(22))&1) == 0) > > Iwmmxt_Store_Word (state, address, wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]); > else > > Iwmmxt_Store_Double_Word (state, address, wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )]); > } > > return 0; >} > >static int >WSUB (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMword psr = 0; > ARMdword x; > ARMdword s; > int i; > int carry; > int overflow; > int satrv[8]; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; ># 3078 "iwmmxt.c" > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > for (i = 0; i < 8; i++) > { > switch (( (ARMword)(instr<<(31-(21))) >> ((31-(21))+(20)) )) > { > case 0: > s = (*SubS8) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), & carry, & overflow); > satrv [(i)] = 0; > r |= (s & 0xff) << (i * 8); > (psr) |= ((((s) & 0x80) != 0) << ((((i) + 1) * 4) + (-1))); > (psr) |= (((((s) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > (psr) |= ((carry != 0) << ((((i) + 1) * 4) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 4) + (-4))); > break; > > case 1: > s = (*SubU8) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), & carry, & overflow); > x = IwmmxtSaturateU8 (s, satrv + (i)); > r |= (x & 0xff) << (i * 8); > (psr) |= ((((x) & 0x80) != 0) << ((((i) + 1) * 4) + (-1))); > (psr) |= (((((x) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > if (! satrv [(i)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 4) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 4) + (-4))); > } > break; > > case 3: > s = (*SubS8) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 8) + 7))) + (((i * 8))))) & (0xff), & carry, & overflow); > x = IwmmxtSaturateS8 (s, satrv + (i)); > r |= (x & 0xff) << (i * 8); > (psr) |= ((((x) & 0x80) != 0) << ((((i) + 1) * 4) + (-1))); > (psr) |= (((((x) & 0xff) == 0) != 0) << ((((i) + 1) * 4) + (-2))); > if (! satrv [(i)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 4) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 4) + (-4))); > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > } > break; > > case 1: > satrv[0] = satrv[2] = satrv[4] = satrv[6] = 0; > > for (i = 0; i < 4; i++) > { > switch (( (ARMword)(instr<<(31-(21))) >> ((31-(21))+(20)) )) > { > case 0: > s = (*SubU16) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), & carry, & overflow); > satrv [(((i) + 1) * 2 - 1)] = 0; > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > (psr) |= ((carry != 0) << ((((i) + 1) * 8) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 8) + (-4))); > break; > > case 1: > s = (*SubU16) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), & carry, & overflow); > x = IwmmxtSaturateU16 (s, satrv + (((i) + 1) * 2 - 1)); > r |= (x & 0xffff) << (i * 16); > (psr) |= ((((x & 0xffff) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((x) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > if (! satrv [(((i) + 1) * 2 - 1)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 8) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 8) + (-4))); > } > break; > > case 3: > s = (*SubS16) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 16) + 15))) + (((i * 16))))) & (0xffff), & carry, & overflow); > x = IwmmxtSaturateS16 (s, satrv + (((i) + 1) * 2 - 1)); > r |= (x & 0xffff) << (i * 16); > (psr) |= ((((x) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((x) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > if (! satrv [(((i) + 1) * 2 - 1)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 8) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 8) + (-4))); > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > } > break; > > case 2: > satrv[0] = satrv[1] = satrv[2] = satrv[4] = satrv[5] = satrv[6] = 0; > > for (i = 0; i < 2; i++) > { > switch (( (ARMword)(instr<<(31-(21))) >> ((31-(21))+(20)) )) > { > case 0: > s = (*SubU32) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), & carry, & overflow); > satrv[(((i) + 1) * 4 - 1)] = 0; > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > (psr) |= ((carry != 0) << ((((i) + 1) * 16) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 16) + (-4))); > break; > > case 1: > s = (*SubU32) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), & carry, & overflow); > x = IwmmxtSaturateU32 (s, satrv + (((i) + 1) * 4 - 1)); > r |= (x & 0xffffffff) << (i * 32); > (psr) |= ((((x) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((x) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > if (! satrv [(((i) + 1) * 4 - 1)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 16) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 16) + (-4))); > } > break; > > case 3: > s = (*SubS32) (((ARMdword)(wR[( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), ((ARMdword)(wR[( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )] << ((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31)))) >> (((sizeof (ARMdword) * 8 - 1) - (((i * 32) + 31))) + (((i * 32))))) & (0xffffffff), & carry, & overflow); > x = IwmmxtSaturateS32 (s, satrv + (((i) + 1) * 4 - 1)); > r |= (x & 0xffffffff) << (i * 32); > (psr) |= ((((x) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((x) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > if (! satrv [(((i) + 1) * 4 - 1)]) > { > (psr) |= ((carry != 0) << ((((i) + 1) * 16) + (-3))); > (psr) |= ((overflow != 0) << ((((i) + 1) * 16) + (-4))); > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > } > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [3] = psr; > wC[2] = ((((satrv)[7]) != 0) << 7) | ((((satrv)[6]) != 0) << 6) | ((((satrv)[5]) != 0) << 5) | ((((satrv)[4]) != 0) << 4) | ((((satrv)[3]) != 0) << 3) | ((((satrv)[2]) != 0) << 2) | ((((satrv)[1]) != 0) << 1) | ((((satrv)[0]) != 0) << 0);; > wC [1] |= ((1 << 0) | (1 << 1)); > > > > return 0; >} > >static int >WUNPCKEH (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMword psr = 0; > ARMdword s; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > for (i = 0; i < 4; i++) > { > s = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i + 4) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i + 4) * 8 + 7)) + ((i + 4) * 8))); > > if (( (ARMword)(instr>>(21))&1) && ((s) & 0x80)) > s |= 0xff00; > > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > break; > > case 1: > for (i = 0; i < 2; i++) > { > s = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i + 2) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i + 2) * 16 + 15)) + ((i + 2) * 16))); > > if (( (ARMword)(instr>>(21))&1) && ((s) & 0x8000)) > s |= 0xffff0000; > > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > } > break; > > case 2: > r = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((1) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((1) * 32 + 31)) + ((1) * 32))); > > if (( (ARMword)(instr>>(21))&1) && ((r) & 0x80000000)) > r |= 0xffffffff00000000ULL; > > (psr) |= ((((r) & 0x8000000000000000ULL) != 0) << (32 + (-1))); > (psr) |= (((r == 0) != 0) << (32 + (-2))); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WUNPCKEL (ARMul_State * state, ARMword instr) >{ > ARMdword r = 0; > ARMword psr = 0; > ARMdword s; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > for (i = 0; i < 4; i++) > { > s = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > > if (( (ARMword)(instr>>(21))&1) && ((s) & 0x80)) > s |= 0xff00; > > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((s) & 0x8000) != 0) << ((((i) + 1) * 8) + (-1))); > (psr) |= (((((s) & 0xffff) == 0) != 0) << ((((i) + 1) * 8) + (-2))); > } > break; > > case 1: > for (i = 0; i < 2; i++) > { > s = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > > if (( (ARMword)(instr>>(21))&1) && ((s) & 0x8000)) > s |= 0xffff0000; > > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((s) & 0x80000000) != 0) << ((((i) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((i) + 1) * 16) + (-2))); > } > break; > > case 2: > r = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((0) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((0) * 32 + 31)) + ((0) * 32))); > > if (( (ARMword)(instr>>(21))&1) && ((r) & 0x80000000)) > r |= 0xffffffff00000000ULL; > > (psr) |= ((((r) & 0x8000000000000000ULL) != 0) << (32 + (-1))); > (psr) |= (((r == 0) != 0) << (32 + (-2))); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WUNPCKIH (ARMul_State * state, ARMword instr) >{ > ARMword a, b; > ARMdword r = 0; > ARMword psr = 0; > ARMdword s; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > for (i = 0; i < 4; i++) > { > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i + 4) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i + 4) * 8 + 7)) + ((i + 4) * 8))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i + 4) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i + 4) * 8 + 7)) + ((i + 4) * 8))); > s = a | (b << 8); > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((a) & 0x80) != 0) << ((((i * 2) + 1) * 4) + (-1))); > (psr) |= (((((a) & 0xff) == 0) != 0) << ((((i * 2) + 1) * 4) + (-2))); > (psr) |= ((((b) & 0x80) != 0) << (((((i * 2) + 1) + 1) * 4) + (-1))); > (psr) |= (((((b) & 0xff) == 0) != 0) << (((((i * 2) + 1) + 1) * 4) + (-2))); > } > break; > > case 1: > for (i = 0; i < 2; i++) > { > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i + 2) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i + 2) * 16 + 15)) + ((i + 2) * 16))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i + 2) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i + 2) * 16 + 15)) + ((i + 2) * 16))); > s = a | (b << 16); > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((a) & 0x8000) != 0) << (((((i * 2)) + 1) * 8) + (-1))); > (psr) |= (((((a) & 0xffff) == 0) != 0) << (((((i * 2)) + 1) * 8) + (-2))); > (psr) |= ((((b) & 0x8000) != 0) << (((((i * 2) + 1) + 1) * 8) + (-1))); > (psr) |= (((((b) & 0xffff) == 0) != 0) << (((((i * 2) + 1) + 1) * 8) + (-2))); > } > break; > > case 2: > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((1) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((1) * 32 + 31)) + ((1) * 32))); > s = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((1) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((1) * 32 + 31)) + ((1) * 32))); > r = a | (s << 32); > > (psr) |= ((((a) & 0x80000000) != 0) << ((((0) + 1) * 16) + (-1))); > (psr) |= (((((a) & 0xffffffff) == 0) != 0) << ((((0) + 1) * 16) + (-2))); > (psr) |= ((((s) & 0x80000000) != 0) << ((((1) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((1) + 1) * 16) + (-2))); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WUNPCKIL (ARMul_State * state, ARMword instr) >{ > ARMword a, b; > ARMdword r = 0; > ARMword psr = 0; > ARMdword s; > int i; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > switch (( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(22)) )) > { > case 0: > for (i = 0; i < 4; i++) > { > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 8 + 7)) + ((i) * 8))); > s = a | (b << 8); > r |= (s & 0xffff) << (i * 16); > (psr) |= ((((a) & 0x80) != 0) << ((((i * 2) + 1) * 4) + (-1))); > (psr) |= (((((a) & 0xff) == 0) != 0) << ((((i * 2) + 1) * 4) + (-2))); > (psr) |= ((((b) & 0x80) != 0) << (((((i * 2) + 1) + 1) * 4) + (-1))); > (psr) |= (((((b) & 0xff) == 0) != 0) << (((((i * 2) + 1) + 1) * 4) + (-2))); > } > break; > > case 1: > for (i = 0; i < 2; i++) > { > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > b = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15))) >> (((sizeof (ARMdword) * 8 - 1) - ((i) * 16 + 15)) + ((i) * 16))); > s = a | (b << 16); > r |= (s & 0xffffffff) << (i * 32); > (psr) |= ((((a) & 0x8000) != 0) << (((((i * 2)) + 1) * 8) + (-1))); > (psr) |= (((((a) & 0xffff) == 0) != 0) << (((((i * 2)) + 1) * 8) + (-2))); > (psr) |= ((((b) & 0x8000) != 0) << (((((i * 2) + 1) + 1) * 8) + (-1))); > (psr) |= (((((b) & 0xffff) == 0) != 0) << (((((i * 2) + 1) + 1) * 8) + (-2))); > } > break; > > case 2: > a = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((0) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((0) * 32 + 31)) + ((0) * 32))); > s = ((ARMdword)(wR[(( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) ))] << ((sizeof (ARMdword) * 8 - 1) - ((0) * 32 + 31))) >> (((sizeof (ARMdword) * 8 - 1) - ((0) * 32 + 31)) + ((0) * 32))); > r = a | (s << 32); > > (psr) |= ((((a) & 0x80000000) != 0) << ((((0) + 1) * 16) + (-1))); > (psr) |= (((((a) & 0xffffffff) == 0) != 0) << ((((0) + 1) * 16) + (-2))); > (psr) |= ((((s) & 0x80000000) != 0) << ((((1) + 1) * 16) + (-1))); > (psr) |= (((((s) & 0xffffffff) == 0) != 0) << ((((1) + 1) * 16) + (-2))); > break; > > default: > ARMul_UndefInstr (state, instr); > return 0; > } > > wC [3] = psr; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = r; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > >static int >WXOR (ARMword instr) >{ > ARMword psr = 0; > ARMdword result; > > if ((read_cp15_reg (15, 0, 1) & 3) != 3) > return 1; > > > > > > result = wR [( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )] ^ wR [( (ARMword)(instr<<(31-(3))) >> ((31-(3))+(0)) )]; > wR [( (ARMword)(instr<<(31-(15))) >> ((31-(15))+(12)) )] = result; > > (psr) |= (((result == 0) != 0) << (32 + (-2))); > (psr) |= (((result & (1ULL << 63)) != 0) << (32 + (-1))); > > wC [3] = psr; > wC [1] |= ((1 << 0) | (1 << 1)); > > return 0; >} > > > > >static int >Process_Instruction (ARMul_State * state, ARMword instr) >{ > int status = 2; > > switch ((( (ARMword)(instr<<(31-(23))) >> ((31-(23))+(20)) ) << 8) | ( (ARMword)(instr<<(31-(11))) >> ((31-(11))+(4)) )) > { > case 0x000: status = WOR (instr); break; > case 0x011: status = TMCR (state, instr); break; > case 0x100: status = WXOR (instr); break; > case 0x111: status = TMRC (state, instr); break; > case 0x300: status = WANDN (instr); break; > case 0x200: status = WAND (instr); break; > > case 0x810: case 0xa10: > status = WMADD (instr); break; > > case 0x10e: case 0x50e: case 0x90e: case 0xd0e: > status = WUNPCKIL (state, instr); break; > case 0x10c: case 0x50c: case 0x90c: case 0xd0c: > status = WUNPCKIH (state, instr); break; > case 0x012: case 0x112: case 0x412: case 0x512: > status = WSAD (instr); break; > case 0x010: case 0x110: case 0x210: case 0x310: > status = WMUL (instr); break; > case 0x410: case 0x510: case 0x610: case 0x710: > status = WMAC (instr); break; > case 0x006: case 0x406: case 0x806: case 0xc06: > status = WCMPEQ (state, instr); break; > case 0x800: case 0x900: case 0xc00: case 0xd00: > status = WAVG2 (instr); break; > case 0x802: case 0x902: case 0xa02: case 0xb02: > status = WALIGNR (state, instr); break; > case 0x601: case 0x605: case 0x609: case 0x60d: > status = TINSR (state, instr); break; > case 0x107: case 0x507: case 0x907: case 0xd07: > status = TEXTRM (state, instr); break; > case 0x117: case 0x517: case 0x917: case 0xd17: > status = TEXTRC (state, instr); break; > case 0x401: case 0x405: case 0x409: case 0x40d: > status = TBCST (state, instr); break; > case 0x113: case 0x513: case 0x913: case 0xd13: > status = TANDC (state, instr); break; > case 0x01c: case 0x41c: case 0x81c: case 0xc1c: > status = WACC (state, instr); break; > case 0x115: case 0x515: case 0x915: case 0xd15: > status = TORC (state, instr); break; > case 0x103: case 0x503: case 0x903: case 0xd03: > status = TMOVMSK (state, instr); break; > case 0x106: case 0x306: case 0x506: case 0x706: > case 0x906: case 0xb06: case 0xd06: case 0xf06: > status = WCMPGT (state, instr); break; > case 0x00e: case 0x20e: case 0x40e: case 0x60e: > case 0x80e: case 0xa0e: case 0xc0e: case 0xe0e: > status = WUNPCKEL (state, instr); break; > case 0x00c: case 0x20c: case 0x40c: case 0x60c: > case 0x80c: case 0xa0c: case 0xc0c: case 0xe0c: > status = WUNPCKEH (state, instr); break; > case 0x204: case 0x604: case 0xa04: case 0xe04: > case 0x214: case 0x614: case 0xa14: case 0xe14: > status = WSRL (state, instr); break; > case 0x004: case 0x404: case 0x804: case 0xc04: > case 0x014: case 0x414: case 0x814: case 0xc14: > status = WSRA (state, instr); break; > case 0x104: case 0x504: case 0x904: case 0xd04: > case 0x114: case 0x514: case 0x914: case 0xd14: > status = WSLL (state, instr); break; > case 0x304: case 0x704: case 0xb04: case 0xf04: > case 0x314: case 0x714: case 0xb14: case 0xf14: > status = WROR (state, instr); break; > case 0x116: case 0x316: case 0x516: case 0x716: > case 0x916: case 0xb16: case 0xd16: case 0xf16: > status = WMIN (state, instr); break; > case 0x016: case 0x216: case 0x416: case 0x616: > case 0x816: case 0xa16: case 0xc16: case 0xe16: > status = WMAX (state, instr); break; > case 0x002: case 0x102: case 0x202: case 0x302: > case 0x402: case 0x502: case 0x602: case 0x702: > status = WALIGNI (instr); break; > case 0x01a: case 0x11a: case 0x21a: case 0x31a: > case 0x41a: case 0x51a: case 0x61a: case 0x71a: > case 0x81a: case 0x91a: case 0xa1a: case 0xb1a: > case 0xc1a: case 0xd1a: case 0xe1a: case 0xf1a: > status = WSUB (state, instr); break; > case 0x01e: case 0x11e: case 0x21e: case 0x31e: > case 0x41e: case 0x51e: case 0x61e: case 0x71e: > case 0x81e: case 0x91e: case 0xa1e: case 0xb1e: > case 0xc1e: case 0xd1e: case 0xe1e: case 0xf1e: > status = WSHUFH (instr); break; > case 0x018: case 0x118: case 0x218: case 0x318: > case 0x418: case 0x518: case 0x618: case 0x718: > case 0x818: case 0x918: case 0xa18: case 0xb18: > case 0xc18: case 0xd18: case 0xe18: case 0xf18: > status = WADD (state, instr); break; > case 0x008: case 0x108: case 0x208: case 0x308: > case 0x408: case 0x508: case 0x608: case 0x708: > case 0x808: case 0x908: case 0xa08: case 0xb08: > case 0xc08: case 0xd08: case 0xe08: case 0xf08: > status = WPACK (state, instr); break; > case 0x201: case 0x203: case 0x205: case 0x207: > case 0x209: case 0x20b: case 0x20d: case 0x20f: > case 0x211: case 0x213: case 0x215: case 0x217: > case 0x219: case 0x21b: case 0x21d: case 0x21f: > switch (( (ARMword)(instr<<(31-(19))) >> ((31-(19))+(16)) )) > { > case 0x0: status = TMIA (state, instr); break; > case 0x8: status = TMIAPH (state, instr); break; > case 0xc: > case 0xd: > case 0xe: > case 0xf: status = TMIAxy (state, instr); break; > default: break; > } > break; > default: > break; > } > return status; >} > > > > >int >ARMul_HandleIwmmxt (ARMul_State * state, ARMword instr) >{ > int status = 2; > > if (( (ARMword)(instr<<(31-(27))) >> ((31-(27))+(24)) ) == 0xe) > { > status = Process_Instruction (state, instr); > } > else if (( (ARMword)(instr<<(31-(27))) >> ((31-(27))+(25)) ) == 0x6) > { > if (( (ARMword)(instr<<(31-(11))) >> ((31-(11))+(4)) ) == 0x0 && ( (ARMword)(instr<<(31-(24))) >> ((31-(24))+(20)) ) == 0x4) > status = TMCRR (state, instr); > else if (( (ARMword)(instr<<(31-(11))) >> ((31-(11))+(9)) ) == 0x0) > { > if (( (ARMword)(instr>>(20))&1) == 0x0) > status = WSTR (state, instr); > else if (( (ARMword)(instr<<(31-(24))) >> ((31-(24))+(20)) ) == 0x5) > status = TMRRC (state, instr); > else > status = WLDR (state, instr); > } > } > > if (status == 1) > { > > > > > > ARMul_Abort (state, 4L); > status = 0; > } > > return status == 0; >} > >int >Fetch_Iwmmxt_Register (unsigned int regnum, unsigned char * memory) >{ > if (regnum >= 16) > { > memcpy (memory, wC + (regnum - 16), sizeof wC [0]); > return sizeof wC [0]; > } > else > { > memcpy (memory, wR + regnum, sizeof wR [0]); > return sizeof wR [0]; > } >} > >int >Store_Iwmmxt_Register (unsigned int regnum, unsigned char * memory) >{ > if (regnum >= 16) > { > memcpy (wC + (regnum - 16), memory, sizeof wC [0]); > return sizeof wC [0]; > } > else > { > memcpy (wR + regnum, memory, sizeof wR [0]); > return sizeof wR [0]; > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 915830
: 702973