Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // /usr/lib/gcc/arm-linux-gnueabihf/4.6/cc1 -quiet -I ./advance/osd -I ./src -I ./src/includes -I ./src/debug -I obj/mame/linux/blend/cpu/m68000 -I ./src/cpu/m68000 -imultilib . -imultiarch arm-linux-gnueabihf -D HAVE_CONFIG_H -D USE_LSB -D NDEBUG -D _REENTRANT -D MAME -D PI=M_PI -D stricmp=strcasecmp -D strnicmp=strncasecmp -D LSB_FIRST -D INLINE=static __inline__ -D asm=__asm__ -D HAS_ARM=1 -D HAS_ARM7=1 -D HAS_SE3208=1 -D HAS_ALPHA8201=1 -D HAS_ALPHA8301=1 -D HAS_ADSP2100=1 -D HAS_ADSP2101=1 -D HAS_ADSP2104=1 -D HAS_ADSP2105=1 -D HAS_ADSP2115=1 -D HAS_ADSP2181=1 -D HAS_ADSP21062=1 -D HAS_DSP32C=1 -D HAS_ASAP=1 -D HAS_JAGUAR=1 -D HAS_CCPU=1 -D HAS_T11=1 -D HAS_G65816=1 -D HAS_HD6309=1 -D HAS_H83002=1 -D HAS_SH2=1 -D HAS_H6280=1 -D HAS_E116T=1 -D HAS_E116XT=0 -D HAS_E116XS=0 -D HAS_E116XSR=0 -D HAS_E132N=1 -D HAS_E132T=0 -D HAS_E132XN=0 -D HAS_E132XT=1 -D HAS_E132XS=0 -D HAS_E132XSR=0 -D HAS_GMS30C2116=1 -D HAS_GMS30C2132=0 -D HAS_GMS30C2216=0 -D HAS_GMS30C2232=0 -D HAS_8080=1 -D HAS_8085A=1 -D HAS_I8035=1 -D HAS_I8039=1 -D HAS_I8048=1 -D HAS_N7751=1 -D HAS_I8X41=1 -D HAS_I8051=1 -D HAS_I8052=1 -D HAS_I8751=1 -D HAS_I8752=1 -D HAS_I86=1 -D HAS_I88=1 -D HAS_I186=1 -D HAS_I188=0 -D HAS_I286=0 -D HAS_I386=1 -D HAS_I486=0 -D HAS_PENTIUM=1 -D HAS_MEDIAGX=1 -D HAS_I960=1 -D HAS_KONAMI=1 -D HAS_PIC16C54=0 -D HAS_PIC16C55=1 -D HAS_PIC16C56=0 -D HAS_PIC16C57=1 -D HAS_PIC16C58=0 -D HAS_R3000=1 -D HAS_R4600=1 -D HAS_R4650=1 -D HAS_R4700=1 -D HAS_R5000=1 -D HAS_QED5271=1 -D HAS_RM7000=1 -D HAS_M37702=1 -D HAS_M37710=1 -D HAS_M6502=1 -D HAS_M65C02=1 -D HAS_M65SC02=1 -D HAS_M65CE02=0 -D HAS_M6509=0 -D HAS_M6510=1 -D HAS_M6510T=0 -D HAS_M7501=0 -D HAS_M8502=0 -D HAS_N2A03=1 -D HAS_DECO16=1 -D HAS_M4510=0 -D HAS_M6800=1 -D HAS_M6801=1 -D HAS_M6802=1 -D HAS_M6803=1 -D HAS_M6808=1 -D HAS_HD63701=1 -D HAS_NSC8105=1 -D HAS_M6805=1 -D HAS_M68705=1 -D HAS_HD63705=1 -D HAS_M6809=1 -D HAS_M6809E=1 -D HAS_MC68HC11=1 -D HAS_M68000=1 -D HAS_M68008=0 -D HAS_M68010=1 -D HAS_M68EC020=1 -D HAS_M68020=1 -D HAS_M68040=1 -D HAS_DSP56156=1 -D HAS_PPC403=1 -D HAS_PPC602=1 -D HAS_PPC603=1 -D HAS_V20=1 -D HAS_V30=1 -D HAS_V33=1 -D HAS_V60=1 -D HAS_V70=1 -D HAS_V810=1 -D HAS_UPD7810=1 -D HAS_UPD7807=1 -D HAS_RSP=1 -D HAS_S2650=1 -D HAS_SPC700=1 -D HAS_PSXCPU=1 -D HAS_TMS9900=0 -D HAS_TMS9940=0 -D HAS_TMS9980=1 -D HAS_TMS9985=0 -D HAS_TMS9989=0 -D HAS_TMS9995=1 -D HAS_TMS99105A=0 -D HAS_TMS99110A=0 -D HAS_TMS99000=0 -D HAS_TI990_10=0 -D HAS_TMS34010=1 -D HAS_TMS34020=1 -D HAS_TMS32010=1 -D HAS_TMS32025=1 -D HAS_TMS32026=1 -D HAS_TMS32031=1 -D HAS_TMS32051=1 -D HAS_Z80=1 -D HAS_Z180=1 -D HAS_Z8000=1 -D HAS_CUSTOM=1 -D HAS_SAMPLES=1 -D HAS_DAC=1 -D HAS_DMADAC=1 -D HAS_CDDA=1 -D HAS_DISCRETE=1 -D HAS_POKEY=1 -D HAS_TIA=1 -D HAS_ASTROCADE=1 -D HAS_CEM3394=1 -D HAS_BSMT2000=1 -D HAS_ES5503=1 -D HAS_ES5505=1 -D HAS_ES5506=1 -D HAS_ES8712=1 -D HAS_GAELCO_CG1V=1 -D HAS_GAELCO_GAE1=1 -D HAS_AY8910=1 -D HAS_HC55516=1 -D HAS_C6280=1 -D HAS_ICS2115=1 -D HAS_IREMGA20=1 -D HAS_K005289=1 -D HAS_K007232=1 -D HAS_K051649=1 -D HAS_K053260=1 -D HAS_K054539=1 -D HAS_NAMCO=1 -D HAS_NAMCO_15XX=1 -D HAS_NAMCO_CUS30=1 -D HAS_NAMCO_52XX=1 -D HAS_NAMCO_54XX=1 -D HAS_NAMCO_63701X=1 -D HAS_NAMCONA=1 -D HAS_C140=1 -D HAS_C352=1 -D HAS_NES=1 -D HAS_UPD7759=1 -D HAS_MSM5205=1 -D HAS_MSM5232=1 -D HAS_OKIM6295=1 -D HAS_SAA1099=1 -D HAS_QSOUND=1 -D HAS_RF5C68=1 -D HAS_RF5C400=1 -D HAS_SEGAPCM=1 -D HAS_MULTIPCM=1 -D HAS_SCSP=1 -D HAS_ST0016=1 -D HAS_X1_010=1 -D HAS_PSXSPU=1 -D HAS_SP0250=1 -D HAS_SN76477=1 -D HAS_SN76496=1 -D HAS_TMS36XX=1 -D HAS_TMS5110=1 -D HAS_TMS5220=1 -D HAS_VLM5030=1 -D HAS_VOTRAX=0 -D HAS_VRENDER0=1 -D HAS_YM2151=1 -D HAS_YM2203=1 -D HAS_YM2413=1 -D HAS_YM2608=1 -D HAS_YM2610=1 -D HAS_YM2610B=1 -D HAS_YM2612=1 -D HAS_YM3438=1 -D HAS_YM3812=1 -D HAS_YM3526=1 -D HAS_Y8950=1 -D HAS_YMF262=1 -D HAS_YMF271=1 -D HAS_YMF278B=1 -D HAS_YMZ280B=1 src/cpu/sh2/sh2.c -quiet -dumpbase sh2.c -march=armv6 -mfloat-abi=hard -mfpu=vfp -auxbase-strip obj/mame/linux/blend/cpu/sh2/sh2.o -O2 -Wall -Wno-sign-compare -Wno-unused -fomit-frame-pointer -fno-merge-constants -o - -frandom-seed=0
- # 1 "src/cpu/sh2/sh2.c"
- # 1 "<built-in>"
- # 1 "<command-line>"
- # 1 "src/cpu/sh2/sh2.c"
- # 103 "src/cpu/sh2/sh2.c"
- # 1 "/usr/include/signal.h" 1 3 4
- # 29 "/usr/include/signal.h" 3 4
- # 1 "/usr/include/features.h" 1 3 4
- # 323 "/usr/include/features.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/predefs.h" 1 3 4
- # 324 "/usr/include/features.h" 2 3 4
- # 356 "/usr/include/features.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 1 3 4
- # 359 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4
- # 360 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 2 3 4
- # 357 "/usr/include/features.h" 2 3 4
- # 388 "/usr/include/features.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/gnu/stubs.h" 1 3 4
- # 389 "/usr/include/features.h" 2 3 4
- # 30 "/usr/include/signal.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 1 3 4
- # 24 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 3 4
- typedef int __sig_atomic_t;
- typedef struct
- {
- unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
- } __sigset_t;
- # 104 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 3 4
- extern int __sigismember (__const __sigset_t *, int);
- extern int __sigaddset (__sigset_t *, int);
- extern int __sigdelset (__sigset_t *, int);
- # 118 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 3 4
- extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; }
- extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); }
- extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); }
- # 34 "/usr/include/signal.h" 2 3 4
- typedef __sig_atomic_t sig_atomic_t;
- typedef __sigset_t sigset_t;
- # 1 "/usr/include/arm-linux-gnueabihf/bits/types.h" 1 3 4
- # 28 "/usr/include/arm-linux-gnueabihf/bits/types.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4
- # 29 "/usr/include/arm-linux-gnueabihf/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;
- # 131 "/usr/include/arm-linux-gnueabihf/bits/types.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/typesizes.h" 1 3 4
- # 132 "/usr/include/arm-linux-gnueabihf/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 long int __swblk_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 __ssize_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;
- # 58 "/usr/include/signal.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/signum.h" 1 3 4
- # 59 "/usr/include/signal.h" 2 3 4
- typedef __pid_t pid_t;
- typedef __uid_t uid_t;
- # 1 "/usr/include/time.h" 1 3 4
- # 120 "/usr/include/time.h" 3 4
- struct timespec
- {
- __time_t tv_sec;
- long int tv_nsec;
- };
- # 77 "/usr/include/signal.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 1 3 4
- # 25 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4
- # 26 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 2 3 4
- typedef union sigval
- {
- int sival_int;
- void *sival_ptr;
- } sigval_t;
- # 51 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 3 4
- typedef struct siginfo
- {
- int si_signo;
- int si_errno;
- int si_code;
- union
- {
- int _pad[((128 / sizeof (int)) - 3)];
- struct
- {
- __pid_t si_pid;
- __uid_t si_uid;
- } _kill;
- struct
- {
- int si_tid;
- int si_overrun;
- sigval_t si_sigval;
- } _timer;
- struct
- {
- __pid_t si_pid;
- __uid_t si_uid;
- sigval_t si_sigval;
- } _rt;
- struct
- {
- __pid_t si_pid;
- __uid_t si_uid;
- int si_status;
- __clock_t si_utime;
- __clock_t si_stime;
- } _sigchld;
- struct
- {
- void *si_addr;
- } _sigfault;
- struct
- {
- long int si_band;
- int si_fd;
- } _sigpoll;
- } _sifields;
- } siginfo_t;
- # 129 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 3 4
- enum
- {
- SI_ASYNCNL = -60,
- SI_TKILL = -6,
- SI_SIGIO,
- SI_ASYNCIO,
- SI_MESGQ,
- SI_TIMER,
- SI_QUEUE,
- SI_USER,
- SI_KERNEL = 0x80
- };
- enum
- {
- ILL_ILLOPC = 1,
- ILL_ILLOPN,
- ILL_ILLADR,
- ILL_ILLTRP,
- ILL_PRVOPC,
- ILL_PRVREG,
- ILL_COPROC,
- ILL_BADSTK
- };
- enum
- {
- FPE_INTDIV = 1,
- FPE_INTOVF,
- FPE_FLTDIV,
- FPE_FLTOVF,
- FPE_FLTUND,
- FPE_FLTRES,
- FPE_FLTINV,
- FPE_FLTSUB
- };
- enum
- {
- SEGV_MAPERR = 1,
- SEGV_ACCERR
- };
- enum
- {
- BUS_ADRALN = 1,
- BUS_ADRERR,
- BUS_OBJERR
- };
- enum
- {
- TRAP_BRKPT = 1,
- TRAP_TRACE
- };
- enum
- {
- CLD_EXITED = 1,
- CLD_KILLED,
- CLD_DUMPED,
- CLD_TRAPPED,
- CLD_STOPPED,
- CLD_CONTINUED
- };
- enum
- {
- POLL_IN = 1,
- POLL_OUT,
- POLL_MSG,
- POLL_ERR,
- POLL_PRI,
- POLL_HUP
- };
- # 273 "/usr/include/arm-linux-gnueabihf/bits/siginfo.h" 3 4
- typedef struct sigevent
- {
- sigval_t sigev_value;
- int sigev_signo;
- int sigev_notify;
- union
- {
- int _pad[((64 / sizeof (int)) - 3)];
- __pid_t _tid;
- struct
- {
- void (*_function) (sigval_t);
- void *_attribute;
- } _sigev_thread;
- } _sigev_un;
- } sigevent_t;
- enum
- {
- SIGEV_SIGNAL = 0,
- SIGEV_NONE,
- SIGEV_THREAD,
- SIGEV_THREAD_ID = 4
- };
- # 80 "/usr/include/signal.h" 2 3 4
- typedef void (*__sighandler_t) (int);
- extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
- __attribute__ ((__nothrow__));
- # 99 "/usr/include/signal.h" 3 4
- extern __sighandler_t signal (int __sig, __sighandler_t __handler)
- __attribute__ ((__nothrow__));
- # 113 "/usr/include/signal.h" 3 4
- # 126 "/usr/include/signal.h" 3 4
- extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__));
- extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__));
- extern int raise (int __sig) __attribute__ ((__nothrow__));
- extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
- __attribute__ ((__nothrow__));
- extern int gsignal (int __sig) __attribute__ ((__nothrow__));
- extern void psignal (int __sig, __const char *__s);
- extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s);
- # 168 "/usr/include/signal.h" 3 4
- extern int __sigpause (int __sig_or_mask, int __is_sig);
- # 196 "/usr/include/signal.h" 3 4
- extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
- extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
- extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
- # 216 "/usr/include/signal.h" 3 4
- typedef __sighandler_t sig_t;
- extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int sigismember (__const sigset_t *__set, int __signo)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- # 252 "/usr/include/signal.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/sigaction.h" 1 3 4
- # 25 "/usr/include/arm-linux-gnueabihf/bits/sigaction.h" 3 4
- struct sigaction
- {
- union
- {
- __sighandler_t sa_handler;
- void (*sa_sigaction) (int, siginfo_t *, void *);
- }
- __sigaction_handler;
- __sigset_t sa_mask;
- int sa_flags;
- void (*sa_restorer) (void);
- };
- # 253 "/usr/include/signal.h" 2 3 4
- extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
- sigset_t *__restrict __oset) __attribute__ ((__nothrow__));
- extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
- extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
- struct sigaction *__restrict __oact) __attribute__ ((__nothrow__));
- extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
- __attribute__ ((__nonnull__ (1, 2)));
- extern int sigwaitinfo (__const sigset_t *__restrict __set,
- siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
- extern int sigtimedwait (__const sigset_t *__restrict __set,
- siginfo_t *__restrict __info,
- __const struct timespec *__restrict __timeout)
- __attribute__ ((__nonnull__ (1)));
- extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
- __attribute__ ((__nothrow__));
- # 310 "/usr/include/signal.h" 3 4
- extern __const char *__const _sys_siglist[65];
- extern __const char *__const sys_siglist[65];
- struct sigvec
- {
- __sighandler_t sv_handler;
- int sv_mask;
- int sv_flags;
- };
- # 334 "/usr/include/signal.h" 3 4
- extern int sigvec (int __sig, __const struct sigvec *__vec,
- struct sigvec *__ovec) __attribute__ ((__nothrow__));
- # 1 "/usr/include/arm-linux-gnueabihf/bits/sigcontext.h" 1 3 4
- # 28 "/usr/include/arm-linux-gnueabihf/bits/sigcontext.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/asm/sigcontext.h" 1 3 4
- # 9 "/usr/include/arm-linux-gnueabihf/asm/sigcontext.h" 3 4
- struct sigcontext {
- unsigned long trap_no;
- unsigned long error_code;
- unsigned long oldmask;
- unsigned long arm_r0;
- unsigned long arm_r1;
- unsigned long arm_r2;
- unsigned long arm_r3;
- unsigned long arm_r4;
- unsigned long arm_r5;
- unsigned long arm_r6;
- unsigned long arm_r7;
- unsigned long arm_r8;
- unsigned long arm_r9;
- unsigned long arm_r10;
- unsigned long arm_fp;
- unsigned long arm_ip;
- unsigned long arm_sp;
- unsigned long arm_lr;
- unsigned long arm_pc;
- unsigned long arm_cpsr;
- unsigned long fault_address;
- };
- # 29 "/usr/include/arm-linux-gnueabihf/bits/sigcontext.h" 2 3 4
- # 340 "/usr/include/signal.h" 2 3 4
- extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__));
- # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4
- # 212 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 3 4
- typedef unsigned int size_t;
- # 350 "/usr/include/signal.h" 2 3 4
- extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__));
- # 1 "/usr/include/arm-linux-gnueabihf/bits/sigstack.h" 1 3 4
- # 26 "/usr/include/arm-linux-gnueabihf/bits/sigstack.h" 3 4
- struct sigstack
- {
- void *ss_sp;
- int ss_onstack;
- };
- enum
- {
- SS_ONSTACK = 1,
- SS_DISABLE
- };
- # 50 "/usr/include/arm-linux-gnueabihf/bits/sigstack.h" 3 4
- typedef struct sigaltstack
- {
- void *ss_sp;
- int ss_flags;
- size_t ss_size;
- } stack_t;
- # 357 "/usr/include/signal.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/sys/ucontext.h" 1 3 4
- # 25 "/usr/include/arm-linux-gnueabihf/sys/ucontext.h" 3 4
- # 1 "/usr/include/signal.h" 1 3 4
- # 26 "/usr/include/arm-linux-gnueabihf/sys/ucontext.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/sigcontext.h" 1 3 4
- # 30 "/usr/include/arm-linux-gnueabihf/sys/ucontext.h" 2 3 4
- typedef int greg_t;
- typedef greg_t gregset_t[18];
- enum
- {
- REG_R0 = 0,
- REG_R1 = 1,
- REG_R2 = 2,
- REG_R3 = 3,
- REG_R4 = 4,
- REG_R5 = 5,
- REG_R6 = 6,
- REG_R7 = 7,
- REG_R8 = 8,
- REG_R9 = 9,
- REG_R10 = 10,
- REG_R11 = 11,
- REG_R12 = 12,
- REG_R13 = 13,
- REG_R14 = 14,
- REG_R15 = 15
- };
- struct _libc_fpstate
- {
- struct
- {
- unsigned int sign1:1;
- unsigned int unused:15;
- unsigned int sign2:1;
- unsigned int exponent:14;
- unsigned int j:1;
- unsigned int mantissa1:31;
- unsigned int mantissa0:32;
- } fpregs[8];
- unsigned int fpsr:32;
- unsigned int fpcr:32;
- unsigned char ftype[8];
- unsigned int init_flag;
- };
- typedef struct _libc_fpstate fpregset_t;
- typedef struct sigcontext mcontext_t;
- typedef struct ucontext
- {
- unsigned long uc_flags;
- struct ucontext *uc_link;
- stack_t uc_stack;
- mcontext_t uc_mcontext;
- __sigset_t uc_sigmask;
- unsigned long uc_regspace[128] __attribute__((__aligned__(8)));
- } ucontext_t;
- # 360 "/usr/include/signal.h" 2 3 4
- extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
- __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
- extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
- struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__));
- # 394 "/usr/include/signal.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 1 3 4
- # 22 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 3 4
- # 1 "/usr/include/endian.h" 1 3 4
- # 37 "/usr/include/endian.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/endian.h" 1 3 4
- # 38 "/usr/include/endian.h" 2 3 4
- # 61 "/usr/include/endian.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/byteswap.h" 1 3 4
- # 62 "/usr/include/endian.h" 2 3 4
- # 23 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 2 3 4
- # 38 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 3 4
- typedef unsigned long int pthread_t;
- typedef union
- {
- char __size[36];
- long int __align;
- } 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;
- # 141 "/usr/include/arm-linux-gnueabihf/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;
- # 395 "/usr/include/signal.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/sigthread.h" 1 3 4
- # 31 "/usr/include/arm-linux-gnueabihf/bits/sigthread.h" 3 4
- extern int pthread_sigmask (int __how,
- __const __sigset_t *__restrict __newmask,
- __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__));
- extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__));
- # 396 "/usr/include/signal.h" 2 3 4
- extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__));
- extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__));
- # 104 "src/cpu/sh2/sh2.c" 2
- # 1 "./src/debugger.h" 1
- # 12 "./src/debugger.h"
- # 1 "./src/mame.h" 1
- # 15 "./src/mame.h"
- # 1 "./src/mamecore.h" 1
- # 12 "./src/mamecore.h"
- # 1 "/usr/include/stdio.h" 1 3 4
- # 30 "/usr/include/stdio.h" 3 4
- # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4
- # 35 "/usr/include/stdio.h" 2 3 4
- # 45 "/usr/include/stdio.h" 3 4
- struct _IO_FILE;
- typedef struct _IO_FILE FILE;
- # 65 "/usr/include/stdio.h" 3 4
- typedef struct _IO_FILE __FILE;
- # 75 "/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/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4
- # 16 "/usr/include/_G_config.h" 2 3 4
- # 1 "/usr/include/wchar.h" 1 3 4
- # 83 "/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;
- # 53 "/usr/include/_G_config.h" 3 4
- typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
- typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
- typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
- typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
- # 33 "/usr/include/libio.h" 2 3 4
- # 53 "/usr/include/libio.h" 3 4
- # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stdarg.h" 1 3 4
- # 40 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stdarg.h" 3 4
- typedef __builtin_va_list __gnuc_va_list;
- # 54 "/usr/include/libio.h" 2 3 4
- # 170 "/usr/include/libio.h" 3 4
- struct _IO_jump_t; struct _IO_FILE;
- # 180 "/usr/include/libio.h" 3 4
- typedef void _IO_lock_t;
- struct _IO_marker {
- struct _IO_marker *_next;
- struct _IO_FILE *_sbuf;
- int _pos;
- # 203 "/usr/include/libio.h" 3 4
- };
- enum __codecvt_result
- {
- __codecvt_ok,
- __codecvt_partial,
- __codecvt_error,
- __codecvt_noconv
- };
- # 271 "/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;
- # 319 "/usr/include/libio.h" 3 4
- __off64_t _offset;
- # 328 "/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_;
- # 364 "/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);
- # 416 "/usr/include/libio.h" 3 4
- extern int __underflow (_IO_FILE *);
- extern int __uflow (_IO_FILE *);
- extern int __overflow (_IO_FILE *, int);
- # 460 "/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__));
- extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));
- extern int _IO_peekc_locked (_IO_FILE *__fp);
- extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
- extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
- extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
- # 490 "/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__));
- # 76 "/usr/include/stdio.h" 2 3 4
- typedef __gnuc_va_list va_list;
- # 91 "/usr/include/stdio.h" 3 4
- typedef __off_t off_t;
- # 103 "/usr/include/stdio.h" 3 4
- typedef __ssize_t ssize_t;
- typedef _G_fpos_t fpos_t;
- # 161 "/usr/include/stdio.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/stdio_lim.h" 1 3 4
- # 162 "/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__));
- extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
- extern int renameat (int __oldfd, __const char *__old, int __newfd,
- __const char *__new) __attribute__ ((__nothrow__));
- extern FILE *tmpfile (void) ;
- # 206 "/usr/include/stdio.h" 3 4
- extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ;
- extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ;
- # 224 "/usr/include/stdio.h" 3 4
- extern char *tempnam (__const char *__dir, __const char *__pfx)
- __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
- extern int fclose (FILE *__stream);
- extern int fflush (FILE *__stream);
- # 249 "/usr/include/stdio.h" 3 4
- extern int fflush_unlocked (FILE *__stream);
- # 263 "/usr/include/stdio.h" 3 4
- extern FILE *fopen (__const char *__restrict __filename,
- __const char *__restrict __modes) ;
- extern FILE *freopen (__const char *__restrict __filename,
- __const char *__restrict __modes,
- FILE *__restrict __stream) ;
- # 292 "/usr/include/stdio.h" 3 4
- # 303 "/usr/include/stdio.h" 3 4
- extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ;
- # 316 "/usr/include/stdio.h" 3 4
- extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
- __attribute__ ((__nothrow__)) ;
- extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) ;
- extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
- extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
- int __modes, size_t __n) __attribute__ ((__nothrow__));
- extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
- size_t __size) __attribute__ ((__nothrow__));
- extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
- 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)));
- # 414 "/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)));
- extern int fscanf (FILE *__restrict __stream,
- __const char *__restrict __format, ...) ;
- extern int scanf (__const char *__restrict __format, ...) ;
- extern int sscanf (__const char *__restrict __s,
- __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
- # 445 "/usr/include/stdio.h" 3 4
- extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf")
- ;
- extern int scanf (__const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf")
- ;
- extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__))
- ;
- # 465 "/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))) ;
- extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
- __attribute__ ((__format__ (__scanf__, 1, 0))) ;
- extern int vsscanf (__const char *__restrict __s,
- __const char *__restrict __format, __gnuc_va_list __arg)
- __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
- # 496 "/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))) ;
- extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
- __attribute__ ((__format__ (__scanf__, 1, 0))) ;
- extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__))
- __attribute__ ((__format__ (__scanf__, 2, 0)));
- # 524 "/usr/include/stdio.h" 3 4
- extern int fgetc (FILE *__stream);
- extern int getc (FILE *__stream);
- extern int getchar (void);
- # 552 "/usr/include/stdio.h" 3 4
- extern int getc_unlocked (FILE *__stream);
- extern int getchar_unlocked (void);
- # 563 "/usr/include/stdio.h" 3 4
- extern int fgetc_unlocked (FILE *__stream);
- extern int fputc (int __c, FILE *__stream);
- extern int putc (int __c, FILE *__stream);
- extern int putchar (int __c);
- # 596 "/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);
- extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
- ;
- extern char *gets (char *__s) ;
- # 658 "/usr/include/stdio.h" 3 4
- extern __ssize_t __getdelim (char **__restrict __lineptr,
- size_t *__restrict __n, int __delimiter,
- FILE *__restrict __stream) ;
- extern __ssize_t getdelim (char **__restrict __lineptr,
- size_t *__restrict __n, int __delimiter,
- FILE *__restrict __stream) ;
- extern __ssize_t getline (char **__restrict __lineptr,
- size_t *__restrict __n,
- FILE *__restrict __stream) ;
- 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) ;
- extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __s);
- # 730 "/usr/include/stdio.h" 3 4
- extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __stream) ;
- extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __stream);
- extern int fseek (FILE *__stream, long int __off, int __whence);
- extern long int ftell (FILE *__stream) ;
- extern void rewind (FILE *__stream);
- # 766 "/usr/include/stdio.h" 3 4
- extern int fseeko (FILE *__stream, __off_t __off, int __whence);
- extern __off_t ftello (FILE *__stream) ;
- # 785 "/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);
- # 808 "/usr/include/stdio.h" 3 4
- # 817 "/usr/include/stdio.h" 3 4
- extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
- extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;
- extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;
- extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
- extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
- extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
- extern void perror (__const char *__s);
- # 1 "/usr/include/arm-linux-gnueabihf/bits/sys_errlist.h" 1 3 4
- # 27 "/usr/include/arm-linux-gnueabihf/bits/sys_errlist.h" 3 4
- extern int sys_nerr;
- extern __const char *__const sys_errlist[];
- # 847 "/usr/include/stdio.h" 2 3 4
- extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;
- extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
- # 866 "/usr/include/stdio.h" 3 4
- extern FILE *popen (__const char *__command, __const char *__modes) ;
- extern int pclose (FILE *__stream);
- extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
- # 906 "/usr/include/stdio.h" 3 4
- extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
- extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;
- extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
- # 927 "/usr/include/stdio.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/stdio.h" 1 3 4
- # 36 "/usr/include/arm-linux-gnueabihf/bits/stdio.h" 3 4
- extern __inline int
- vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
- {
- return vfprintf (stdout, __fmt, __arg);
- }
- 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)));
- }
- # 125 "/usr/include/arm-linux-gnueabihf/bits/stdio.h" 3 4
- extern __inline int
- __attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream)
- {
- return (((__stream)->_flags & 0x10) != 0);
- }
- extern __inline int
- __attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream)
- {
- return (((__stream)->_flags & 0x20) != 0);
- }
- # 928 "/usr/include/stdio.h" 2 3 4
- # 936 "/usr/include/stdio.h" 3 4
- # 18 "./src/mamecore.h" 2
- # 1 "/usr/include/string.h" 1 3 4
- # 29 "/usr/include/string.h" 3 4
- # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4
- # 35 "/usr/include/string.h" 2 3 4
- extern void *memcpy (void *__restrict __dest,
- __const void *__restrict __src, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern void *memmove (void *__dest, __const void *__src, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
- int __c, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- # 95 "/usr/include/string.h" 3 4
- extern void *memchr (__const void *__s, int __c, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
- # 126 "/usr/include/string.h" 3 4
- extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern char *strncpy (char *__restrict __dest,
- __const char *__restrict __src, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
- size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int strcmp (__const char *__s1, __const char *__s2)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int strcoll (__const char *__s1, __const char *__s2)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- extern size_t strxfrm (char *__restrict __dest,
- __const char *__restrict __src, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- # 1 "/usr/include/xlocale.h" 1 3 4
- # 28 "/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;
- # 163 "/usr/include/string.h" 2 3 4
- extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
- __attribute__ ((__nothrow__)) __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__)) __attribute__ ((__nonnull__ (2, 4)));
- extern char *strdup (__const char *__s)
- __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
- extern char *strndup (__const char *__string, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
- # 210 "/usr/include/string.h" 3 4
- # 235 "/usr/include/string.h" 3 4
- extern char *strchr (__const char *__s, int __c)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
- # 262 "/usr/include/string.h" 3 4
- extern char *strrchr (__const char *__s, int __c)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
- # 281 "/usr/include/string.h" 3 4
- extern size_t strcspn (__const char *__s, __const char *__reject)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- extern size_t strspn (__const char *__s, __const char *__accept)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- # 314 "/usr/include/string.h" 3 4
- extern char *strpbrk (__const char *__s, __const char *__accept)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- # 342 "/usr/include/string.h" 3 4
- extern char *strstr (__const char *__haystack, __const char *__needle)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- extern char *__strtok_r (char *__restrict __s,
- __const char *__restrict __delim,
- char **__restrict __save_ptr)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
- extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
- char **__restrict __save_ptr)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
- # 397 "/usr/include/string.h" 3 4
- extern size_t strlen (__const char *__s)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
- extern size_t strnlen (__const char *__string, size_t __maxlen)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
- extern char *strerror (int __errnum) __attribute__ ((__nothrow__));
- # 427 "/usr/include/string.h" 3 4
- extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__))
- __attribute__ ((__nonnull__ (2)));
- # 445 "/usr/include/string.h" 3 4
- extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__));
- extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern void bcopy (__const void *__src, void *__dest, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- # 489 "/usr/include/string.h" 3 4
- extern char *index (__const char *__s, int __c)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
- # 517 "/usr/include/string.h" 3 4
- extern char *rindex (__const char *__s, int __c)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
- extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
- # 536 "/usr/include/string.h" 3 4
- extern int strcasecmp (__const char *__s1, __const char *__s2)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
- # 559 "/usr/include/string.h" 3 4
- extern char *strsep (char **__restrict __stringp,
- __const char *__restrict __delim)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern char *strsignal (int __sig) __attribute__ ((__nothrow__));
- extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern char *__stpncpy (char *__restrict __dest,
- __const char *__restrict __src, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern char *stpncpy (char *__restrict __dest,
- __const char *__restrict __src, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- # 634 "/usr/include/string.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/string.h" 1 3 4
- # 635 "/usr/include/string.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 1 3 4
- # 80 "/usr/include/arm-linux-gnueabihf/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;
- # 394 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4
- extern void *__rawmemchr (const void *__s, int __c);
- # 969 "/usr/include/arm-linux-gnueabihf/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;
- }
- # 1045 "/usr/include/arm-linux-gnueabihf/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;
- }
- # 1121 "/usr/include/arm-linux-gnueabihf/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;
- }
- # 1172 "/usr/include/arm-linux-gnueabihf/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;
- }
- # 1204 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4
- extern char *__strsep_g (char **__stringp, __const char *__delim);
- # 1222 "/usr/include/arm-linux-gnueabihf/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;
- }
- # 1298 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4
- # 1 "/usr/include/stdlib.h" 1 3 4
- # 33 "/usr/include/stdlib.h" 3 4
- # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4
- # 34 "/usr/include/stdlib.h" 2 3 4
- # 469 "/usr/include/stdlib.h" 3 4
- extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
- extern void *calloc (size_t __nmemb, size_t __size)
- __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
- # 964 "/usr/include/stdlib.h" 3 4
- # 1299 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 2 3 4
- extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
- # 1322 "/usr/include/arm-linux-gnueabihf/bits/string2.h" 3 4
- extern char *__strndup (__const char *__string, size_t __n)
- __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
- # 638 "/usr/include/string.h" 2 3 4
- # 646 "/usr/include/string.h" 3 4
- # 19 "./src/mamecore.h" 2
- # 1 "/usr/include/stdlib.h" 1 3 4
- # 33 "/usr/include/stdlib.h" 3 4
- # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4
- # 324 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 3 4
- typedef unsigned int wchar_t;
- # 34 "/usr/include/stdlib.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/waitflags.h" 1 3 4
- # 43 "/usr/include/stdlib.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/waitstatus.h" 1 3 4
- # 67 "/usr/include/arm-linux-gnueabihf/bits/waitstatus.h" 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;
- };
- # 44 "/usr/include/stdlib.h" 2 3 4
- # 68 "/usr/include/stdlib.h" 3 4
- typedef union
- {
- union wait *__uptr;
- int *__iptr;
- } __WAIT_STATUS __attribute__ ((__transparent_union__));
- # 96 "/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;
- # 140 "/usr/include/stdlib.h" 3 4
- extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ;
- extern double atof (__const char *__nptr)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
- extern int atoi (__const char *__nptr)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
- extern long int atol (__const char *__nptr)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
- __extension__ extern long long int atoll (__const char *__nptr)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
- extern double strtod (__const char *__restrict __nptr,
- char **__restrict __endptr)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- extern float strtof (__const char *__restrict __nptr,
- char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- extern long double strtold (__const char *__restrict __nptr,
- char **__restrict __endptr)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- extern long int strtol (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- extern unsigned long int strtoul (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- __extension__
- extern long long int strtoq (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- __extension__
- extern unsigned long long int strtouq (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- __extension__
- extern long long int strtoll (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- __extension__
- extern unsigned long long int strtoull (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- # 277 "/usr/include/stdlib.h" 3 4
- extern __inline double
- __attribute__ ((__nothrow__)) atof (__const char *__nptr)
- {
- return strtod (__nptr, (char **) ((void *)0));
- }
- extern __inline int
- __attribute__ ((__nothrow__)) atoi (__const char *__nptr)
- {
- return (int) strtol (__nptr, (char **) ((void *)0), 10);
- }
- extern __inline long int
- __attribute__ ((__nothrow__)) atol (__const char *__nptr)
- {
- return strtol (__nptr, (char **) ((void *)0), 10);
- }
- __extension__ extern __inline long long int
- __attribute__ ((__nothrow__)) atoll (__const char *__nptr)
- {
- return strtoll (__nptr, (char **) ((void *)0), 10);
- }
- # 311 "/usr/include/stdlib.h" 3 4
- extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ;
- extern long int a64l (__const char *__s)
- __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
- # 1 "/usr/include/arm-linux-gnueabihf/sys/types.h" 1 3 4
- # 28 "/usr/include/arm-linux-gnueabihf/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;
- # 61 "/usr/include/arm-linux-gnueabihf/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;
- # 105 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4
- typedef __id_t id_t;
- # 116 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4
- typedef __daddr_t daddr_t;
- typedef __caddr_t caddr_t;
- typedef __key_t key_t;
- # 133 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4
- # 1 "/usr/include/time.h" 1 3 4
- # 58 "/usr/include/time.h" 3 4
- typedef __clock_t clock_t;
- # 74 "/usr/include/time.h" 3 4
- typedef __time_t time_t;
- # 92 "/usr/include/time.h" 3 4
- typedef __clockid_t clockid_t;
- # 104 "/usr/include/time.h" 3 4
- typedef __timer_t timer_t;
- # 134 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4
- # 147 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4
- # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4
- # 148 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4
- typedef unsigned long int ulong;
- typedef unsigned short int ushort;
- typedef unsigned int uint;
- # 195 "/usr/include/arm-linux-gnueabihf/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__)));
- # 220 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/sys/select.h" 1 3 4
- # 31 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/select.h" 1 3 4
- # 32 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/sigset.h" 1 3 4
- # 35 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4
- # 44 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4
- # 1 "/usr/include/time.h" 1 3 4
- # 45 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/time.h" 1 3 4
- # 75 "/usr/include/arm-linux-gnueabihf/bits/time.h" 3 4
- struct timeval
- {
- __time_t tv_sec;
- __suseconds_t tv_usec;
- };
- # 47 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4
- typedef __suseconds_t suseconds_t;
- typedef long int __fd_mask;
- # 67 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4
- typedef struct
- {
- __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
- } fd_set;
- typedef __fd_mask fd_mask;
- # 99 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4
- # 109 "/usr/include/arm-linux-gnueabihf/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);
- # 121 "/usr/include/arm-linux-gnueabihf/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);
- # 221 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/sys/sysmacros.h" 1 3 4
- # 30 "/usr/include/arm-linux-gnueabihf/sys/sysmacros.h" 3 4
- __extension__
- extern unsigned int gnu_dev_major (unsigned long long int __dev)
- __attribute__ ((__nothrow__));
- __extension__
- extern unsigned int gnu_dev_minor (unsigned long long int __dev)
- __attribute__ ((__nothrow__));
- __extension__
- extern unsigned long long int gnu_dev_makedev (unsigned int __major,
- unsigned int __minor)
- __attribute__ ((__nothrow__));
- __extension__ extern __inline unsigned int
- __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
- {
- return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
- }
- __extension__ extern __inline unsigned int
- __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
- {
- return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
- }
- __extension__ extern __inline unsigned long long int
- __attribute__ ((__nothrow__)) 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));
- }
- # 224 "/usr/include/arm-linux-gnueabihf/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;
- # 274 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4
- # 321 "/usr/include/stdlib.h" 2 3 4
- extern long int random (void) __attribute__ ((__nothrow__));
- extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));
- extern char *initstate (unsigned int __seed, char *__statebuf,
- size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __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__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int srandom_r (unsigned int __seed, struct random_data *__buf)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
- size_t __statelen,
- struct random_data *__restrict __buf)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
- extern int setstate_r (char *__restrict __statebuf,
- struct random_data *__restrict __buf)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int rand (void) __attribute__ ((__nothrow__));
- extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));
- extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));
- extern double drand48 (void) __attribute__ ((__nothrow__));
- extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern long int lrand48 (void) __attribute__ ((__nothrow__));
- extern long int nrand48 (unsigned short int __xsubi[3])
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern long int mrand48 (void) __attribute__ ((__nothrow__));
- extern long int jrand48 (unsigned short int __xsubi[3])
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
- extern unsigned short int *seed48 (unsigned short int __seed16v[3])
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __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__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int erand48_r (unsigned short int __xsubi[3],
- struct drand48_data *__restrict __buffer,
- double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int lrand48_r (struct drand48_data *__restrict __buffer,
- long int *__restrict __result)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int nrand48_r (unsigned short int __xsubi[3],
- struct drand48_data *__restrict __buffer,
- long int *__restrict __result)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int mrand48_r (struct drand48_data *__restrict __buffer,
- long int *__restrict __result)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int jrand48_r (unsigned short int __xsubi[3],
- struct drand48_data *__restrict __buffer,
- long int *__restrict __result)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- extern int seed48_r (unsigned short int __seed16v[3],
- struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int lcong48_r (unsigned short int __param[7],
- struct drand48_data *__buffer)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- # 479 "/usr/include/stdlib.h" 3 4
- extern void *realloc (void *__ptr, size_t __size)
- __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
- extern void free (void *__ptr) __attribute__ ((__nothrow__));
- extern void cfree (void *__ptr) __attribute__ ((__nothrow__));
- # 1 "/usr/include/alloca.h" 1 3 4
- # 25 "/usr/include/alloca.h" 3 4
- # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stddef.h" 1 3 4
- # 26 "/usr/include/alloca.h" 2 3 4
- extern void *alloca (size_t __size) __attribute__ ((__nothrow__));
- # 498 "/usr/include/stdlib.h" 2 3 4
- extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;
- extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
- extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- # 531 "/usr/include/stdlib.h" 3 4
- extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
- # 554 "/usr/include/stdlib.h" 3 4
- extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
- extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- extern char *__secure_getenv (__const char *__name)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int setenv (__const char *__name, __const char *__value, int __replace)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int clearenv (void) __attribute__ ((__nothrow__));
- # 606 "/usr/include/stdlib.h" 3 4
- extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- # 620 "/usr/include/stdlib.h" 3 4
- extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
- # 642 "/usr/include/stdlib.h" 3 4
- extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
- # 663 "/usr/include/stdlib.h" 3 4
- extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- # 712 "/usr/include/stdlib.h" 3 4
- extern int system (__const char *__command) ;
- # 734 "/usr/include/stdlib.h" 3 4
- extern char *realpath (__const char *__restrict __name,
- char *__restrict __resolved) __attribute__ ((__nothrow__)) ;
- typedef int (*__compar_fn_t) (__const void *, __const void *);
- # 752 "/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))) ;
- extern void qsort (void *__base, size_t __nmemb, size_t __size,
- __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
- # 771 "/usr/include/stdlib.h" 3 4
- extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
- extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
- __extension__ extern long long int llabs (long long int __x)
- __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
- extern div_t div (int __numer, int __denom)
- __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
- extern ldiv_t ldiv (long int __numer, long int __denom)
- __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
- __extension__ extern lldiv_t lldiv (long long int __numer,
- long long int __denom)
- __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
- # 808 "/usr/include/stdlib.h" 3 4
- extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
- int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
- extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
- int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
- extern char *gcvt (double __value, int __ndigit, char *__buf)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;
- extern char *qecvt (long double __value, int __ndigit,
- int *__restrict __decpt, int *__restrict __sign)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
- extern char *qfcvt (long double __value, int __ndigit,
- int *__restrict __decpt, int *__restrict __sign)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
- extern char *qgcvt (long double __value, int __ndigit, char *__buf)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;
- extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
- int *__restrict __sign, char *__restrict __buf,
- size_t __len) __attribute__ ((__nothrow__)) __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__)) __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__)) __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__)) __attribute__ ((__nonnull__ (3, 4, 5)));
- extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ;
- extern int mbtowc (wchar_t *__restrict __pwc,
- __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ;
- extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ;
- extern size_t mbstowcs (wchar_t *__restrict __pwcs,
- __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));
- extern size_t wcstombs (char *__restrict __s,
- __const wchar_t *__restrict __pwcs, size_t __n)
- __attribute__ ((__nothrow__));
- extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
- # 896 "/usr/include/stdlib.h" 3 4
- extern int getsubopt (char **__restrict __optionp,
- char *__const *__restrict __tokens,
- char **__restrict __valuep)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;
- # 948 "/usr/include/stdlib.h" 3 4
- extern int getloadavg (double __loadavg[], int __nelem)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- # 964 "/usr/include/stdlib.h" 3 4
- # 20 "./src/mamecore.h" 2
- # 1 "./advance/osd/osd_cpu.h" 1
- # 34 "./advance/osd/osd_cpu.h"
- # 1 "./advance/osd/osdutils.h" 1
- # 35 "./advance/osd/osdutils.h"
- # 1 "/usr/include/ctype.h" 1 3 4
- # 30 "/usr/include/ctype.h" 3 4
- # 48 "/usr/include/ctype.h" 3 4
- enum
- {
- _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
- _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
- _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
- _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
- _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
- _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
- _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
- _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
- _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
- _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
- _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
- _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
- };
- # 81 "/usr/include/ctype.h" 3 4
- extern __const unsigned short int **__ctype_b_loc (void)
- __attribute__ ((__nothrow__)) __attribute__ ((__const));
- extern __const __int32_t **__ctype_tolower_loc (void)
- __attribute__ ((__nothrow__)) __attribute__ ((__const));
- extern __const __int32_t **__ctype_toupper_loc (void)
- __attribute__ ((__nothrow__)) __attribute__ ((__const));
- # 96 "/usr/include/ctype.h" 3 4
- extern int isalnum (int) __attribute__ ((__nothrow__));
- extern int isalpha (int) __attribute__ ((__nothrow__));
- extern int iscntrl (int) __attribute__ ((__nothrow__));
- extern int isdigit (int) __attribute__ ((__nothrow__));
- extern int islower (int) __attribute__ ((__nothrow__));
- extern int isgraph (int) __attribute__ ((__nothrow__));
- extern int isprint (int) __attribute__ ((__nothrow__));
- extern int ispunct (int) __attribute__ ((__nothrow__));
- extern int isspace (int) __attribute__ ((__nothrow__));
- extern int isupper (int) __attribute__ ((__nothrow__));
- extern int isxdigit (int) __attribute__ ((__nothrow__));
- extern int tolower (int __c) __attribute__ ((__nothrow__));
- extern int toupper (int __c) __attribute__ ((__nothrow__));
- extern int isblank (int) __attribute__ ((__nothrow__));
- # 142 "/usr/include/ctype.h" 3 4
- extern int isascii (int __c) __attribute__ ((__nothrow__));
- extern int toascii (int __c) __attribute__ ((__nothrow__));
- extern int _toupper (int) __attribute__ ((__nothrow__));
- extern int _tolower (int) __attribute__ ((__nothrow__));
- # 190 "/usr/include/ctype.h" 3 4
- extern __inline int
- __attribute__ ((__nothrow__)) tolower (int __c)
- {
- return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
- }
- extern __inline int
- __attribute__ ((__nothrow__)) toupper (int __c)
- {
- return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
- }
- # 247 "/usr/include/ctype.h" 3 4
- extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__));
- extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
- extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
- extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
- extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
- # 323 "/usr/include/ctype.h" 3 4
- # 36 "./advance/osd/osdutils.h" 2
- # 1 "/usr/lib/gcc/arm-linux-gnueabihf/4.6/include/stdarg.h" 1 3 4
- # 39 "./advance/osd/osdutils.h" 2
- # 1 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 1 3 4
- # 39 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4
- # 1 "/usr/include/time.h" 1 3 4
- # 40 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 2 3 4
- # 105 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4
- # 1 "/usr/include/arm-linux-gnueabihf/bits/stat.h" 1 3 4
- # 39 "/usr/include/arm-linux-gnueabihf/bits/stat.h" 3 4
- struct stat
- {
- __dev_t st_dev;
- unsigned short int __pad1;
- __ino_t st_ino;
- __mode_t st_mode;
- __nlink_t st_nlink;
- __uid_t st_uid;
- __gid_t st_gid;
- __dev_t st_rdev;
- unsigned short int __pad2;
- __off_t st_size;
- __blksize_t st_blksize;
- __blkcnt_t st_blocks;
- # 73 "/usr/include/arm-linux-gnueabihf/bits/stat.h" 3 4
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
- # 88 "/usr/include/arm-linux-gnueabihf/bits/stat.h" 3 4
- unsigned long int __unused4;
- unsigned long int __unused5;
- };
- # 108 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 2 3 4
- # 211 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4
- extern int stat (__const char *__restrict __file,
- struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- # 240 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4
- extern int fstatat (int __fd, __const char *__restrict __file,
- struct stat *__restrict __buf, int __flag)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
- # 265 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4
- extern int lstat (__const char *__restrict __file,
- struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
- # 286 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4
- extern int chmod (__const char *__file, __mode_t __mode)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int lchmod (__const char *__file, __mode_t __mode)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__));
- extern int fchmodat (int __fd, __const char *__file, __mode_t __mode,
- int __flag)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ;
- extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__));
- # 323 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4
- extern int mkdir (__const char *__path, __mode_t __mode)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int mkdirat (int __fd, __const char *__path, __mode_t __mode)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int mknodat (int __fd, __const char *__path, __mode_t __mode,
- __dev_t __dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- extern int mkfifo (__const char *__path, __mode_t __mode)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
- extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- extern int utimensat (int __fd, __const char *__path,
- __const struct timespec __times[2],
- int __flags)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
- extern int futimens (int __fd, __const struct timespec __times[2]) __attribute__ ((__nothrow__));
- # 401 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4
- extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
- extern int __xstat (int __ver, __const char *__filename,
- struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
- extern int __lxstat (int __ver, __const char *__filename,
- struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
- extern int __fxstatat (int __ver, int __fildes, __const char *__filename,
- struct stat *__stat_buf, int __flag)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4)));
- # 444 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4
- extern int __xmknod (int __ver, __const char *__path, __mode_t __mode,
- __dev_t *__dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
- extern int __xmknodat (int __ver, int __fd, __const char *__path,
- __mode_t __mode, __dev_t *__dev)
- __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 5)));
- extern __inline int
- __attribute__ ((__nothrow__)) stat (__const char *__path, struct stat *__statbuf)
- {
- return __xstat (3, __path, __statbuf);
- }
- extern __inline int
- __attribute__ ((__nothrow__)) lstat (__const char *__path, struct stat *__statbuf)
- {
- return __lxstat (3, __path, __statbuf);
- }
- extern __inline int
- __attribute__ ((__nothrow__)) fstat (int __fd, struct stat *__statbuf)
- {
- return __fxstat (3, __fd, __statbuf);
- }
- extern __inline int
- __attribute__ ((__nothrow__)) fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag)
- {
- return __fxstatat (3, __fd, __filename, __statbuf, __flag);
- }
- extern __inline int
- __attribute__ ((__nothrow__)) mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
- {
- return __xmknod (1, __path, __mode, &__dev);
- }
- extern __inline int
- __attribute__ ((__nothrow__)) mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev)
- {
- return __xmknodat (1, __fd, __path, __mode, &__dev);
- }
- # 536 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4
- # 41 "./advance/osd/osdutils.h" 2
- # 69 "./advance/osd/osdutils.h"
- static inline int strcmpi(const char* a, const char* b)
- {
- return strcasecmp(a, b);
- }
- static inline int strncmpi(const char* a, const char* b, size_t count)
- {
- return strncasecmp(a, b, count);
- }
- static inline void strlwr(char* s)
- {
- while (*s) {
- *s = (__extension__ ({ int __res; if (sizeof (*s) > 1) { if (__builtin_constant_p (*s)) { int __c = (*s); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower (*s); } else __res = (*__ctype_tolower_loc ())[(int) (*s)]; __res; }));
- ++s;
- }
- }
- static inline void strupr(char* s)
- {
- while (*s) {
- *s = (__extension__ ({ int __res; if (sizeof (*s) > 1) { if (__builtin_constant_p (*s)) { int __c = (*s); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper (*s); } else __res = (*__ctype_toupper_loc ())[(int) (*s)]; __res; }));
- ++s;
- }
- }
- static inline void osd_mkdir(const char* dir)
- {
- mkdir(dir, (0400|0200|0100) | (0400 >> 3) | ((0400 >> 3) >> 3));
- }
- # 35 "./advance/osd/osd_cpu.h" 2
- # 43 "./advance/osd/osd_cpu.h"
- typedef unsigned char UINT8;
- typedef unsigned short UINT16;
- typedef unsigned int UINT32;
- __extension__ typedef unsigned long long UINT64;
- typedef signed char INT8;
- typedef signed short INT16;
- typedef signed int INT32;
- __extension__ typedef signed long long INT64;
- # 21 "./src/mamecore.h" 2
- # 35 "./src/mamecore.h"
- typedef UINT32 FPTR;
- typedef void genf(void);
- typedef struct _mame_display mame_display;
- typedef struct _game_driver game_driver;
- typedef struct _machine_config machine_config;
- typedef struct _rom_load_data rom_load_data;
- typedef struct _xml_data_node xml_data_node;
- typedef struct _performance_info performance_info;
- typedef struct _osd_create_params osd_create_params;
- typedef struct _gfx_element gfx_element;
- typedef struct _input_port_entry input_port_entry;
- typedef struct _input_port_default_entry input_port_default_entry;
- typedef struct _mame_file mame_file;
- typedef struct _chd_file chd_file;
- typedef enum _osd_file_error osd_file_error;
- typedef UINT32 pen_t;
- typedef UINT32 rgb_t;
- typedef INT32 stream_sample_t;
- typedef UINT32 input_code;
- typedef struct _mame_bitmap mame_bitmap;
- struct _mame_bitmap
- {
- int width,height;
- int depth;
- void **line;
- void *base;
- int rowpixels;
- int rowbytes;
- void (*plot)(struct _mame_bitmap *bitmap,int x,int y,pen_t pen);
- pen_t (*read)(struct _mame_bitmap *bitmap,int x,int y);
- void (*plot_box)(struct _mame_bitmap *bitmap,int x,int y,int width,int height,pen_t pen);
- };
- typedef struct _rectangle rectangle;
- struct _rectangle
- {
- int min_x,max_x;
- int min_y,max_y;
- };
- typedef struct _ui_menu_item ui_menu_item;
- struct _ui_menu_item
- {
- const char *text;
- const char *subtext;
- UINT32 flags;
- void *ref;
- };
- # 118 "./src/mamecore.h"
- typedef union
- {
- struct { UINT8 l,h,h2,h3; } b;
- struct { UINT16 l,h; } w;
- UINT32 d;
- } PAIR;
- # 138 "./src/mamecore.h"
- typedef union
- {
- struct { UINT8 l,h,h2,h3,h4,h5,h6,h7; } b;
- struct { UINT16 l,h,h2,h3; } w;
- struct { UINT32 l,h; } d;
- UINT64 lw;
- } PAIR64;
- # 359 "./src/mamecore.h"
- int mame_stricmp(const char *s1, const char *s2);
- int mame_strnicmp(const char *s1, const char *s2, size_t n);
- char *mame_strdup(const char *str);
- # 385 "./src/mamecore.h"
- static __inline__ void sect_rect(rectangle *dst, const rectangle *src)
- {
- if (src->min_x > dst->min_x) dst->min_x = src->min_x;
- if (src->max_x < dst->max_x) dst->max_x = src->max_x;
- if (src->min_y > dst->min_y) dst->min_y = src->min_y;
- if (src->max_y < dst->max_y) dst->max_y = src->max_y;
- }
- static __inline__ float u2f(UINT32 v)
- {
- union {
- float ff;
- UINT32 vv;
- } u;
- u.vv = v;
- return u.ff;
- }
- static __inline__ UINT32 f2u(float f)
- {
- union {
- float ff;
- UINT32 vv;
- } u;
- u.ff = f;
- return u.vv;
- }
- static __inline__ double u2d(UINT64 v)
- {
- union {
- double dd;
- UINT64 vv;
- } u;
- u.vv = v;
- return u.dd;
- }
- static __inline__ UINT64 d2u(double d)
- {
- union {
- double dd;
- UINT64 vv;
- } u;
- u.dd = d;
- return u.vv;
- }
- # 455 "./src/mamecore.h"
- static __inline__ UINT32 count_leading_zeros(UINT32 val)
- {
- UINT32 count;
- for (count = 0; (INT32)val >= 0; count++) val <<= 1;
- return count;
- }
- static __inline__ UINT32 count_leading_ones(UINT32 val)
- {
- UINT32 count;
- for (count = 0; (INT32)val < 0; count++) val <<= 1;
- return count;
- }
- static __inline__ INT32 fixed_mul_shift(INT32 val1, INT32 val2, UINT8 shift)
- {
- return (INT32)(((INT64)val1 * (INT64)val2) >> shift);
- }
- # 491 "./src/mamecore.h"
- static __inline__ int bcd_adjust(int value)
- {
- if ((value & 0xf) >= 0xa)
- value = value + 0x10 - 0xa;
- if ((value & 0xf0) >= 0xa0)
- value = value - 0xa0 + 0x100;
- return value;
- }
- static __inline__ int dec_2_bcd(int a)
- {
- return (a % 10) | ((a / 10) << 4);
- }
- static __inline__ int bcd_2_dec(int a)
- {
- return (a & 0xf) + (a >> 4) * 10;
- }
- # 520 "./src/mamecore.h"
- static __inline__ int gregorian_is_leap_year(int year)
- {
- return !(year % 100 ? year % 4 : year % 400);
- }
- static __inline__ int gregorian_days_in_month(int month, int year)
- {
- if (month == 2)
- return gregorian_is_leap_year(year) ? 29 : 28;
- else if (month == 4 || month == 6 || month == 9 || month == 11)
- return 30;
- else
- return 31;
- }
- # 593 "./src/mamecore.h"
- void fatalerror(const char *text,...) __attribute__((format(printf, 1, 2))) __attribute__((noreturn));
- # 16 "./src/mame.h" 2
- # 63 "./src/mame.h"
- enum
- {
- REGION_INVALID = 0x80,
- REGION_CPU1,
- REGION_CPU2,
- REGION_CPU3,
- REGION_CPU4,
- REGION_CPU5,
- REGION_CPU6,
- REGION_CPU7,
- REGION_CPU8,
- REGION_GFX1,
- REGION_GFX2,
- REGION_GFX3,
- REGION_GFX4,
- REGION_GFX5,
- REGION_GFX6,
- REGION_GFX7,
- REGION_GFX8,
- REGION_PROMS,
- REGION_SOUND1,
- REGION_SOUND2,
- REGION_SOUND3,
- REGION_SOUND4,
- REGION_SOUND5,
- REGION_SOUND6,
- REGION_SOUND7,
- REGION_SOUND8,
- REGION_USER1,
- REGION_USER2,
- REGION_USER3,
- REGION_USER4,
- REGION_USER5,
- REGION_USER6,
- REGION_USER7,
- REGION_USER8,
- REGION_DISKS,
- REGION_PLDS,
- REGION_MAX
- };
- extern const char *memory_region_names[REGION_MAX];
- # 120 "./src/mame.h"
- typedef struct _running_machine running_machine;
- struct _running_machine
- {
- const game_driver * gamedrv;
- const machine_config * drv;
- gfx_element * gfx[32];
- rectangle visible_area;
- rectangle absolute_visible_area;
- float refresh_rate;
- pen_t * pens;
- UINT16 * game_colortable;
- pen_t * remapped_colortable;
- int color_depth;
- int sample_rate;
- input_port_entry * input_ports;
- mame_file * record_file;
- mame_file * playback_file;
- int ui_orientation;
- int debug_mode;
- # 161 "./src/mame.h"
- };
- # 188 "./src/mame.h"
- typedef struct _global_options global_options;
- struct _global_options
- {
- mame_file * record;
- mame_file * playback;
- mame_file * language_file;
- mame_file * logfile;
- int mame_debug;
- int cheat;
- int gui_host;
- int skip_disclaimer;
- int skip_gameinfo;
- int skip_warnings;
- int samplerate;
- int use_samples;
- float brightness;
- float pause_bright;
- float gamma;
- int vector_width;
- int vector_height;
- int ui_orientation;
- int beam;
- float vector_flicker;
- float vector_intensity;
- int translucency;
- int antialias;
- int use_artwork;
- int artwork_res;
- int artwork_crop;
- const char * savegame;
- int auto_save;
- char * bios;
- int debug_width;
- int debug_height;
- int debug_depth;
- const char *controller;
- # 241 "./src/mame.h"
- };
- # 251 "./src/mame.h"
- extern global_options options;
- extern running_machine *Machine;
- extern const char *mame_disclaimer;
- extern char giant_string_buffer[];
- extern char build_version[];
- # 268 "./src/mame.h"
- int run_game(int game);
- int mame_get_phase(void);
- void add_exit_callback(void (*callback)(void));
- void add_reset_callback(void (*callback)(void));
- void add_pause_callback(void (*callback)(int));
- void mame_schedule_exit(void);
- void mame_schedule_hard_reset(void);
- void mame_schedule_soft_reset(void);
- void mame_schedule_save(const char *filename);
- void mame_schedule_load(const char *filename);
- int mame_is_scheduled_event_pending(void);
- void mame_pause(int pause);
- int mame_is_paused(void);
- int new_memory_region(int type, size_t length, UINT32 flags);
- void free_memory_region(int num);
- UINT8 *memory_region(int num);
- size_t memory_region_length(int num);
- UINT32 memory_region_type(int num);
- UINT32 memory_region_flags(int num);
- void begin_resource_tracking(void);
- void end_resource_tracking(void);
- static __inline__ int get_resource_tag(void)
- {
- extern int resource_tracking_tag;
- return resource_tracking_tag;
- }
- void *_malloc_or_die(size_t size, const char *file, int line) __attribute__((malloc));
- void *_auto_malloc(size_t size, const char *file, int line) __attribute__((malloc));
- char *auto_strdup(const char *str) __attribute__((malloc));
- void logerror(const char *text,...) __attribute__((format(printf, 1, 2)));
- void add_logerror_callback(void (*callback)(const char *));
- UINT32 mame_rand(void);
- int mame_find_cpu_index(const char *tag);
- # 18 "./src/debugger.h" 2
- # 46 "./src/debugger.h"
- void mame_debug_init(void);
- void mame_debug_hook(void);
- void mame_debug_break(void);
- # 105 "src/cpu/sh2/sh2.c" 2
- # 1 "src/cpu/sh2/sh2.h" 1
- # 31 "src/cpu/sh2/sh2.h"
- # 1 "./src/cpuintrf.h" 1
- # 12 "./src/cpuintrf.h"
- # 1 "./src/memory.h" 1
- # 12 "./src/memory.h"
- # 52 "./src/memory.h"
- typedef UINT32 offs_t;
- typedef UINT8 (*read8_handler) (__attribute__((__unused__)) offs_t offset);
- typedef void (*write8_handler) (__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
- typedef UINT16 (*read16_handler) (__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
- typedef void (*write16_handler)(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
- typedef UINT32 (*read32_handler) (__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
- typedef void (*write32_handler)(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 data, __attribute__((__unused__)) UINT32 mem_mask);
- typedef UINT64 (*read64_handler) (__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT64 mem_mask);
- typedef void (*write64_handler)(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT64 data, __attribute__((__unused__)) UINT64 mem_mask);
- typedef offs_t (*opbase_handler) (__attribute__((__unused__)) offs_t address);
- struct _data_accessors
- {
- UINT8 (*read_byte)(offs_t offset);
- UINT16 (*read_word)(offs_t offset);
- UINT32 (*read_dword)(offs_t offset);
- UINT64 (*read_qword)(offs_t offset);
- void (*write_byte)(offs_t offset, UINT8 data);
- void (*write_word)(offs_t offset, UINT16 data);
- void (*write_dword)(offs_t offset, UINT32 data);
- void (*write_qword)(offs_t offset, UINT64 data);
- };
- typedef struct _data_accessors data_accessors;
- # 552 "./src/memory.h"
- typedef struct _handler_data handler_data;
- union _read_handlers
- {
- genf * handler;
- read8_handler handler8;
- read16_handler handler16;
- read32_handler handler32;
- read64_handler handler64;
- };
- typedef union _read_handlers read_handlers;
- union _write_handlers
- {
- genf * handler;
- write8_handler handler8;
- write16_handler handler16;
- write32_handler handler32;
- write64_handler handler64;
- };
- typedef union _write_handlers write_handlers;
- struct _address_map
- {
- UINT32 flags;
- offs_t start, end;
- offs_t mirror;
- offs_t mask;
- read_handlers read;
- const char * read_name;
- write_handlers write;
- const char * write_name;
- void * memory;
- UINT32 share;
- void ** base;
- size_t * size;
- UINT32 region;
- offs_t region_offs;
- };
- typedef struct _address_map address_map;
- struct _address_space
- {
- offs_t addrmask;
- UINT8 * readlookup;
- UINT8 * writelookup;
- handler_data * readhandlers;
- handler_data * writehandlers;
- data_accessors * accessors;
- };
- typedef struct _address_space address_space;
- # 617 "./src/memory.h"
- typedef address_map *(*construct_map_t)(address_map *map);
- # 731 "./src/memory.h"
- extern const char *address_space_names[3];
- # 772 "./src/memory.h"
- UINT8 program_read_byte_8(offs_t address);
- void program_write_byte_8(offs_t address, UINT8 data);
- UINT8 program_read_byte_16be(offs_t address);
- UINT16 program_read_word_16be(offs_t address);
- void program_write_byte_16be(offs_t address, UINT8 data);
- void program_write_word_16be(offs_t address, UINT16 data);
- UINT8 program_read_byte_16le(offs_t address);
- UINT16 program_read_word_16le(offs_t address);
- void program_write_byte_16le(offs_t address, UINT8 data);
- void program_write_word_16le(offs_t address, UINT16 data);
- UINT8 program_read_byte_32be(offs_t address);
- UINT16 program_read_word_32be(offs_t address);
- UINT32 program_read_dword_32be(offs_t address);
- void program_write_byte_32be(offs_t address, UINT8 data);
- void program_write_word_32be(offs_t address, UINT16 data);
- void program_write_dword_32be(offs_t address, UINT32 data);
- UINT8 program_read_byte_32le(offs_t address);
- UINT16 program_read_word_32le(offs_t address);
- UINT32 program_read_dword_32le(offs_t address);
- void program_write_byte_32le(offs_t address, UINT8 data);
- void program_write_word_32le(offs_t address, UINT16 data);
- void program_write_dword_32le(offs_t address, UINT32 data);
- UINT8 program_read_byte_64be(offs_t address);
- UINT16 program_read_word_64be(offs_t address);
- UINT32 program_read_dword_64be(offs_t address);
- UINT64 program_read_qword_64be(offs_t address);
- void program_write_byte_64be(offs_t address, UINT8 data);
- void program_write_word_64be(offs_t address, UINT16 data);
- void program_write_dword_64be(offs_t address, UINT32 data);
- void program_write_qword_64be(offs_t address, UINT64 data);
- UINT8 program_read_byte_64le(offs_t address);
- UINT16 program_read_word_64le(offs_t address);
- UINT32 program_read_dword_64le(offs_t address);
- UINT64 program_read_qword_64le(offs_t address);
- void program_write_byte_64le(offs_t address, UINT8 data);
- void program_write_word_64le(offs_t address, UINT16 data);
- void program_write_dword_64le(offs_t address, UINT32 data);
- void program_write_qword_64le(offs_t address, UINT64 data);
- UINT8 data_read_byte_8(offs_t address);
- void data_write_byte_8(offs_t address, UINT8 data);
- UINT8 data_read_byte_16be(offs_t address);
- UINT16 data_read_word_16be(offs_t address);
- void data_write_byte_16be(offs_t address, UINT8 data);
- void data_write_word_16be(offs_t address, UINT16 data);
- UINT8 data_read_byte_16le(offs_t address);
- UINT16 data_read_word_16le(offs_t address);
- void data_write_byte_16le(offs_t address, UINT8 data);
- void data_write_word_16le(offs_t address, UINT16 data);
- UINT8 data_read_byte_32be(offs_t address);
- UINT16 data_read_word_32be(offs_t address);
- UINT32 data_read_dword_32be(offs_t address);
- void data_write_byte_32be(offs_t address, UINT8 data);
- void data_write_word_32be(offs_t address, UINT16 data);
- void data_write_dword_32be(offs_t address, UINT32 data);
- UINT8 data_read_byte_32le(offs_t address);
- UINT16 data_read_word_32le(offs_t address);
- UINT32 data_read_dword_32le(offs_t address);
- void data_write_byte_32le(offs_t address, UINT8 data);
- void data_write_word_32le(offs_t address, UINT16 data);
- void data_write_dword_32le(offs_t address, UINT32 data);
- UINT8 data_read_byte_64be(offs_t address);
- UINT16 data_read_word_64be(offs_t address);
- UINT32 data_read_dword_64be(offs_t address);
- UINT64 data_read_qword_64be(offs_t address);
- void data_write_byte_64be(offs_t address, UINT8 data);
- void data_write_word_64be(offs_t address, UINT16 data);
- void data_write_dword_64be(offs_t address, UINT32 data);
- void data_write_qword_64be(offs_t address, UINT64 data);
- UINT8 data_read_byte_64le(offs_t address);
- UINT16 data_read_word_64le(offs_t address);
- UINT32 data_read_dword_64le(offs_t address);
- UINT64 data_read_qword_64le(offs_t address);
- void data_write_byte_64le(offs_t address, UINT8 data);
- void data_write_word_64le(offs_t address, UINT16 data);
- void data_write_dword_64le(offs_t address, UINT32 data);
- void data_write_qword_64le(offs_t address, UINT64 data);
- UINT8 io_read_byte_8(offs_t address);
- void io_write_byte_8(offs_t address, UINT8 data);
- UINT8 io_read_byte_16be(offs_t address);
- UINT16 io_read_word_16be(offs_t address);
- void io_write_byte_16be(offs_t address, UINT8 data);
- void io_write_word_16be(offs_t address, UINT16 data);
- UINT8 io_read_byte_16le(offs_t address);
- UINT16 io_read_word_16le(offs_t address);
- void io_write_byte_16le(offs_t address, UINT8 data);
- void io_write_word_16le(offs_t address, UINT16 data);
- UINT8 io_read_byte_32be(offs_t address);
- UINT16 io_read_word_32be(offs_t address);
- UINT32 io_read_dword_32be(offs_t address);
- void io_write_byte_32be(offs_t address, UINT8 data);
- void io_write_word_32be(offs_t address, UINT16 data);
- void io_write_dword_32be(offs_t address, UINT32 data);
- UINT8 io_read_byte_32le(offs_t address);
- UINT16 io_read_word_32le(offs_t address);
- UINT32 io_read_dword_32le(offs_t address);
- void io_write_byte_32le(offs_t address, UINT8 data);
- void io_write_word_32le(offs_t address, UINT16 data);
- void io_write_dword_32le(offs_t address, UINT32 data);
- UINT8 io_read_byte_64be(offs_t address);
- UINT16 io_read_word_64be(offs_t address);
- UINT32 io_read_dword_64be(offs_t address);
- UINT64 io_read_qword_64be(offs_t address);
- void io_write_byte_64be(offs_t address, UINT8 data);
- void io_write_word_64be(offs_t address, UINT16 data);
- void io_write_dword_64be(offs_t address, UINT32 data);
- void io_write_qword_64be(offs_t address, UINT64 data);
- UINT8 io_read_byte_64le(offs_t address);
- UINT16 io_read_word_64le(offs_t address);
- UINT32 io_read_dword_64le(offs_t address);
- UINT64 io_read_qword_64le(offs_t address);
- void io_write_byte_64le(offs_t address, UINT8 data);
- void io_write_word_64le(offs_t address, UINT16 data);
- void io_write_dword_64le(offs_t address, UINT32 data);
- void io_write_qword_64le(offs_t address, UINT64 data);
- # 918 "./src/memory.h"
- int memory_init(void);
- void memory_exit(void);
- void memory_set_context(int activecpu);
- const address_map *memory_get_map(int cpunum, int spacenum);
- opbase_handler memory_set_opbase_handler(int cpunum, opbase_handler function);
- void memory_set_opbase(offs_t offset);
- void memory_set_decrypted_region(int cpunum, offs_t start, offs_t end, void *base);
- void * memory_get_read_ptr(int cpunum, int spacenum, offs_t offset);
- void * memory_get_write_ptr(int cpunum, int spacenum, offs_t offset);
- void * memory_get_op_ptr(int cpunum, offs_t offset, int arg);
- void memory_configure_bank(int banknum, int startentry, int numentries, void *base, offs_t stride);
- void memory_configure_bank_decrypted(int banknum, int startentry, int numentries, void *base, offs_t stride);
- void memory_set_bank(int banknum, int entrynum);
- void memory_set_bankptr(int banknum, void *base);
- void memory_set_debugger_access(int debugger);
- void memory_set_log_unmap(int spacenum, int log);
- int memory_get_log_unmap(int spacenum);
- void * _memory_install_read_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, int handler, const char *handler_name);
- UINT8 * _memory_install_read8_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_handler handler, const char *handler_name);
- UINT16 * _memory_install_read16_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_handler handler, const char *handler_name);
- UINT32 * _memory_install_read32_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read32_handler handler, const char *handler_name);
- UINT64 * _memory_install_read64_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read64_handler handler, const char *handler_name);
- void * _memory_install_write_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, int handler, const char *handler_name);
- UINT8 * _memory_install_write8_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write8_handler handler, const char *handler_name);
- UINT16 * _memory_install_write16_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write16_handler handler, const char *handler_name);
- UINT32 * _memory_install_write32_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write32_handler handler, const char *handler_name);
- UINT64 * _memory_install_write64_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write64_handler handler, const char *handler_name);
- void * _memory_install_read_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, int handler, const char *handler_name);
- UINT8 * _memory_install_read8_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read8_handler handler, const char *handler_name);
- UINT16 * _memory_install_read16_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read16_handler handler, const char *handler_name);
- UINT32 * _memory_install_read32_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read32_handler handler, const char *handler_name);
- UINT64 * _memory_install_read64_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read64_handler handler, const char *handler_name);
- void * _memory_install_write_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, int handler, const char *handler_name);
- UINT8 * _memory_install_write8_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write8_handler handler, const char *handler_name);
- UINT16 * _memory_install_write16_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write16_handler handler, const char *handler_name);
- UINT32 * _memory_install_write32_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write32_handler handler, const char *handler_name);
- UINT64 * _memory_install_write64_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write64_handler handler, const char *handler_name);
- void memory_dump(FILE *file);
- const char *memory_get_handler_string(int read0_or_write1, int cpunum, int spacenum, offs_t offset);
- # 983 "./src/memory.h"
- extern UINT8 opcode_entry;
- extern UINT8 * opcode_base;
- extern UINT8 * opcode_arg_base;
- extern offs_t opcode_mask;
- extern offs_t opcode_memory_min;
- extern offs_t opcode_memory_max;
- extern address_space active_address_space[];
- extern address_map * construct_map_0(address_map *map);
- # 1072 "./src/memory.h"
- static __inline__ UINT8 program_read_byte (offs_t offset) { return (*active_address_space[0].accessors->read_byte)(offset); }
- static __inline__ UINT16 program_read_word (offs_t offset) { return (*active_address_space[0].accessors->read_word)(offset); }
- static __inline__ UINT32 program_read_dword(offs_t offset) { return (*active_address_space[0].accessors->read_dword)(offset); }
- static __inline__ UINT64 program_read_qword(offs_t offset) { return (*active_address_space[0].accessors->read_qword)(offset); }
- static __inline__ void program_write_byte (offs_t offset, UINT8 data) { (*active_address_space[0].accessors->write_byte)(offset, data); }
- static __inline__ void program_write_word (offs_t offset, UINT16 data) { (*active_address_space[0].accessors->write_word)(offset, data); }
- static __inline__ void program_write_dword(offs_t offset, UINT32 data) { (*active_address_space[0].accessors->write_dword)(offset, data); }
- static __inline__ void program_write_qword(offs_t offset, UINT64 data) { (*active_address_space[0].accessors->write_qword)(offset, data); }
- static __inline__ UINT8 data_read_byte (offs_t offset) { return (*active_address_space[1].accessors->read_byte)(offset); }
- static __inline__ UINT16 data_read_word (offs_t offset) { return (*active_address_space[1].accessors->read_word)(offset); }
- static __inline__ UINT32 data_read_dword(offs_t offset) { return (*active_address_space[1].accessors->read_dword)(offset); }
- static __inline__ UINT64 data_read_qword(offs_t offset) { return (*active_address_space[1].accessors->read_qword)(offset); }
- static __inline__ void data_write_byte (offs_t offset, UINT8 data) { (*active_address_space[1].accessors->write_byte)(offset, data); }
- static __inline__ void data_write_word (offs_t offset, UINT16 data) { (*active_address_space[1].accessors->write_word)(offset, data); }
- static __inline__ void data_write_dword(offs_t offset, UINT32 data) { (*active_address_space[1].accessors->write_dword)(offset, data); }
- static __inline__ void data_write_qword(offs_t offset, UINT64 data) { (*active_address_space[1].accessors->write_qword)(offset, data); }
- static __inline__ UINT8 io_read_byte (offs_t offset) { return (*active_address_space[2].accessors->read_byte)(offset); }
- static __inline__ UINT16 io_read_word (offs_t offset) { return (*active_address_space[2].accessors->read_word)(offset); }
- static __inline__ UINT32 io_read_dword(offs_t offset) { return (*active_address_space[2].accessors->read_dword)(offset); }
- static __inline__ UINT64 io_read_qword(offs_t offset) { return (*active_address_space[2].accessors->read_qword)(offset); }
- static __inline__ void io_write_byte (offs_t offset, UINT8 data) { (*active_address_space[2].accessors->write_byte)(offset, data); }
- static __inline__ void io_write_word (offs_t offset, UINT16 data) { (*active_address_space[2].accessors->write_word)(offset, data); }
- static __inline__ void io_write_dword(offs_t offset, UINT32 data) { (*active_address_space[2].accessors->write_dword)(offset, data); }
- static __inline__ void io_write_qword(offs_t offset, UINT64 data) { (*active_address_space[2].accessors->write_qword)(offset, data); }
- UINT8 cpu_readop_safe(offs_t offset);
- UINT16 cpu_readop16_safe(offs_t offset);
- UINT32 cpu_readop32_safe(offs_t offset);
- UINT64 cpu_readop64_safe(offs_t offset);
- UINT8 cpu_readop_arg_safe(offs_t offset);
- UINT16 cpu_readop_arg16_safe(offs_t offset);
- UINT32 cpu_readop_arg32_safe(offs_t offset);
- UINT64 cpu_readop_arg64_safe(offs_t offset);
- # 1124 "./src/memory.h"
- static __inline__ void * cpu_opptr(offs_t A) { if ((0)) { memory_set_opbase(A); } return ((void *)&opcode_base[(A) & opcode_mask]); }
- static __inline__ UINT8 cpu_readop(offs_t A) { if ((0)) { memory_set_opbase(A); } return (opcode_base[(A) & opcode_mask]); }
- static __inline__ UINT16 cpu_readop16(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT16 *)&opcode_base[(A) & opcode_mask]); }
- static __inline__ UINT32 cpu_readop32(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT32 *)&opcode_base[(A) & opcode_mask]); }
- static __inline__ UINT64 cpu_readop64(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT64 *)&opcode_base[(A) & opcode_mask]); }
- static __inline__ UINT8 cpu_readop_arg(offs_t A) { if ((0)) { memory_set_opbase(A); } return (opcode_arg_base[(A) & opcode_mask]); }
- static __inline__ UINT16 cpu_readop_arg16(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT16 *)&opcode_arg_base[(A) & opcode_mask]); }
- static __inline__ UINT32 cpu_readop_arg32(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT32 *)&opcode_arg_base[(A) & opcode_mask]); }
- static __inline__ UINT64 cpu_readop_arg64(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT64 *)&opcode_arg_base[(A) & opcode_mask]); }
- # 18 "./src/cpuintrf.h" 2
- # 1 "./src/cpuint.h" 1
- # 12 "./src/cpuint.h"
- # 29 "./src/cpuint.h"
- int cpuint_init(void);
- void cpuint_reset(void);
- extern int (*cpu_irq_callbacks[])(int);
- # 44 "./src/cpuint.h"
- void cpunum_set_input_line(int cpunum, int line, int state);
- void cpunum_set_input_line_vector(int cpunum, int irqline, int vector);
- void cpunum_set_input_line_and_vector(int cpunum, int line, int state, int vector);
- void cpunum_set_irq_callback(int cpunum, int (*callback)(int irqline));
- # 19 "./src/cpuintrf.h" 2
- # 1 "./src/cpuexec.h" 1
- # 12 "./src/cpuexec.h"
- # 1 "./src/timer.h" 1
- # 13 "./src/timer.h"
- # 94 "./src/timer.h"
- typedef struct _mame_timer mame_timer;
- typedef INT64 subseconds_t;
- typedef INT32 seconds_t;
- typedef struct _mame_time mame_time;
- struct _mame_time
- {
- seconds_t seconds;
- subseconds_t subseconds;
- };
- # 114 "./src/timer.h"
- extern mame_time time_zero;
- extern mame_time time_never;
- extern subseconds_t subseconds_per_cycle[];
- extern UINT32 cycles_per_second[];
- extern double cycles_to_sec[];
- extern double sec_to_cycles[];
- void timer_init(void);
- void timer_free(void);
- int timer_count_anonymous(void);
- mame_time mame_timer_next_fire_time(void);
- void mame_timer_set_global_time(mame_time newbase);
- mame_timer *_mame_timer_alloc(void (*callback)(int), const char *file, int line, const char *func);
- mame_timer *_mame_timer_alloc_ptr(void (*callback)(void *), void *param, const char *file, int line, const char *func);
- void mame_timer_adjust(mame_timer *which, mame_time duration, INT32 param, mame_time period);
- void mame_timer_adjust_ptr(mame_timer *which, mame_time duration, mame_time period);
- void _mame_timer_pulse(mame_time period, INT32 param, void (*callback)(int), const char *file, int line, const char *func);
- void _mame_timer_pulse_ptr(mame_time period, void *param, void (*callback)(void *), const char *file, int line, const char *func);
- void _mame_timer_set(mame_time duration, INT32 param, void (*callback)(int), const char *file, int line, const char *func);
- void _mame_timer_set_ptr(mame_time duration, void *param, void (*callback)(void *), const char *file, int line, const char *func);
- void mame_timer_reset(mame_timer *which, mame_time duration);
- int mame_timer_enable(mame_timer *which, int enable);
- mame_time mame_timer_timeelapsed(mame_timer *which);
- mame_time mame_timer_timeleft(mame_timer *which);
- mame_time mame_timer_get_time(void);
- mame_time mame_timer_starttime(mame_timer *which);
- mame_time mame_timer_firetime(mame_timer *which);
- # 162 "./src/timer.h"
- static __inline__ mame_time make_mame_time(seconds_t _secs, subseconds_t _subsecs)
- {
- mame_time result;
- result.seconds = _secs;
- result.subseconds = _subsecs;
- return result;
- }
- static __inline__ double mame_time_to_double(mame_time _time)
- {
- return (double)_time.seconds + ((double)(_time.subseconds) * (1.0 / (double)((subseconds_t)1000000000 * (subseconds_t)1000000000)));
- }
- static __inline__ mame_time double_to_mame_time(double _time)
- {
- mame_time abstime;
- if (_time >= (1.0e30))
- return time_never;
- abstime.seconds = (seconds_t)_time;
- _time -= (double)abstime.seconds;
- abstime.subseconds = ((subseconds_t)((_time) * (double)((subseconds_t)1000000000 * (subseconds_t)1000000000)));
- return abstime;
- }
- static __inline__ mame_time add_mame_times(mame_time _time1, mame_time _time2)
- {
- mame_time result;
- if (_time1.seconds >= ((seconds_t)1000000000) || _time2.seconds >= ((seconds_t)1000000000))
- return time_never;
- result.subseconds = _time1.subseconds + _time2.subseconds;
- result.seconds = _time1.seconds + _time2.seconds;
- if (result.subseconds >= ((subseconds_t)1000000000 * (subseconds_t)1000000000))
- {
- result.subseconds -= ((subseconds_t)1000000000 * (subseconds_t)1000000000);
- result.seconds++;
- }
- return result;
- }
- static __inline__ mame_time add_subseconds_to_mame_time(mame_time _time1, subseconds_t _subseconds)
- {
- mame_time result;
- if (_time1.seconds >= ((seconds_t)1000000000))
- return time_never;
- result.subseconds = _time1.subseconds + _subseconds;
- result.seconds = _time1.seconds;
- if (result.subseconds >= ((subseconds_t)1000000000 * (subseconds_t)1000000000))
- {
- result.subseconds -= ((subseconds_t)1000000000 * (subseconds_t)1000000000);
- result.seconds++;
- }
- return result;
- }
- static __inline__ mame_time sub_mame_times(mame_time _time1, mame_time _time2)
- {
- mame_time result;
- if (_time1.seconds >= ((seconds_t)1000000000))
- return time_never;
- result.subseconds = _time1.subseconds - _time2.subseconds;
- result.seconds = _time1.seconds - _time2.seconds;
- if (result.subseconds < 0)
- {
- result.subseconds += ((subseconds_t)1000000000 * (subseconds_t)1000000000);
- result.seconds--;
- }
- return result;
- }
- static __inline__ mame_time sub_subseconds_from_mame_time(mame_time _time1, subseconds_t _subseconds)
- {
- mame_time result;
- if (_time1.seconds >= ((seconds_t)1000000000))
- return time_never;
- result.subseconds = _time1.subseconds - _subseconds;
- result.seconds = _time1.seconds;
- if (result.subseconds < 0)
- {
- result.subseconds += ((subseconds_t)1000000000 * (subseconds_t)1000000000);
- result.seconds--;
- }
- return result;
- }
- static __inline__ int compare_mame_times(mame_time _time1, mame_time _time2)
- {
- if (_time1.seconds > _time2.seconds)
- return 1;
- if (_time1.seconds < _time2.seconds)
- return -1;
- if (_time1.subseconds > _time2.subseconds)
- return 1;
- if (_time1.subseconds < _time2.subseconds)
- return -1;
- return 0;
- }
- # 19 "./src/cpuexec.h" 2
- # 28 "./src/cpuexec.h"
- typedef struct _cpu_config cpu_config;
- struct _cpu_config
- {
- int cpu_type;
- int cpu_flags;
- int cpu_clock;
- construct_map_t construct_map[3][2];
- void (*vblank_interrupt)(void);
- int vblank_interrupts_per_frame;
- void (*timed_interrupt)(void);
- double timed_interrupt_period;
- void * reset_param;
- const char *tag;
- };
- # 51 "./src/cpuexec.h"
- enum
- {
- CPU_DISABLE = 0x0001
- };
- # 68 "./src/cpuexec.h"
- int cpuexec_init(void);
- void cpuexec_timeslice(void);
- # 82 "./src/cpuexec.h"
- void watchdog_reset(void);
- void watchdog_enable(int enable);
- # 97 "./src/cpuexec.h"
- enum
- {
- SUSPEND_REASON_HALT = 0x0001,
- SUSPEND_REASON_RESET = 0x0002,
- SUSPEND_REASON_SPIN = 0x0004,
- SUSPEND_REASON_TRIGGER = 0x0008,
- SUSPEND_REASON_DISABLE = 0x0010,
- SUSPEND_ANY_REASON = ~0
- };
- void cpunum_suspend(int cpunum, int reason, int eatcycles);
- void cpunum_resume(int cpunum, int reason);
- int cpunum_is_suspended(int cpunum, int reason);
- void activecpu_abort_timeslice(void);
- mame_time cpunum_get_localtime(int cpunum);
- int cpunum_get_clock(int cpunum);
- void cpunum_set_clock(int cpunum, int clock);
- void cpunum_set_clock_period(int cpunum, subseconds_t clock_period);
- double cpunum_get_clockscale(int cpunum);
- void cpunum_set_clockscale(int cpunum, double clockscale);
- void cpu_boost_interleave(double timeslice_time, double boost_duration);
- # 149 "./src/cpuexec.h"
- int cycles_currently_ran(void);
- int cycles_left_to_run(void);
- UINT32 activecpu_gettotalcycles(void);
- UINT64 activecpu_gettotalcycles64(void);
- UINT32 cpunum_gettotalcycles(int cpunum);
- UINT64 cpunum_gettotalcycles64(int cpunum);
- int activecpu_geticount(void);
- void activecpu_eat_cycles(int cycles);
- int cpu_scalebyfcount(int value);
- # 180 "./src/cpuexec.h"
- void cpu_compute_scanline_timing(void);
- int cpu_getcurrentframe(void);
- int cpu_getscanline(void);
- mame_time cpu_getscanlinetime_mt(int scanline);
- double cpu_getscanlinetime(int scanline);
- mame_time cpu_getscanlineperiod_mt(void);
- double cpu_getscanlineperiod(void);
- int cpu_gethorzbeampos(void);
- int cpu_getvblank(void);
- # 211 "./src/cpuexec.h"
- void cpu_trigger(int trigger);
- void cpu_triggertime(double duration, int trigger);
- void cpu_triggerint(int cpunum);
- void cpu_spinuntil_trigger(int trigger);
- void cpunum_spinuntil_trigger( int cpunum, int trigger );
- void cpu_yielduntil_trigger(int trigger);
- void cpu_spinuntil_int(void);
- void cpu_yielduntil_int(void);
- void cpu_spin(void);
- void cpu_yield(void);
- void cpu_spinuntil_time(double duration);
- void cpu_yielduntil_time(double duration);
- # 259 "./src/cpuexec.h"
- int cpu_getiloops(void);
- # 20 "./src/cpuintrf.h" 2
- # 1 "./src/state.h" 1
- # 12 "./src/state.h"
- # 75 "./src/state.h"
- void state_init(void);
- void state_save_free(void);
- void state_save_allow_registration(int allowed);
- int state_save_registration_allowed(void);
- int state_save_get_reg_count(void);
- void state_save_register_memory(const char *module, UINT32 instance, const char *name, void *val, UINT32 valsize, UINT32 valcount);
- void state_save_register_bitmap(const char *module, UINT32 instance, const char *name, mame_bitmap *val);
- void state_save_register_func_presave(void (*func)(void));
- void state_save_register_func_postload(void (*func)(void));
- void state_save_register_func_presave_int(void (*func)(int), int param);
- void state_save_register_func_postload_int(void (*func)(int), int param);
- void state_save_register_func_presave_ptr(void (*func)(void *), void *param);
- void state_save_register_func_postload_ptr(void (*func)(void *), void *param);
- int state_save_save_begin(mame_file *file);
- int state_save_load_begin(mame_file *file);
- void state_save_push_tag(int tag);
- void state_save_pop_tag(void);
- void state_save_save_continue(void);
- void state_save_load_continue(void);
- void state_save_save_finish(void);
- void state_save_load_finish(void);
- void state_save_dump_registry(void);
- const char *state_save_get_indexed_item(int index, void **base, UINT32 *valsize, UINT32 *valcount);
- int state_save_check_file(mame_file *file, const char *gamename, int validate_signature, void ( *errormsg)(const char *fmt, ...));
- # 21 "./src/cpuintrf.h" 2
- # 30 "./src/cpuintrf.h"
- enum
- {
- CPU_DUMMY,
- CPU_Z80,
- CPU_Z180,
- CPU_8080,
- CPU_8085A,
- CPU_M6502,
- CPU_M65C02,
- CPU_M65SC02,
- CPU_M65CE02,
- CPU_M6509,
- CPU_M6510,
- CPU_M6510T,
- CPU_M7501,
- CPU_M8502,
- CPU_N2A03,
- CPU_DECO16,
- CPU_M4510,
- CPU_H6280,
- CPU_I86,
- CPU_I88,
- CPU_I186,
- CPU_I188,
- CPU_I286,
- CPU_V20,
- CPU_V30,
- CPU_V33,
- CPU_V60,
- CPU_V70,
- CPU_I8035,
- CPU_I8039,
- CPU_I8048,
- CPU_N7751,
- CPU_I8X41,
- CPU_I8051,
- CPU_I8052,
- CPU_I8751,
- CPU_I8752,
- CPU_M6800,
- CPU_M6801,
- CPU_M6802,
- CPU_M6803,
- CPU_M6808,
- CPU_HD63701,
- CPU_NSC8105,
- CPU_M6805,
- CPU_M68705,
- CPU_HD63705,
- CPU_HD6309,
- CPU_M6809,
- CPU_M6809E,
- CPU_KONAMI,
- CPU_M68000,
- CPU_M68008,
- CPU_M68010,
- CPU_M68EC020,
- CPU_M68020,
- CPU_M68040,
- CPU_T11,
- CPU_S2650,
- CPU_TMS34010,
- CPU_TMS34020,
- CPU_TI990_10,
- CPU_TMS9900,
- CPU_TMS9940,
- CPU_TMS9980,
- CPU_TMS9985,
- CPU_TMS9989,
- CPU_TMS9995,
- CPU_TMS99100,
- CPU_TMS99105A,
- CPU_TMS99110A,
- CPU_Z8000,
- CPU_TMS32010,
- CPU_TMS32025,
- CPU_TMS32026,
- CPU_TMS32031,
- CPU_TMS32051,
- CPU_CCPU,
- CPU_ADSP2100,
- CPU_ADSP2101,
- CPU_ADSP2104,
- CPU_ADSP2105,
- CPU_ADSP2115,
- CPU_ADSP2181,
- CPU_PSXCPU,
- CPU_ASAP,
- CPU_UPD7810,
- CPU_UPD7807,
- CPU_JAGUARGPU,
- CPU_JAGUARDSP,
- CPU_R3000BE,
- CPU_R3000LE,
- CPU_R4600BE,
- CPU_R4600LE,
- CPU_R4650BE,
- CPU_R4650LE,
- CPU_R4700BE,
- CPU_R4700LE,
- CPU_R5000BE,
- CPU_R5000LE,
- CPU_QED5271BE,
- CPU_QED5271LE,
- CPU_RM7000BE,
- CPU_RM7000LE,
- CPU_ARM,
- CPU_ARM7,
- CPU_SH2,
- CPU_DSP32C,
- CPU_PIC16C54,
- CPU_PIC16C55,
- CPU_PIC16C56,
- CPU_PIC16C57,
- CPU_PIC16C58,
- CPU_G65816,
- CPU_SPC700,
- CPU_E116T,
- CPU_E116XT,
- CPU_E116XS,
- CPU_E116XSR,
- CPU_E132N,
- CPU_E132T,
- CPU_E132XN,
- CPU_E132XT,
- CPU_E132XS,
- CPU_E132XSR,
- CPU_GMS30C2116,
- CPU_GMS30C2132,
- CPU_GMS30C2216,
- CPU_GMS30C2232,
- CPU_I386,
- CPU_I486,
- CPU_PENTIUM,
- CPU_MEDIAGX,
- CPU_I960,
- CPU_H83002,
- CPU_V810,
- CPU_M37702,
- CPU_M37710,
- CPU_PPC403,
- CPU_PPC602,
- CPU_PPC603,
- CPU_SE3208,
- CPU_MC68HC11,
- CPU_ADSP21062,
- CPU_DSP56156,
- CPU_RSP,
- CPU_ALPHA8201,
- CPU_ALPHA8301,
- # 198 "./src/cpuintrf.h"
- CPU_COUNT
- };
- # 209 "./src/cpuintrf.h"
- enum
- {
- CLEAR_LINE = 0,
- ASSERT_LINE,
- HOLD_LINE,
- PULSE_LINE,
- INTERNAL_CLEAR_LINE = 100 + CLEAR_LINE,
- INTERNAL_ASSERT_LINE = 100 + ASSERT_LINE,
- MAX_INPUT_LINES = 32+3,
- INPUT_LINE_IRQ0 = 0,
- INPUT_LINE_IRQ1 = 1,
- INPUT_LINE_IRQ2 = 2,
- INPUT_LINE_IRQ3 = 3,
- INPUT_LINE_IRQ4 = 4,
- INPUT_LINE_IRQ5 = 5,
- INPUT_LINE_IRQ6 = 6,
- INPUT_LINE_IRQ7 = 7,
- INPUT_LINE_IRQ8 = 8,
- INPUT_LINE_IRQ9 = 9,
- INPUT_LINE_NMI = MAX_INPUT_LINES - 3,
- INPUT_LINE_RESET = MAX_INPUT_LINES - 2,
- INPUT_LINE_HALT = MAX_INPUT_LINES - 1,
- MAX_OUTPUT_LINES = 32
- };
- # 251 "./src/cpuintrf.h"
- enum
- {
- MAX_REGS = 256
- };
- enum
- {
- CPUINFO_INT_FIRST = 0x00000,
- CPUINFO_INT_CONTEXT_SIZE = CPUINFO_INT_FIRST,
- CPUINFO_INT_INPUT_LINES,
- CPUINFO_INT_OUTPUT_LINES,
- CPUINFO_INT_DEFAULT_IRQ_VECTOR,
- CPUINFO_INT_ENDIANNESS,
- CPUINFO_INT_CLOCK_DIVIDER,
- CPUINFO_INT_MIN_INSTRUCTION_BYTES,
- CPUINFO_INT_MAX_INSTRUCTION_BYTES,
- CPUINFO_INT_MIN_CYCLES,
- CPUINFO_INT_MAX_CYCLES,
- CPUINFO_INT_DATABUS_WIDTH,
- CPUINFO_INT_DATABUS_WIDTH_LAST = CPUINFO_INT_DATABUS_WIDTH + 3 - 1,
- CPUINFO_INT_ADDRBUS_WIDTH,
- CPUINFO_INT_ADDRBUS_WIDTH_LAST = CPUINFO_INT_ADDRBUS_WIDTH + 3 - 1,
- CPUINFO_INT_ADDRBUS_SHIFT,
- CPUINFO_INT_ADDRBUS_SHIFT_LAST = CPUINFO_INT_ADDRBUS_SHIFT + 3 - 1,
- CPUINFO_INT_LOGADDR_WIDTH,
- CPUINFO_INT_LOGADDR_WIDTH_LAST = CPUINFO_INT_LOGADDR_WIDTH + 3 - 1,
- CPUINFO_INT_PAGE_SHIFT,
- CPUINFO_INT_PAGE_SHIFT_LAST = CPUINFO_INT_PAGE_SHIFT + 3 - 1,
- CPUINFO_INT_SP,
- CPUINFO_INT_PC,
- CPUINFO_INT_PREVIOUSPC,
- CPUINFO_INT_INPUT_STATE,
- CPUINFO_INT_INPUT_STATE_LAST = CPUINFO_INT_INPUT_STATE + MAX_INPUT_LINES - 1,
- CPUINFO_INT_OUTPUT_STATE,
- CPUINFO_INT_OUTPUT_STATE_LAST = CPUINFO_INT_OUTPUT_STATE + MAX_OUTPUT_LINES - 1,
- CPUINFO_INT_REGISTER,
- CPUINFO_INT_REGISTER_LAST = CPUINFO_INT_REGISTER + MAX_REGS - 1,
- CPUINFO_INT_CPU_SPECIFIC = 0x08000,
- CPUINFO_PTR_FIRST = 0x10000,
- CPUINFO_PTR_SET_INFO = CPUINFO_PTR_FIRST,
- CPUINFO_PTR_GET_CONTEXT,
- CPUINFO_PTR_SET_CONTEXT,
- CPUINFO_PTR_INIT,
- CPUINFO_PTR_RESET,
- CPUINFO_PTR_EXIT,
- CPUINFO_PTR_EXECUTE,
- CPUINFO_PTR_BURN,
- CPUINFO_PTR_DISASSEMBLE,
- CPUINFO_PTR_DISASSEMBLE_NEW,
- CPUINFO_PTR_TRANSLATE,
- CPUINFO_PTR_READ,
- CPUINFO_PTR_WRITE,
- CPUINFO_PTR_READOP,
- CPUINFO_PTR_DEBUG_SETUP_COMMANDS,
- CPUINFO_PTR_INSTRUCTION_COUNTER,
- CPUINFO_PTR_REGISTER_LAYOUT,
- CPUINFO_PTR_WINDOW_LAYOUT,
- CPUINFO_PTR_INTERNAL_MEMORY_MAP,
- CPUINFO_PTR_INTERNAL_MEMORY_MAP_LAST = CPUINFO_PTR_INTERNAL_MEMORY_MAP + 3 - 1,
- CPUINFO_PTR_DEBUG_REGISTER_LIST,
- CPUINFO_PTR_CPU_SPECIFIC = 0x18000,
- CPUINFO_STR_FIRST = 0x20000,
- CPUINFO_STR_NAME = CPUINFO_STR_FIRST,
- CPUINFO_STR_CORE_FAMILY,
- CPUINFO_STR_CORE_VERSION,
- CPUINFO_STR_CORE_FILE,
- CPUINFO_STR_CORE_CREDITS,
- CPUINFO_STR_FLAGS,
- CPUINFO_STR_REGISTER,
- CPUINFO_STR_REGISTER_LAST = CPUINFO_STR_REGISTER + MAX_REGS - 1,
- CPUINFO_STR_CPU_SPECIFIC = 0x28000
- };
- union cpuinfo
- {
- INT64 i;
- void * p;
- genf * f;
- char * s;
- void (*setinfo)(UINT32 state, union cpuinfo *info);
- void (*getcontext)(void *context);
- void (*setcontext)(void *context);
- void (*init)(int index, int clock, const void *config, int (*irqcallback)(int));
- void (*reset)(void);
- void (*exit)(void);
- int (*execute)(int cycles);
- void (*burn)(int cycles);
- offs_t (*disassemble)(char *buffer, offs_t pc);
- offs_t (*disassemble_new)(char *buffer, offs_t pc, UINT8 *oprom, UINT8 *opram, int bytes);
- int (*translate)(int space, offs_t *address);
- int (*read)(int space, UINT32 offset, int size, UINT64 *value);
- int (*write)(int space, UINT32 offset, int size, UINT64 value);
- int (*readop)(UINT32 offset, int size, UINT64 *value);
- void (*setup_commands)(void);
- int * icount;
- construct_map_t internal_map;
- };
- enum
- {
- REG_PREVIOUSPC = CPUINFO_INT_PREVIOUSPC - CPUINFO_INT_REGISTER,
- REG_PC = CPUINFO_INT_PC - CPUINFO_INT_REGISTER,
- REG_SP = CPUINFO_INT_SP - CPUINFO_INT_REGISTER
- };
- enum
- {
- CPU_IS_LE = 0,
- CPU_IS_BE
- };
- # 409 "./src/cpuintrf.h"
- struct _cpu_interface
- {
- void (*get_info)(UINT32 state, union cpuinfo *info);
- void (*set_info)(UINT32 state, union cpuinfo *info);
- void (*get_context)(void *buffer);
- void (*set_context)(void *buffer);
- void (*init)(int index, int clock, const void *config, int (*irqcallback)(int));
- void (*reset)(void);
- void (*exit)(void);
- int (*execute)(int cycles);
- void (*burn)(int cycles);
- offs_t (*disassemble)(char *buffer, offs_t pc);
- offs_t (*disassemble_new)(char *buffer, offs_t pc, UINT8 *oprom, UINT8 *opram, int bytes);
- int (*translate)(int space, offs_t *address);
- size_t context_size;
- INT8 address_shift;
- int * icount;
- };
- typedef struct _cpu_interface cpu_interface;
- # 441 "./src/cpuintrf.h"
- void cpuintrf_init(void);
- int cpuintrf_init_cpu(int cpunum, int cputype, int clock, const void *config, int (*irqcallback)(int));
- void cpuintrf_exit_cpu(int cpunum);
- void cpuintrf_push_context(int cpunum);
- void cpuintrf_pop_context(void);
- char *cpuintrf_temp_str(void);
- void cpuintrf_set_dasm_override(offs_t (*dasm_override)(int cpunum, char *buffer, offs_t pc));
- # 470 "./src/cpuintrf.h"
- INT64 activecpu_get_info_int(UINT32 state);
- void *activecpu_get_info_ptr(UINT32 state);
- genf *activecpu_get_info_fct(UINT32 state);
- const char *activecpu_get_info_string(UINT32 state);
- void activecpu_set_info_int(UINT32 state, INT64 data);
- void activecpu_set_info_ptr(UINT32 state, void *data);
- void activecpu_set_info_fct(UINT32 state, genf *data);
- void activecpu_adjust_icount(int delta);
- int activecpu_get_icount(void);
- void activecpu_reset_banking(void);
- void activecpu_set_input_line(int irqline, int state);
- offs_t activecpu_get_physical_pc_byte(void);
- void activecpu_set_opbase(offs_t val);
- offs_t activecpu_dasm(char *buffer, offs_t pc);
- offs_t activecpu_dasm_new(char *buffer, offs_t pc, UINT8 *oprom, UINT8 *opram, int bytes);
- const char *activecpu_dump_state(void);
- # 544 "./src/cpuintrf.h"
- INT64 cpunum_get_info_int(int cpunum, UINT32 state);
- void *cpunum_get_info_ptr(int cpunum, UINT32 state);
- genf *cpunum_get_info_fct(int cpunum, UINT32 state);
- const char *cpunum_get_info_string(int cpunum, UINT32 state);
- void cpunum_set_info_int(int cpunum, UINT32 state, INT64 data);
- void cpunum_set_info_ptr(int cpunum, UINT32 state, void *data);
- void cpunum_set_info_fct(int cpunum, UINT32 state, genf *data);
- int cpunum_execute(int cpunum, int cycles);
- void cpunum_reset(int cpunum);
- UINT8 cpunum_read_byte(int cpunum, offs_t address);
- void cpunum_write_byte(int cpunum, offs_t address, UINT8 data);
- void *cpunum_get_context_ptr(int cpunum);
- offs_t cpunum_get_physical_pc_byte(int cpunum);
- void cpunum_set_opbase(int cpunum, offs_t val);
- offs_t cpunum_dasm(int cpunum, char *buffer, offs_t pc);
- offs_t cpunum_dasm_new(int cpunum, char *buffer, offs_t pc, UINT8 *oprom, UINT8 *opram, int bytes);
- const char *cpunum_dump_state(int cpunum);
- # 622 "./src/cpuintrf.h"
- INT64 cputype_get_info_int(int cputype, UINT32 state);
- void *cputype_get_info_ptr(int cputype, UINT32 state);
- genf *cputype_get_info_fct(int cputype, UINT32 state);
- const char *cputype_get_info_string(int cputype, UINT32 state);
- # 659 "./src/cpuintrf.h"
- void cpu_dump_states(void);
- # 682 "./src/cpuintrf.h"
- static __inline__ const cpu_interface *cputype_get_interface(int cputype)
- {
- extern cpu_interface cpuintrf[];
- return &cpuintrf[cputype];
- }
- static __inline__ int cpu_getactivecpu(void)
- {
- extern int activecpu;
- return activecpu;
- }
- static __inline__ int cpu_getexecutingcpu(void)
- {
- extern int executingcpu;
- return executingcpu;
- }
- static __inline__ int cpu_gettotalcpu(void)
- {
- extern int totalcpu;
- return totalcpu;
- }
- static __inline__ offs_t safe_activecpu_get_pc(void)
- {
- return (cpu_getactivecpu() >= 0) ? ((offs_t)activecpu_get_info_int(CPUINFO_INT_REGISTER + (REG_PC))) : ~0;
- }
- # 32 "src/cpu/sh2/sh2.h" 2
- # 52 "src/cpu/sh2/sh2.h"
- enum {
- SH2_PC=1, SH2_SR, SH2_PR, SH2_GBR, SH2_VBR, SH2_MACH, SH2_MACL,
- SH2_R0, SH2_R1, SH2_R2, SH2_R3, SH2_R4, SH2_R5, SH2_R6, SH2_R7,
- SH2_R8, SH2_R9, SH2_R10, SH2_R11, SH2_R12, SH2_R13, SH2_R14, SH2_R15, SH2_EA
- };
- enum
- {
- CPUINFO_INT_SH2_FRT_INPUT = CPUINFO_INT_CPU_SPECIFIC
- };
- enum
- {
- CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK = CPUINFO_PTR_CPU_SPECIFIC,
- };
- struct sh2_config
- {
- int is_slave;
- };
- extern void sh2_get_info(UINT32 state, union cpuinfo *info);
- void sh2_internal_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 data, __attribute__((__unused__)) UINT32 mem_mask);
- UINT32 sh2_internal_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
- # 106 "src/cpu/sh2/sh2.c" 2
- # 118 "src/cpu/sh2/sh2.c"
- typedef struct
- {
- int irq_vector;
- int irq_priority;
- } irq_entry;
- typedef struct
- {
- UINT32 ppc;
- UINT32 pc;
- UINT32 pr;
- UINT32 sr;
- UINT32 gbr, vbr;
- UINT32 mach, macl;
- UINT32 r[16];
- UINT32 ea;
- UINT32 delay;
- UINT32 cpu_off;
- UINT32 dvsr, dvdnth, dvdntl, dvcr;
- UINT32 pending_irq;
- UINT32 test_irq;
- irq_entry irq_queue[16];
- INT8 irq_line_state[17];
- int (*irq_callback)(int irqline);
- UINT32 *m;
- INT8 nmi_line_state;
- UINT16 frc;
- UINT16 ocra, ocrb, icr;
- UINT32 frc_base;
- int frt_input;
- int internal_irq_level;
- int internal_irq_vector;
- void *timer;
- void *dma_timer[2];
- int dma_timer_active[2];
- int is_slave, cpu_number;
- void (*ftcsr_read_callback)(UINT32 data);
- } SH2;
- static int sh2_icount;
- static SH2 sh2;
- static const int div_tab[4] = { 3, 5, 3, 0 };
- enum {
- ICF = 0x00800000,
- OCFA = 0x00080000,
- OCFB = 0x00040000,
- OVF = 0x00020000
- };
- static void sh2_timer_callback(int data);
- # 193 "src/cpu/sh2/sh2.c"
- static __inline__ UINT8 RB(offs_t A)
- {
- if (A >= 0xe0000000)
- return sh2_internal_r((A & 0x1fc)>>2, ~(0xff << (((~A) & 3)*8))) >> (((~A) & 3)*8);
- if (A >= 0xc0000000)
- return program_read_byte_32be(A);
- if (A >= 0x40000000)
- return 0xa5;
- return program_read_byte_32be(A & 0x07ffffff);
- }
- static __inline__ UINT16 RW(offs_t A)
- {
- if (A >= 0xe0000000)
- return sh2_internal_r((A & 0x1fc)>>2, ~(0xffff << (((~A) & 2)*8))) >> (((~A) & 2)*8);
- if (A >= 0xc0000000)
- return program_read_word_32be(A);
- if (A >= 0x40000000)
- return 0xa5a5;
- return program_read_word_32be(A & 0x07ffffff);
- }
- static __inline__ UINT32 RL(offs_t A)
- {
- if (A >= 0xe0000000)
- return sh2_internal_r((A & 0x1fc)>>2, 0);
- if (A >= 0xc0000000)
- return program_read_dword_32be(A);
- if (A >= 0x40000000)
- return 0xa5a5a5a5;
- return program_read_dword_32be(A & 0x07ffffff);
- }
- static __inline__ void WB(offs_t A, UINT8 V)
- {
- if (A >= 0xe0000000)
- {
- sh2_internal_w((A & 0x1fc)>>2, V << (((~A) & 3)*8), ~(0xff << (((~A) & 3)*8)));
- return;
- }
- if (A >= 0xc0000000)
- {
- program_write_byte_32be(A,V);
- return;
- }
- if (A >= 0x40000000)
- return;
- program_write_byte_32be(A & 0x07ffffff,V);
- }
- static __inline__ void WW(offs_t A, UINT16 V)
- {
- if (A >= 0xe0000000)
- {
- sh2_internal_w((A & 0x1fc)>>2, V << (((~A) & 2)*8), ~(0xffff << (((~A) & 2)*8)));
- return;
- }
- if (A >= 0xc0000000)
- {
- program_write_word_32be(A,V);
- return;
- }
- if (A >= 0x40000000)
- return;
- program_write_word_32be(A & 0x07ffffff,V);
- }
- static __inline__ void WL(offs_t A, UINT32 V)
- {
- if (A >= 0xe0000000)
- {
- sh2_internal_w((A & 0x1fc)>>2, V, 0);
- return;
- }
- if (A >= 0xc0000000)
- {
- program_write_dword_32be(A,V);
- return;
- }
- if (A >= 0x40000000)
- return;
- program_write_dword_32be(A & 0x07ffffff,V);
- }
- static __inline__ void sh2_exception(const char *message, int irqline)
- {
- int vector;
- if (irqline != 16)
- {
- if (irqline <= ((sh2.sr >> 4) & 15))
- return;
- if (sh2.internal_irq_level == irqline)
- {
- vector = sh2.internal_irq_vector;
- ;
- }
- else
- {
- if(sh2.m[0x38] & 0x00010000)
- {
- vector = sh2.irq_callback(irqline);
- ;
- }
- else
- {
- sh2.irq_callback(irqline);
- vector = 64 + irqline/2;
- ;
- }
- }
- }
- else
- {
- vector = 11;
- ;
- }
- sh2.r[15] -= 4;
- WL( sh2.r[15], sh2.sr );
- sh2.r[15] -= 4;
- WL( sh2.r[15], sh2.pc );
- if (irqline > 15)
- sh2.sr = sh2.sr | 0x000000f0;
- else
- sh2.sr = (sh2.sr & ~0x000000f0) | (irqline << 4);
- sh2.pc = RL( sh2.vbr + vector * 4 );
- do { if (active_address_space[0].readlookup[(((sh2.pc & 0x07ffffff) & active_address_space[0].addrmask) >> (32 - 18))] != opcode_entry) memory_set_opbase(sh2.pc & 0x07ffffff); } while (0);
- }
- # 373 "src/cpu/sh2/sh2.c"
- static UINT8 sh2_reg_layout[] = {
- SH2_PC, SH2_R15, SH2_SR, SH2_PR, -1,
- SH2_GBR, SH2_VBR, SH2_MACH, SH2_MACL,-1,
- SH2_R0, SH2_R1, SH2_R2, SH2_R3, -1,
- SH2_R4, SH2_R5, SH2_R6, SH2_R7, -1,
- SH2_R8, SH2_R9, SH2_R10, SH2_R11, -1,
- SH2_R12, SH2_R13, SH2_R14, SH2_EA, 0
- };
- static UINT8 sh2_win_layout[] = {
- 0, 0,80, 6,
- 0, 7,39,15,
- 40, 7,39, 7,
- 40,15,39, 7,
- 0,23,80, 1,
- };
- static __inline__ void ADD(UINT32 m, UINT32 n)
- {
- sh2.r[n] += sh2.r[m];
- }
- static __inline__ void ADDI(UINT32 i, UINT32 n)
- {
- sh2.r[n] += (INT32)(INT16)(INT8)i;
- }
- static __inline__ void ADDC(UINT32 m, UINT32 n)
- {
- UINT32 tmp0, tmp1;
- tmp1 = sh2.r[n] + sh2.r[m];
- tmp0 = sh2.r[n];
- sh2.r[n] = tmp1 + (sh2.sr & 0x00000001);
- if (tmp0 > tmp1)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- if (tmp1 > sh2.r[n])
- sh2.sr |= 0x00000001;
- }
- static __inline__ void ADDV(UINT32 m, UINT32 n)
- {
- INT32 dest, src, ans;
- if ((INT32) sh2.r[n] >= 0)
- dest = 0;
- else
- dest = 1;
- if ((INT32) sh2.r[m] >= 0)
- src = 0;
- else
- src = 1;
- src += dest;
- sh2.r[n] += sh2.r[m];
- if ((INT32) sh2.r[n] >= 0)
- ans = 0;
- else
- ans = 1;
- ans += dest;
- if (src == 0 || src == 2)
- {
- if (ans == 1)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void AND(UINT32 m, UINT32 n)
- {
- sh2.r[n] &= sh2.r[m];
- }
- static __inline__ void ANDI(UINT32 i)
- {
- sh2.r[0] &= i;
- }
- static __inline__ void ANDM(UINT32 i)
- {
- UINT32 temp;
- sh2.ea = sh2.gbr + sh2.r[0];
- temp = i & RB( sh2.ea );
- WB( sh2.ea, temp );
- sh2_icount -= 2;
- }
- static __inline__ void BF(UINT32 d)
- {
- if ((sh2.sr & 0x00000001) == 0)
- {
- INT32 disp = ((INT32)d << 24) >> 24;
- sh2.pc = sh2.ea = sh2.pc + disp * 2 + 2;
- do { if (active_address_space[0].readlookup[(((sh2.pc & 0x07ffffff) & active_address_space[0].addrmask) >> (32 - 18))] != opcode_entry) memory_set_opbase(sh2.pc & 0x07ffffff); } while (0);
- sh2_icount -= 2;
- }
- }
- static __inline__ void BFS(UINT32 d)
- {
- if ((sh2.sr & 0x00000001) == 0)
- {
- INT32 disp = ((INT32)d << 24) >> 24;
- sh2.delay = sh2.pc;
- sh2.pc = sh2.ea = sh2.pc + disp * 2 + 2;
- sh2_icount--;
- }
- }
- static __inline__ void BRA(UINT32 d)
- {
- INT32 disp = ((INT32)d << 20) >> 20;
- if (disp == -2)
- {
- UINT32 next_opcode = RW(sh2.ppc & 0x07ffffff);
- if (next_opcode == 0x0009)
- sh2_icount %= 3;
- }
- sh2.delay = sh2.pc;
- sh2.pc = sh2.ea = sh2.pc + disp * 2 + 2;
- sh2_icount--;
- }
- static __inline__ void BRAF(UINT32 m)
- {
- sh2.delay = sh2.pc;
- sh2.pc += sh2.r[m] + 2;
- sh2_icount--;
- }
- static __inline__ void BSR(UINT32 d)
- {
- INT32 disp = ((INT32)d << 20) >> 20;
- sh2.pr = sh2.pc + 2;
- sh2.delay = sh2.pc;
- sh2.pc = sh2.ea = sh2.pc + disp * 2 + 2;
- sh2_icount--;
- }
- static __inline__ void BSRF(UINT32 m)
- {
- sh2.pr = sh2.pc + 2;
- sh2.delay = sh2.pc;
- sh2.pc += sh2.r[m] + 2;
- sh2_icount--;
- }
- static __inline__ void BT(UINT32 d)
- {
- if ((sh2.sr & 0x00000001) != 0)
- {
- INT32 disp = ((INT32)d << 24) >> 24;
- sh2.pc = sh2.ea = sh2.pc + disp * 2 + 2;
- do { if (active_address_space[0].readlookup[(((sh2.pc & 0x07ffffff) & active_address_space[0].addrmask) >> (32 - 18))] != opcode_entry) memory_set_opbase(sh2.pc & 0x07ffffff); } while (0);
- sh2_icount -= 2;
- }
- }
- static __inline__ void BTS(UINT32 d)
- {
- if ((sh2.sr & 0x00000001) != 0)
- {
- INT32 disp = ((INT32)d << 24) >> 24;
- sh2.delay = sh2.pc;
- sh2.pc = sh2.ea = sh2.pc + disp * 2 + 2;
- sh2_icount--;
- }
- }
- static __inline__ void CLRMAC(void)
- {
- sh2.mach = 0;
- sh2.macl = 0;
- }
- static __inline__ void CLRT(void)
- {
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void CMPEQ(UINT32 m, UINT32 n)
- {
- if (sh2.r[n] == sh2.r[m])
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void CMPGE(UINT32 m, UINT32 n)
- {
- if ((INT32) sh2.r[n] >= (INT32) sh2.r[m])
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void CMPGT(UINT32 m, UINT32 n)
- {
- if ((INT32) sh2.r[n] > (INT32) sh2.r[m])
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void CMPHI(UINT32 m, UINT32 n)
- {
- if ((UINT32) sh2.r[n] > (UINT32) sh2.r[m])
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void CMPHS(UINT32 m, UINT32 n)
- {
- if ((UINT32) sh2.r[n] >= (UINT32) sh2.r[m])
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void CMPPL(UINT32 n)
- {
- if ((INT32) sh2.r[n] > 0)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void CMPPZ(UINT32 n)
- {
- if ((INT32) sh2.r[n] >= 0)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void CMPSTR(UINT32 m, UINT32 n)
- {
- UINT32 temp;
- INT32 HH, HL, LH, LL;
- temp = sh2.r[n] ^ sh2.r[m];
- HH = (temp >> 24) & 0xff;
- HL = (temp >> 16) & 0xff;
- LH = (temp >> 8) & 0xff;
- LL = temp & 0xff;
- if (HH && HL && LH && LL)
- sh2.sr &= ~0x00000001;
- else
- sh2.sr |= 0x00000001;
- }
- static __inline__ void CMPIM(UINT32 i)
- {
- UINT32 imm = (UINT32)(INT32)(INT16)(INT8)i;
- if (sh2.r[0] == imm)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void DIV0S(UINT32 m, UINT32 n)
- {
- if ((sh2.r[n] & 0x80000000) == 0)
- sh2.sr &= ~0x00000100;
- else
- sh2.sr |= 0x00000100;
- if ((sh2.r[m] & 0x80000000) == 0)
- sh2.sr &= ~0x00000200;
- else
- sh2.sr |= 0x00000200;
- if ((sh2.r[m] ^ sh2.r[n]) & 0x80000000)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void DIV0U(void)
- {
- sh2.sr &= ~(0x00000200 | 0x00000100 | 0x00000001);
- }
- static __inline__ void DIV1(UINT32 m, UINT32 n)
- {
- UINT32 tmp0;
- UINT32 old_q;
- old_q = sh2.sr & 0x00000100;
- if (0x80000000 & sh2.r[n])
- sh2.sr |= 0x00000100;
- else
- sh2.sr &= ~0x00000100;
- sh2.r[n] = (sh2.r[n] << 1) | (sh2.sr & 0x00000001);
- if (!old_q)
- {
- if (!(sh2.sr & 0x00000200))
- {
- tmp0 = sh2.r[n];
- sh2.r[n] -= sh2.r[m];
- if(!(sh2.sr & 0x00000100))
- if(sh2.r[n] > tmp0)
- sh2.sr |= 0x00000100;
- else
- sh2.sr &= ~0x00000100;
- else
- if(sh2.r[n] > tmp0)
- sh2.sr &= ~0x00000100;
- else
- sh2.sr |= 0x00000100;
- }
- else
- {
- tmp0 = sh2.r[n];
- sh2.r[n] += sh2.r[m];
- if(!(sh2.sr & 0x00000100))
- {
- if(sh2.r[n] < tmp0)
- sh2.sr &= ~0x00000100;
- else
- sh2.sr |= 0x00000100;
- }
- else
- {
- if(sh2.r[n] < tmp0)
- sh2.sr |= 0x00000100;
- else
- sh2.sr &= ~0x00000100;
- }
- }
- }
- else
- {
- if (!(sh2.sr & 0x00000200))
- {
- tmp0 = sh2.r[n];
- sh2.r[n] += sh2.r[m];
- if(!(sh2.sr & 0x00000100))
- if(sh2.r[n] < tmp0)
- sh2.sr |= 0x00000100;
- else
- sh2.sr &= ~0x00000100;
- else
- if(sh2.r[n] < tmp0)
- sh2.sr &= ~0x00000100;
- else
- sh2.sr |= 0x00000100;
- }
- else
- {
- tmp0 = sh2.r[n];
- sh2.r[n] -= sh2.r[m];
- if(!(sh2.sr & 0x00000100))
- if(sh2.r[n] > tmp0)
- sh2.sr &= ~0x00000100;
- else
- sh2.sr |= 0x00000100;
- else
- if(sh2.r[n] > tmp0)
- sh2.sr |= 0x00000100;
- else
- sh2.sr &= ~0x00000100;
- }
- }
- tmp0 = (sh2.sr & (0x00000100 | 0x00000200));
- if((!tmp0) || (tmp0 == 0x300))
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void DMULS(UINT32 m, UINT32 n)
- {
- UINT32 RnL, RnH, RmL, RmH, Res0, Res1, Res2;
- UINT32 temp0, temp1, temp2, temp3;
- INT32 tempm, tempn, fnLmL;
- tempn = (INT32) sh2.r[n];
- tempm = (INT32) sh2.r[m];
- if (tempn < 0)
- tempn = 0 - tempn;
- if (tempm < 0)
- tempm = 0 - tempm;
- if ((INT32) (sh2.r[n] ^ sh2.r[m]) < 0)
- fnLmL = -1;
- else
- fnLmL = 0;
- temp1 = (UINT32) tempn;
- temp2 = (UINT32) tempm;
- RnL = temp1 & 0x0000ffff;
- RnH = (temp1 >> 16) & 0x0000ffff;
- RmL = temp2 & 0x0000ffff;
- RmH = (temp2 >> 16) & 0x0000ffff;
- temp0 = RmL * RnL;
- temp1 = RmH * RnL;
- temp2 = RmL * RnH;
- temp3 = RmH * RnH;
- Res2 = 0;
- Res1 = temp1 + temp2;
- if (Res1 < temp1)
- Res2 += 0x00010000;
- temp1 = (Res1 << 16) & 0xffff0000;
- Res0 = temp0 + temp1;
- if (Res0 < temp0)
- Res2++;
- Res2 = Res2 + ((Res1 >> 16) & 0x0000ffff) + temp3;
- if (fnLmL < 0)
- {
- Res2 = ~Res2;
- if (Res0 == 0)
- Res2++;
- else
- Res0 = (~Res0) + 1;
- }
- sh2.mach = Res2;
- sh2.macl = Res0;
- sh2_icount--;
- }
- static __inline__ void DMULU(UINT32 m, UINT32 n)
- {
- UINT32 RnL, RnH, RmL, RmH, Res0, Res1, Res2;
- UINT32 temp0, temp1, temp2, temp3;
- RnL = sh2.r[n] & 0x0000ffff;
- RnH = (sh2.r[n] >> 16) & 0x0000ffff;
- RmL = sh2.r[m] & 0x0000ffff;
- RmH = (sh2.r[m] >> 16) & 0x0000ffff;
- temp0 = RmL * RnL;
- temp1 = RmH * RnL;
- temp2 = RmL * RnH;
- temp3 = RmH * RnH;
- Res2 = 0;
- Res1 = temp1 + temp2;
- if (Res1 < temp1)
- Res2 += 0x00010000;
- temp1 = (Res1 << 16) & 0xffff0000;
- Res0 = temp0 + temp1;
- if (Res0 < temp0)
- Res2++;
- Res2 = Res2 + ((Res1 >> 16) & 0x0000ffff) + temp3;
- sh2.mach = Res2;
- sh2.macl = Res0;
- sh2_icount--;
- }
- static __inline__ void DT(UINT32 n)
- {
- sh2.r[n]--;
- if (sh2.r[n] == 0)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- {
- UINT32 next_opcode = RW(sh2.ppc & 0x07ffffff);
- if (next_opcode == 0x8bfd)
- {
- while (sh2.r[n] > 1 && sh2_icount > 4)
- {
- sh2.r[n]--;
- sh2_icount -= 4;
- }
- }
- }
- }
- static __inline__ void EXTSB(UINT32 m, UINT32 n)
- {
- sh2.r[n] = ((INT32)sh2.r[m] << 24) >> 24;
- }
- static __inline__ void EXTSW(UINT32 m, UINT32 n)
- {
- sh2.r[n] = ((INT32)sh2.r[m] << 16) >> 16;
- }
- static __inline__ void EXTUB(UINT32 m, UINT32 n)
- {
- sh2.r[n] = sh2.r[m] & 0x000000ff;
- }
- static __inline__ void EXTUW(UINT32 m, UINT32 n)
- {
- sh2.r[n] = sh2.r[m] & 0x0000ffff;
- }
- static __inline__ void JMP(UINT32 m)
- {
- sh2.delay = sh2.pc;
- sh2.pc = sh2.ea = sh2.r[m];
- }
- static __inline__ void JSR(UINT32 m)
- {
- sh2.delay = sh2.pc;
- sh2.pr = sh2.pc + 2;
- sh2.pc = sh2.ea = sh2.r[m];
- sh2_icount--;
- }
- static __inline__ void LDCSR(UINT32 m)
- {
- sh2.sr = sh2.r[m] & (0x00000200|0x00000100|0x000000f0|0x00000002|0x00000001);
- sh2.test_irq = 1;
- }
- static __inline__ void LDCGBR(UINT32 m)
- {
- sh2.gbr = sh2.r[m];
- }
- static __inline__ void LDCVBR(UINT32 m)
- {
- sh2.vbr = sh2.r[m];
- }
- static __inline__ void LDCMSR(UINT32 m)
- {
- sh2.ea = sh2.r[m];
- sh2.sr = RL( sh2.ea ) & (0x00000200|0x00000100|0x000000f0|0x00000002|0x00000001);
- sh2.r[m] += 4;
- sh2_icount -= 2;
- sh2.test_irq = 1;
- }
- static __inline__ void LDCMGBR(UINT32 m)
- {
- sh2.ea = sh2.r[m];
- sh2.gbr = RL( sh2.ea );
- sh2.r[m] += 4;
- sh2_icount -= 2;
- }
- static __inline__ void LDCMVBR(UINT32 m)
- {
- sh2.ea = sh2.r[m];
- sh2.vbr = RL( sh2.ea );
- sh2.r[m] += 4;
- sh2_icount -= 2;
- }
- static __inline__ void LDSMACH(UINT32 m)
- {
- sh2.mach = sh2.r[m];
- }
- static __inline__ void LDSMACL(UINT32 m)
- {
- sh2.macl = sh2.r[m];
- }
- static __inline__ void LDSPR(UINT32 m)
- {
- sh2.pr = sh2.r[m];
- }
- static __inline__ void LDSMMACH(UINT32 m)
- {
- sh2.ea = sh2.r[m];
- sh2.mach = RL( sh2.ea );
- sh2.r[m] += 4;
- }
- static __inline__ void LDSMMACL(UINT32 m)
- {
- sh2.ea = sh2.r[m];
- sh2.macl = RL( sh2.ea );
- sh2.r[m] += 4;
- }
- static __inline__ void LDSMPR(UINT32 m)
- {
- sh2.ea = sh2.r[m];
- sh2.pr = RL( sh2.ea );
- sh2.r[m] += 4;
- }
- static __inline__ void MAC_L(UINT32 m, UINT32 n)
- {
- UINT32 RnL, RnH, RmL, RmH, Res0, Res1, Res2;
- UINT32 temp0, temp1, temp2, temp3;
- INT32 tempm, tempn, fnLmL;
- tempn = (INT32) RL( sh2.r[n] );
- sh2.r[n] += 4;
- tempm = (INT32) RL( sh2.r[m] );
- sh2.r[m] += 4;
- if ((INT32) (tempn ^ tempm) < 0)
- fnLmL = -1;
- else
- fnLmL = 0;
- if (tempn < 0)
- tempn = 0 - tempn;
- if (tempm < 0)
- tempm = 0 - tempm;
- temp1 = (UINT32) tempn;
- temp2 = (UINT32) tempm;
- RnL = temp1 & 0x0000ffff;
- RnH = (temp1 >> 16) & 0x0000ffff;
- RmL = temp2 & 0x0000ffff;
- RmH = (temp2 >> 16) & 0x0000ffff;
- temp0 = RmL * RnL;
- temp1 = RmH * RnL;
- temp2 = RmL * RnH;
- temp3 = RmH * RnH;
- Res2 = 0;
- Res1 = temp1 + temp2;
- if (Res1 < temp1)
- Res2 += 0x00010000;
- temp1 = (Res1 << 16) & 0xffff0000;
- Res0 = temp0 + temp1;
- if (Res0 < temp0)
- Res2++;
- Res2 = Res2 + ((Res1 >> 16) & 0x0000ffff) + temp3;
- if (fnLmL < 0)
- {
- Res2 = ~Res2;
- if (Res0 == 0)
- Res2++;
- else
- Res0 = (~Res0) + 1;
- }
- if (sh2.sr & 0x00000002)
- {
- Res0 = sh2.macl + Res0;
- if (sh2.macl > Res0)
- Res2++;
- Res2 += (sh2.mach & 0x0000ffff);
- if (((INT32) Res2 < 0) && (Res2 < 0xffff8000))
- {
- Res2 = 0x00008000;
- Res0 = 0x00000000;
- }
- else if (((INT32) Res2 > 0) && (Res2 > 0x00007fff))
- {
- Res2 = 0x00007fff;
- Res0 = 0xffffffff;
- }
- sh2.mach = Res2;
- sh2.macl = Res0;
- }
- else
- {
- Res0 = sh2.macl + Res0;
- if (sh2.macl > Res0)
- Res2++;
- Res2 += sh2.mach;
- sh2.mach = Res2;
- sh2.macl = Res0;
- }
- sh2_icount -= 2;
- }
- static __inline__ void MAC_W(UINT32 m, UINT32 n)
- {
- INT32 tempm, tempn, dest, src, ans;
- UINT32 templ;
- tempn = (INT32) RW( sh2.r[n] );
- sh2.r[n] += 2;
- tempm = (INT32) RW( sh2.r[m] );
- sh2.r[m] += 2;
- templ = sh2.macl;
- tempm = ((INT32) (short) tempn * (INT32) (short) tempm);
- if ((INT32) sh2.macl >= 0)
- dest = 0;
- else
- dest = 1;
- if ((INT32) tempm >= 0)
- {
- src = 0;
- tempn = 0;
- }
- else
- {
- src = 1;
- tempn = 0xffffffff;
- }
- src += dest;
- sh2.macl += tempm;
- if ((INT32) sh2.macl >= 0)
- ans = 0;
- else
- ans = 1;
- ans += dest;
- if (sh2.sr & 0x00000002)
- {
- if (ans == 1)
- {
- if (src == 0)
- sh2.macl = 0x7fffffff;
- if (src == 2)
- sh2.macl = 0x80000000;
- }
- }
- else
- {
- sh2.mach += tempn;
- if (templ > sh2.macl)
- sh2.mach += 1;
- }
- sh2_icount -= 2;
- }
- static __inline__ void MOV(UINT32 m, UINT32 n)
- {
- sh2.r[n] = sh2.r[m];
- }
- static __inline__ void MOVBS(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[n];
- WB( sh2.ea, sh2.r[m] & 0x000000ff);
- }
- static __inline__ void MOVWS(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[n];
- WW( sh2.ea, sh2.r[m] & 0x0000ffff);
- }
- static __inline__ void MOVLS(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[n];
- WL( sh2.ea, sh2.r[m] );
- }
- static __inline__ void MOVBL(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[m];
- sh2.r[n] = (UINT32)(INT32)(INT16)(INT8) RB( sh2.ea );
- }
- static __inline__ void MOVWL(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[m];
- sh2.r[n] = (UINT32)(INT32)(INT16) RW( sh2.ea );
- }
- static __inline__ void MOVLL(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[m];
- sh2.r[n] = RL( sh2.ea );
- }
- static __inline__ void MOVBM(UINT32 m, UINT32 n)
- {
- UINT32 data = sh2.r[m] & 0x000000ff;
- sh2.r[n] -= 1;
- WB( sh2.r[n], data );
- }
- static __inline__ void MOVWM(UINT32 m, UINT32 n)
- {
- UINT32 data = sh2.r[m] & 0x0000ffff;
- sh2.r[n] -= 2;
- WW( sh2.r[n], data );
- }
- static __inline__ void MOVLM(UINT32 m, UINT32 n)
- {
- UINT32 data = sh2.r[m];
- sh2.r[n] -= 4;
- WL( sh2.r[n], data );
- }
- static __inline__ void MOVBP(UINT32 m, UINT32 n)
- {
- sh2.r[n] = (UINT32)(INT32)(INT16)(INT8) RB( sh2.r[m] );
- if (n != m)
- sh2.r[m] += 1;
- }
- static __inline__ void MOVWP(UINT32 m, UINT32 n)
- {
- sh2.r[n] = (UINT32)(INT32)(INT16) RW( sh2.r[m] );
- if (n != m)
- sh2.r[m] += 2;
- }
- static __inline__ void MOVLP(UINT32 m, UINT32 n)
- {
- sh2.r[n] = RL( sh2.r[m] );
- if (n != m)
- sh2.r[m] += 4;
- }
- static __inline__ void MOVBS0(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[n] + sh2.r[0];
- WB( sh2.ea, sh2.r[m] & 0x000000ff );
- }
- static __inline__ void MOVWS0(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[n] + sh2.r[0];
- WW( sh2.ea, sh2.r[m] & 0x0000ffff );
- }
- static __inline__ void MOVLS0(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[n] + sh2.r[0];
- WL( sh2.ea, sh2.r[m] );
- }
- static __inline__ void MOVBL0(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[m] + sh2.r[0];
- sh2.r[n] = (UINT32)(INT32)(INT16)(INT8) RB( sh2.ea );
- }
- static __inline__ void MOVWL0(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[m] + sh2.r[0];
- sh2.r[n] = (UINT32)(INT32)(INT16) RW( sh2.ea );
- }
- static __inline__ void MOVLL0(UINT32 m, UINT32 n)
- {
- sh2.ea = sh2.r[m] + sh2.r[0];
- sh2.r[n] = RL( sh2.ea );
- }
- static __inline__ void MOVI(UINT32 i, UINT32 n)
- {
- sh2.r[n] = (UINT32)(INT32)(INT16)(INT8) i;
- }
- static __inline__ void MOVWI(UINT32 d, UINT32 n)
- {
- UINT32 disp = d & 0xff;
- sh2.ea = sh2.pc + disp * 2 + 2;
- sh2.r[n] = (UINT32)(INT32)(INT16) RW( sh2.ea );
- }
- static __inline__ void MOVLI(UINT32 d, UINT32 n)
- {
- UINT32 disp = d & 0xff;
- sh2.ea = ((sh2.pc + 2) & ~3) + disp * 4;
- sh2.r[n] = RL( sh2.ea );
- }
- static __inline__ void MOVBLG(UINT32 d)
- {
- UINT32 disp = d & 0xff;
- sh2.ea = sh2.gbr + disp;
- sh2.r[0] = (UINT32)(INT32)(INT16)(INT8) RB( sh2.ea );
- }
- static __inline__ void MOVWLG(UINT32 d)
- {
- UINT32 disp = d & 0xff;
- sh2.ea = sh2.gbr + disp * 2;
- sh2.r[0] = (INT32)(INT16) RW( sh2.ea );
- }
- static __inline__ void MOVLLG(UINT32 d)
- {
- UINT32 disp = d & 0xff;
- sh2.ea = sh2.gbr + disp * 4;
- sh2.r[0] = RL( sh2.ea );
- }
- static __inline__ void MOVBSG(UINT32 d)
- {
- UINT32 disp = d & 0xff;
- sh2.ea = sh2.gbr + disp;
- WB( sh2.ea, sh2.r[0] & 0x000000ff );
- }
- static __inline__ void MOVWSG(UINT32 d)
- {
- UINT32 disp = d & 0xff;
- sh2.ea = sh2.gbr + disp * 2;
- WW( sh2.ea, sh2.r[0] & 0x0000ffff );
- }
- static __inline__ void MOVLSG(UINT32 d)
- {
- UINT32 disp = d & 0xff;
- sh2.ea = sh2.gbr + disp * 4;
- WL( sh2.ea, sh2.r[0] );
- }
- static __inline__ void MOVBS4(UINT32 d, UINT32 n)
- {
- UINT32 disp = d & 0x0f;
- sh2.ea = sh2.r[n] + disp;
- WB( sh2.ea, sh2.r[0] & 0x000000ff );
- }
- static __inline__ void MOVWS4(UINT32 d, UINT32 n)
- {
- UINT32 disp = d & 0x0f;
- sh2.ea = sh2.r[n] + disp * 2;
- WW( sh2.ea, sh2.r[0] & 0x0000ffff );
- }
- static __inline__ void MOVLS4(UINT32 m, UINT32 d, UINT32 n)
- {
- UINT32 disp = d & 0x0f;
- sh2.ea = sh2.r[n] + disp * 4;
- WL( sh2.ea, sh2.r[m] );
- }
- static __inline__ void MOVBL4(UINT32 m, UINT32 d)
- {
- UINT32 disp = d & 0x0f;
- sh2.ea = sh2.r[m] + disp;
- sh2.r[0] = (UINT32)(INT32)(INT16)(INT8) RB( sh2.ea );
- }
- static __inline__ void MOVWL4(UINT32 m, UINT32 d)
- {
- UINT32 disp = d & 0x0f;
- sh2.ea = sh2.r[m] + disp * 2;
- sh2.r[0] = (UINT32)(INT32)(INT16) RW( sh2.ea );
- }
- static __inline__ void MOVLL4(UINT32 m, UINT32 d, UINT32 n)
- {
- UINT32 disp = d & 0x0f;
- sh2.ea = sh2.r[m] + disp * 4;
- sh2.r[n] = RL( sh2.ea );
- }
- static __inline__ void MOVA(UINT32 d)
- {
- UINT32 disp = d & 0xff;
- sh2.ea = ((sh2.pc + 2) & ~3) + disp * 4;
- sh2.r[0] = sh2.ea;
- }
- static __inline__ void MOVT(UINT32 n)
- {
- sh2.r[n] = sh2.sr & 0x00000001;
- }
- static __inline__ void MULL(UINT32 m, UINT32 n)
- {
- sh2.macl = sh2.r[n] * sh2.r[m];
- sh2_icount--;
- }
- static __inline__ void MULS(UINT32 m, UINT32 n)
- {
- sh2.macl = (INT16) sh2.r[n] * (INT16) sh2.r[m];
- }
- static __inline__ void MULU(UINT32 m, UINT32 n)
- {
- sh2.macl = (UINT16) sh2.r[n] * (UINT16) sh2.r[m];
- }
- static __inline__ void NEG(UINT32 m, UINT32 n)
- {
- sh2.r[n] = 0 - sh2.r[m];
- }
- static __inline__ void NEGC(UINT32 m, UINT32 n)
- {
- UINT32 temp;
- temp = sh2.r[m];
- sh2.r[n] = -temp - (sh2.sr & 0x00000001);
- if (temp || (sh2.sr & 0x00000001))
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void NOP(void)
- {
- }
- static __inline__ void NOT(UINT32 m, UINT32 n)
- {
- sh2.r[n] = ~sh2.r[m];
- }
- static __inline__ void OR(UINT32 m, UINT32 n)
- {
- sh2.r[n] |= sh2.r[m];
- }
- static __inline__ void ORI(UINT32 i)
- {
- sh2.r[0] |= i;
- sh2_icount -= 2;
- }
- static __inline__ void ORM(UINT32 i)
- {
- UINT32 temp;
- sh2.ea = sh2.gbr + sh2.r[0];
- temp = RB( sh2.ea );
- temp |= i;
- WB( sh2.ea, temp );
- }
- static __inline__ void ROTCL(UINT32 n)
- {
- UINT32 temp;
- temp = (sh2.r[n] >> 31) & 0x00000001;
- sh2.r[n] = (sh2.r[n] << 1) | (sh2.sr & 0x00000001);
- sh2.sr = (sh2.sr & ~0x00000001) | temp;
- }
- static __inline__ void ROTCR(UINT32 n)
- {
- UINT32 temp;
- temp = (sh2.sr & 0x00000001) << 31;
- if (sh2.r[n] & 0x00000001)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- sh2.r[n] = (sh2.r[n] >> 1) | temp;
- }
- static __inline__ void ROTL(UINT32 n)
- {
- sh2.sr = (sh2.sr & ~0x00000001) | ((sh2.r[n] >> 31) & 0x00000001);
- sh2.r[n] = (sh2.r[n] << 1) | (sh2.r[n] >> 31);
- }
- static __inline__ void ROTR(UINT32 n)
- {
- sh2.sr = (sh2.sr & ~0x00000001) | (sh2.r[n] & 0x00000001);
- sh2.r[n] = (sh2.r[n] >> 1) | (sh2.r[n] << 31);
- }
- static __inline__ void RTE(void)
- {
- sh2.ea = sh2.r[15];
- sh2.delay = sh2.pc;
- sh2.pc = RL( sh2.ea );
- sh2.r[15] += 4;
- sh2.ea = sh2.r[15];
- sh2.sr = RL( sh2.ea ) & (0x00000200|0x00000100|0x000000f0|0x00000002|0x00000001);
- sh2.r[15] += 4;
- sh2_icount -= 3;
- sh2.test_irq = 1;
- }
- static __inline__ void RTS(void)
- {
- sh2.delay = sh2.pc;
- sh2.pc = sh2.ea = sh2.pr;
- sh2_icount--;
- }
- static __inline__ void SETT(void)
- {
- sh2.sr |= 0x00000001;
- }
- static __inline__ void SHAL(UINT32 n)
- {
- sh2.sr = (sh2.sr & ~0x00000001) | ((sh2.r[n] >> 31) & 0x00000001);
- sh2.r[n] <<= 1;
- }
- static __inline__ void SHAR(UINT32 n)
- {
- sh2.sr = (sh2.sr & ~0x00000001) | (sh2.r[n] & 0x00000001);
- sh2.r[n] = (UINT32)((INT32)sh2.r[n] >> 1);
- }
- static __inline__ void SHLL(UINT32 n)
- {
- sh2.sr = (sh2.sr & ~0x00000001) | ((sh2.r[n] >> 31) & 0x00000001);
- sh2.r[n] <<= 1;
- }
- static __inline__ void SHLL2(UINT32 n)
- {
- sh2.r[n] <<= 2;
- }
- static __inline__ void SHLL8(UINT32 n)
- {
- sh2.r[n] <<= 8;
- }
- static __inline__ void SHLL16(UINT32 n)
- {
- sh2.r[n] <<= 16;
- }
- static __inline__ void SHLR(UINT32 n)
- {
- sh2.sr = (sh2.sr & ~0x00000001) | (sh2.r[n] & 0x00000001);
- sh2.r[n] >>= 1;
- }
- static __inline__ void SHLR2(UINT32 n)
- {
- sh2.r[n] >>= 2;
- }
- static __inline__ void SHLR8(UINT32 n)
- {
- sh2.r[n] >>= 8;
- }
- static __inline__ void SHLR16(UINT32 n)
- {
- sh2.r[n] >>= 16;
- }
- static __inline__ void SLEEP(void)
- {
- sh2.pc -= 2;
- sh2_icount -= 2;
- }
- static __inline__ void STCSR(UINT32 n)
- {
- sh2.r[n] = sh2.sr;
- }
- static __inline__ void STCGBR(UINT32 n)
- {
- sh2.r[n] = sh2.gbr;
- }
- static __inline__ void STCVBR(UINT32 n)
- {
- sh2.r[n] = sh2.vbr;
- }
- static __inline__ void STCMSR(UINT32 n)
- {
- sh2.r[n] -= 4;
- sh2.ea = sh2.r[n];
- WL( sh2.ea, sh2.sr );
- sh2_icount--;
- }
- static __inline__ void STCMGBR(UINT32 n)
- {
- sh2.r[n] -= 4;
- sh2.ea = sh2.r[n];
- WL( sh2.ea, sh2.gbr );
- sh2_icount--;
- }
- static __inline__ void STCMVBR(UINT32 n)
- {
- sh2.r[n] -= 4;
- sh2.ea = sh2.r[n];
- WL( sh2.ea, sh2.vbr );
- sh2_icount--;
- }
- static __inline__ void STSMACH(UINT32 n)
- {
- sh2.r[n] = sh2.mach;
- }
- static __inline__ void STSMACL(UINT32 n)
- {
- sh2.r[n] = sh2.macl;
- }
- static __inline__ void STSPR(UINT32 n)
- {
- sh2.r[n] = sh2.pr;
- }
- static __inline__ void STSMMACH(UINT32 n)
- {
- sh2.r[n] -= 4;
- sh2.ea = sh2.r[n];
- WL( sh2.ea, sh2.mach );
- }
- static __inline__ void STSMMACL(UINT32 n)
- {
- sh2.r[n] -= 4;
- sh2.ea = sh2.r[n];
- WL( sh2.ea, sh2.macl );
- }
- static __inline__ void STSMPR(UINT32 n)
- {
- sh2.r[n] -= 4;
- sh2.ea = sh2.r[n];
- WL( sh2.ea, sh2.pr );
- }
- static __inline__ void SUB(UINT32 m, UINT32 n)
- {
- sh2.r[n] -= sh2.r[m];
- }
- static __inline__ void SUBC(UINT32 m, UINT32 n)
- {
- UINT32 tmp0, tmp1;
- tmp1 = sh2.r[n] - sh2.r[m];
- tmp0 = sh2.r[n];
- sh2.r[n] = tmp1 - (sh2.sr & 0x00000001);
- if (tmp0 < tmp1)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- if (tmp1 < sh2.r[n])
- sh2.sr |= 0x00000001;
- }
- static __inline__ void SUBV(UINT32 m, UINT32 n)
- {
- INT32 dest, src, ans;
- if ((INT32) sh2.r[n] >= 0)
- dest = 0;
- else
- dest = 1;
- if ((INT32) sh2.r[m] >= 0)
- src = 0;
- else
- src = 1;
- src += dest;
- sh2.r[n] -= sh2.r[m];
- if ((INT32) sh2.r[n] >= 0)
- ans = 0;
- else
- ans = 1;
- ans += dest;
- if (src == 1)
- {
- if (ans == 1)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void SWAPB(UINT32 m, UINT32 n)
- {
- UINT32 temp0, temp1;
- temp0 = sh2.r[m] & 0xffff0000;
- temp1 = (sh2.r[m] & 0x000000ff) << 8;
- sh2.r[n] = (sh2.r[m] >> 8) & 0x000000ff;
- sh2.r[n] = sh2.r[n] | temp1 | temp0;
- }
- static __inline__ void SWAPW(UINT32 m, UINT32 n)
- {
- UINT32 temp;
- temp = (sh2.r[m] >> 16) & 0x0000ffff;
- sh2.r[n] = (sh2.r[m] << 16) | temp;
- }
- static __inline__ void TAS(UINT32 n)
- {
- UINT32 temp;
- sh2.ea = sh2.r[n];
- temp = RB( sh2.ea );
- if (temp == 0)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- temp |= 0x80;
- WB( sh2.ea, temp );
- sh2_icount -= 3;
- }
- static __inline__ void TRAPA(UINT32 i)
- {
- UINT32 imm = i & 0xff;
- sh2.ea = sh2.vbr + imm * 4;
- sh2.r[15] -= 4;
- WL( sh2.r[15], sh2.sr );
- sh2.r[15] -= 4;
- WL( sh2.r[15], sh2.pc );
- sh2.pc = RL( sh2.ea );
- do { if (active_address_space[0].readlookup[(((sh2.pc & 0x07ffffff) & active_address_space[0].addrmask) >> (32 - 18))] != opcode_entry) memory_set_opbase(sh2.pc & 0x07ffffff); } while (0);
- sh2_icount -= 7;
- }
- static __inline__ void TST(UINT32 m, UINT32 n)
- {
- if ((sh2.r[n] & sh2.r[m]) == 0)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void TSTI(UINT32 i)
- {
- UINT32 imm = i & 0xff;
- if ((imm & sh2.r[0]) == 0)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- }
- static __inline__ void TSTM(UINT32 i)
- {
- UINT32 imm = i & 0xff;
- sh2.ea = sh2.gbr + sh2.r[0];
- if ((imm & RB( sh2.ea )) == 0)
- sh2.sr |= 0x00000001;
- else
- sh2.sr &= ~0x00000001;
- sh2_icount -= 2;
- }
- static __inline__ void XOR(UINT32 m, UINT32 n)
- {
- sh2.r[n] ^= sh2.r[m];
- }
- static __inline__ void XORI(UINT32 i)
- {
- UINT32 imm = i & 0xff;
- sh2.r[0] ^= imm;
- }
- static __inline__ void XORM(UINT32 i)
- {
- UINT32 imm = i & 0xff;
- UINT32 temp;
- sh2.ea = sh2.gbr + sh2.r[0];
- temp = RB( sh2.ea );
- temp ^= imm;
- WB( sh2.ea, temp );
- sh2_icount -= 2;
- }
- static __inline__ void XTRCT(UINT32 m, UINT32 n)
- {
- UINT32 temp;
- temp = (sh2.r[m] << 16) & 0xffff0000;
- sh2.r[n] = (sh2.r[n] >> 16) & 0x0000ffff;
- sh2.r[n] |= temp;
- }
- static __inline__ void op0000(UINT16 opcode)
- {
- switch (opcode & 0x3F)
- {
- case 0x00: NOP(); break;
- case 0x01: NOP(); break;
- case 0x02: STCSR(((opcode>>8)&15)); break;
- case 0x03: BSRF(((opcode>>8)&15)); break;
- case 0x04: MOVBS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x05: MOVWS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x06: MOVLS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x07: MULL(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x08: CLRT(); break;
- case 0x09: NOP(); break;
- case 0x0a: STSMACH(((opcode>>8)&15)); break;
- case 0x0b: RTS(); break;
- case 0x0c: MOVBL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x0d: MOVWL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x0e: MOVLL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x0f: MAC_L(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x10: NOP(); break;
- case 0x11: NOP(); break;
- case 0x12: STCGBR(((opcode>>8)&15)); break;
- case 0x13: NOP(); break;
- case 0x14: MOVBS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x15: MOVWS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x16: MOVLS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x17: MULL(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x18: SETT(); break;
- case 0x19: DIV0U(); break;
- case 0x1a: STSMACL(((opcode>>8)&15)); break;
- case 0x1b: SLEEP(); break;
- case 0x1c: MOVBL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x1d: MOVWL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x1e: MOVLL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x1f: MAC_L(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x20: NOP(); break;
- case 0x21: NOP(); break;
- case 0x22: STCVBR(((opcode>>8)&15)); break;
- case 0x23: BRAF(((opcode>>8)&15)); break;
- case 0x24: MOVBS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x25: MOVWS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x26: MOVLS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x27: MULL(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x28: CLRMAC(); break;
- case 0x29: MOVT(((opcode>>8)&15)); break;
- case 0x2a: STSPR(((opcode>>8)&15)); break;
- case 0x2b: RTE(); break;
- case 0x2c: MOVBL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x2d: MOVWL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x2e: MOVLL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x2f: MAC_L(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x30: NOP(); break;
- case 0x31: NOP(); break;
- case 0x32: NOP(); break;
- case 0x33: NOP(); break;
- case 0x34: MOVBS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x35: MOVWS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x36: MOVLS0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x37: MULL(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x38: NOP(); break;
- case 0x39: NOP(); break;
- case 0x3c: MOVBL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x3d: MOVWL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x3e: MOVLL0(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x3f: MAC_L(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x3a: NOP(); break;
- case 0x3b: NOP(); break;
- }
- }
- static __inline__ void op0001(UINT16 opcode)
- {
- MOVLS4(((opcode>>4)&15), opcode & 0x0f, ((opcode>>8)&15));
- }
- static __inline__ void op0010(UINT16 opcode)
- {
- switch (opcode & 15)
- {
- case 0: MOVBS(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 1: MOVWS(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 2: MOVLS(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 3: NOP(); break;
- case 4: MOVBM(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 5: MOVWM(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 6: MOVLM(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 7: DIV0S(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 8: TST(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 9: AND(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 10: XOR(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 11: OR(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 12: CMPSTR(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 13: XTRCT(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 14: MULU(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 15: MULS(((opcode>>4)&15), ((opcode>>8)&15)); break;
- }
- }
- static __inline__ void op0011(UINT16 opcode)
- {
- switch (opcode & 15)
- {
- case 0: CMPEQ(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 1: NOP(); break;
- case 2: CMPHS(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 3: CMPGE(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 4: DIV1(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 5: DMULU(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 6: CMPHI(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 7: CMPGT(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 8: SUB(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 9: NOP(); break;
- case 10: SUBC(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 11: SUBV(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 12: ADD(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 13: DMULS(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 14: ADDC(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 15: ADDV(((opcode>>4)&15), ((opcode>>8)&15)); break;
- }
- }
- static __inline__ void op0100(UINT16 opcode)
- {
- switch (opcode & 0x3F)
- {
- case 0x00: SHLL(((opcode>>8)&15)); break;
- case 0x01: SHLR(((opcode>>8)&15)); break;
- case 0x02: STSMMACH(((opcode>>8)&15)); break;
- case 0x03: STCMSR(((opcode>>8)&15)); break;
- case 0x04: ROTL(((opcode>>8)&15)); break;
- case 0x05: ROTR(((opcode>>8)&15)); break;
- case 0x06: LDSMMACH(((opcode>>8)&15)); break;
- case 0x07: LDCMSR(((opcode>>8)&15)); break;
- case 0x08: SHLL2(((opcode>>8)&15)); break;
- case 0x09: SHLR2(((opcode>>8)&15)); break;
- case 0x0a: LDSMACH(((opcode>>8)&15)); break;
- case 0x0b: JSR(((opcode>>8)&15)); break;
- case 0x0c: NOP(); break;
- case 0x0d: NOP(); break;
- case 0x0e: LDCSR(((opcode>>8)&15)); break;
- case 0x0f: MAC_W(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x10: DT(((opcode>>8)&15)); break;
- case 0x11: CMPPZ(((opcode>>8)&15)); break;
- case 0x12: STSMMACL(((opcode>>8)&15)); break;
- case 0x13: STCMGBR(((opcode>>8)&15)); break;
- case 0x14: NOP(); break;
- case 0x15: CMPPL(((opcode>>8)&15)); break;
- case 0x16: LDSMMACL(((opcode>>8)&15)); break;
- case 0x17: LDCMGBR(((opcode>>8)&15)); break;
- case 0x18: SHLL8(((opcode>>8)&15)); break;
- case 0x19: SHLR8(((opcode>>8)&15)); break;
- case 0x1a: LDSMACL(((opcode>>8)&15)); break;
- case 0x1b: TAS(((opcode>>8)&15)); break;
- case 0x1c: NOP(); break;
- case 0x1d: NOP(); break;
- case 0x1e: LDCGBR(((opcode>>8)&15)); break;
- case 0x1f: MAC_W(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x20: SHAL(((opcode>>8)&15)); break;
- case 0x21: SHAR(((opcode>>8)&15)); break;
- case 0x22: STSMPR(((opcode>>8)&15)); break;
- case 0x23: STCMVBR(((opcode>>8)&15)); break;
- case 0x24: ROTCL(((opcode>>8)&15)); break;
- case 0x25: ROTCR(((opcode>>8)&15)); break;
- case 0x26: LDSMPR(((opcode>>8)&15)); break;
- case 0x27: LDCMVBR(((opcode>>8)&15)); break;
- case 0x28: SHLL16(((opcode>>8)&15)); break;
- case 0x29: SHLR16(((opcode>>8)&15)); break;
- case 0x2a: LDSPR(((opcode>>8)&15)); break;
- case 0x2b: JMP(((opcode>>8)&15)); break;
- case 0x2c: NOP(); break;
- case 0x2d: NOP(); break;
- case 0x2e: LDCVBR(((opcode>>8)&15)); break;
- case 0x2f: MAC_W(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 0x30: NOP(); break;
- case 0x31: NOP(); break;
- case 0x32: NOP(); break;
- case 0x33: NOP(); break;
- case 0x34: NOP(); break;
- case 0x35: NOP(); break;
- case 0x36: NOP(); break;
- case 0x37: NOP(); break;
- case 0x38: NOP(); break;
- case 0x39: NOP(); break;
- case 0x3a: NOP(); break;
- case 0x3b: NOP(); break;
- case 0x3c: NOP(); break;
- case 0x3d: NOP(); break;
- case 0x3e: NOP(); break;
- case 0x3f: MAC_W(((opcode>>4)&15), ((opcode>>8)&15)); break;
- }
- }
- static __inline__ void op0101(UINT16 opcode)
- {
- MOVLL4(((opcode>>4)&15), opcode & 0x0f, ((opcode>>8)&15));
- }
- static __inline__ void op0110(UINT16 opcode)
- {
- switch (opcode & 15)
- {
- case 0: MOVBL(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 1: MOVWL(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 2: MOVLL(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 3: MOV(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 4: MOVBP(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 5: MOVWP(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 6: MOVLP(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 7: NOT(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 8: SWAPB(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 9: SWAPW(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 10: NEGC(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 11: NEG(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 12: EXTUB(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 13: EXTUW(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 14: EXTSB(((opcode>>4)&15), ((opcode>>8)&15)); break;
- case 15: EXTSW(((opcode>>4)&15), ((opcode>>8)&15)); break;
- }
- }
- static __inline__ void op0111(UINT16 opcode)
- {
- ADDI(opcode & 0xff, ((opcode>>8)&15));
- }
- static __inline__ void op1000(UINT16 opcode)
- {
- switch ( opcode & (15<<8) )
- {
- case 0 << 8: MOVBS4(opcode & 0x0f, ((opcode>>4)&15)); break;
- case 1 << 8: MOVWS4(opcode & 0x0f, ((opcode>>4)&15)); break;
- case 2<< 8: NOP(); break;
- case 3<< 8: NOP(); break;
- case 4<< 8: MOVBL4(((opcode>>4)&15), opcode & 0x0f); break;
- case 5<< 8: MOVWL4(((opcode>>4)&15), opcode & 0x0f); break;
- case 6<< 8: NOP(); break;
- case 7<< 8: NOP(); break;
- case 8<< 8: CMPIM(opcode & 0xff); break;
- case 9<< 8: BT(opcode & 0xff); break;
- case 10<< 8: NOP(); break;
- case 11<< 8: BF(opcode & 0xff); break;
- case 12<< 8: NOP(); break;
- case 13<< 8: BTS(opcode & 0xff); break;
- case 14<< 8: NOP(); break;
- case 15<< 8: BFS(opcode & 0xff); break;
- }
- }
- static __inline__ void op1001(UINT16 opcode)
- {
- MOVWI(opcode & 0xff, ((opcode>>8)&15));
- }
- static __inline__ void op1010(UINT16 opcode)
- {
- BRA(opcode & 0xfff);
- }
- static __inline__ void op1011(UINT16 opcode)
- {
- BSR(opcode & 0xfff);
- }
- static __inline__ void op1100(UINT16 opcode)
- {
- switch (opcode & (15<<8))
- {
- case 0<<8: MOVBSG(opcode & 0xff); break;
- case 1<<8: MOVWSG(opcode & 0xff); break;
- case 2<<8: MOVLSG(opcode & 0xff); break;
- case 3<<8: TRAPA(opcode & 0xff); break;
- case 4<<8: MOVBLG(opcode & 0xff); break;
- case 5<<8: MOVWLG(opcode & 0xff); break;
- case 6<<8: MOVLLG(opcode & 0xff); break;
- case 7<<8: MOVA(opcode & 0xff); break;
- case 8<<8: TSTI(opcode & 0xff); break;
- case 9<<8: ANDI(opcode & 0xff); break;
- case 10<<8: XORI(opcode & 0xff); break;
- case 11<<8: ORI(opcode & 0xff); break;
- case 12<<8: TSTM(opcode & 0xff); break;
- case 13<<8: ANDM(opcode & 0xff); break;
- case 14<<8: XORM(opcode & 0xff); break;
- case 15<<8: ORM(opcode & 0xff); break;
- }
- }
- static __inline__ void op1101(UINT16 opcode)
- {
- MOVLI(opcode & 0xff, ((opcode>>8)&15));
- }
- static __inline__ void op1110(UINT16 opcode)
- {
- MOVI(opcode & 0xff, ((opcode>>8)&15));
- }
- static __inline__ void op1111(UINT16 opcode)
- {
- NOP();
- }
- static void sh2_reset(void)
- {
- void *tsave, *tsaved0, *tsaved1;
- UINT32 *m;
- int cpunum;
- int save_is_slave;
- void (*f)(UINT32 data);
- int (*save_irqcallback)(int);
- cpunum = sh2.cpu_number;
- m = sh2.m;
- tsave = sh2.timer;
- tsaved0 = sh2.dma_timer[0];
- tsaved1 = sh2.dma_timer[1];
- f = sh2.ftcsr_read_callback;
- save_irqcallback = sh2.irq_callback;
- save_is_slave = sh2.is_slave;
- memset(&sh2, 0, sizeof(SH2));
- sh2.is_slave = save_is_slave;
- sh2.ftcsr_read_callback = f;
- sh2.irq_callback = save_irqcallback;
- sh2.timer = tsave;
- sh2.dma_timer[0] = tsaved0;
- sh2.dma_timer[1] = tsaved1;
- sh2.cpu_number = cpunum;
- sh2.m = m;
- memset(sh2.m, 0, 0x200);
- sh2.pc = RL(0);
- sh2.r[15] = RL(4);
- sh2.sr = 0x000000f0;
- do { if (active_address_space[0].readlookup[(((sh2.pc & 0x07ffffff) & active_address_space[0].addrmask) >> (32 - 18))] != opcode_entry) memory_set_opbase(sh2.pc & 0x07ffffff); } while (0);
- sh2.internal_irq_level = -1;
- }
- static void sh2_exit(void)
- {
- if (sh2.m)
- free(sh2.m);
- sh2.m = ((void *)0);
- }
- static int sh2_execute(int cycles)
- {
- sh2_icount = cycles;
- if (sh2.cpu_off)
- return 0;
- do
- {
- UINT32 opcode;
- if (sh2.delay)
- {
- opcode = cpu_readop16((((UINT32)(sh2.delay & 0x07ffffff)) ^ 2));
- do { if (active_address_space[0].readlookup[(((sh2.pc & 0x07ffffff) & active_address_space[0].addrmask) >> (32 - 18))] != opcode_entry) memory_set_opbase(sh2.pc & 0x07ffffff); } while (0);
- sh2.pc -= 2;
- }
- else
- opcode = cpu_readop16((((UINT32)(sh2.pc & 0x07ffffff)) ^ 2));
- ;
- sh2.delay = 0;
- sh2.pc += 2;
- sh2.ppc = sh2.pc;
- switch (opcode & ( 15 << 12))
- {
- case 0<<12: op0000(opcode); break;
- case 1<<12: op0001(opcode); break;
- case 2<<12: op0010(opcode); break;
- case 3<<12: op0011(opcode); break;
- case 4<<12: op0100(opcode); break;
- case 5<<12: op0101(opcode); break;
- case 6<<12: op0110(opcode); break;
- case 7<<12: op0111(opcode); break;
- case 8<<12: op1000(opcode); break;
- case 9<<12: op1001(opcode); break;
- case 10<<12: op1010(opcode); break;
- case 11<<12: op1011(opcode); break;
- case 12<<12: op1100(opcode); break;
- case 13<<12: op1101(opcode); break;
- case 14<<12: op1110(opcode); break;
- default: op1111(opcode); break;
- }
- if(sh2.test_irq && !sh2.delay)
- {
- do { int irq = -1; if (sh2.pending_irq & (1 << 0)) irq = 0; if (sh2.pending_irq & (1 << 1)) irq = 1; if (sh2.pending_irq & (1 << 2)) irq = 2; if (sh2.pending_irq & (1 << 3)) irq = 3; if (sh2.pending_irq & (1 << 4)) irq = 4; if (sh2.pending_irq & (1 << 5)) irq = 5; if (sh2.pending_irq & (1 << 6)) irq = 6; if (sh2.pending_irq & (1 << 7)) irq = 7; if (sh2.pending_irq & (1 << 8)) irq = 8; if (sh2.pending_irq & (1 << 9)) irq = 9; if (sh2.pending_irq & (1 << 10)) irq = 10; if (sh2.pending_irq & (1 << 11)) irq = 11; if (sh2.pending_irq & (1 << 12)) irq = 12; if (sh2.pending_irq & (1 << 13)) irq = 13; if (sh2.pending_irq & (1 << 14)) irq = 14; if (sh2.pending_irq & (1 << 15)) irq = 15; if ((sh2.internal_irq_level != -1) && (sh2.internal_irq_level > irq)) irq = sh2.internal_irq_level; if (irq >= 0) sh2_exception("mame_sh2_execute",irq); } while(0);
- sh2.test_irq = 0;
- }
- sh2_icount--;
- } while( sh2_icount > 0 );
- return cycles - sh2_icount;
- }
- static void sh2_get_context(void *dst)
- {
- if( dst )
- memcpy(dst, &sh2, sizeof(SH2));
- }
- static void sh2_set_context(void *src)
- {
- if( src )
- memcpy(&sh2, src, sizeof(SH2));
- }
- static void sh2_timer_resync(void)
- {
- int divider = div_tab[(sh2.m[5] >> 8) & 3];
- UINT32 cur_time = cpunum_gettotalcycles(sh2.cpu_number);
- if(divider)
- sh2.frc += (cur_time - sh2.frc_base) >> divider;
- sh2.frc_base = cur_time;
- }
- static void sh2_timer_activate(void)
- {
- int max_delta = 0xfffff;
- UINT16 frc;
- mame_timer_adjust(sh2.timer, double_to_mame_time((1.0e30)), 0, double_to_mame_time(0));
- frc = sh2.frc;
- if(!(sh2.m[4] & OCFA)) {
- UINT16 delta = sh2.ocra - frc;
- if(delta < max_delta)
- max_delta = delta;
- }
- if(!(sh2.m[4] & OCFB) && (sh2.ocra <= sh2.ocrb || !(sh2.m[4] & 0x010000))) {
- UINT16 delta = sh2.ocrb - frc;
- if(delta < max_delta)
- max_delta = delta;
- }
- if(!(sh2.m[4] & OVF) && !(sh2.m[4] & 0x010000)) {
- int delta = 0x10000 - frc;
- if(delta < max_delta)
- max_delta = delta;
- }
- if(max_delta != 0xfffff) {
- int divider = div_tab[(sh2.m[5] >> 8) & 3];
- if(divider) {
- max_delta <<= divider;
- sh2.frc_base = cpunum_gettotalcycles(sh2.cpu_number);
- mame_timer_adjust(sh2.timer, double_to_mame_time(((double)(max_delta) * cycles_to_sec[sh2.cpu_number])), sh2.cpu_number, double_to_mame_time(0));
- } else {
- logerror("SH2.%d: Timer event in %d cycles of external clock", sh2.cpu_number, max_delta);
- }
- }
- }
- static void sh2_recalc_irq(void)
- {
- int irq = 0, vector = -1;
- int level;
- if((sh2.m[4]>>8) & sh2.m[4] & (ICF|OCFA|OCFB|OVF))
- {
- level = (sh2.m[0x18] >> 24) & 15;
- if(level > irq)
- {
- int mask = (sh2.m[4]>>8) & sh2.m[4];
- irq = level;
- if(mask & ICF)
- vector = (sh2.m[0x19] >> 8) & 0x7f;
- else if(mask & (OCFA|OCFB))
- vector = sh2.m[0x19] & 0x7f;
- else
- vector = (sh2.m[0x1a] >> 24) & 0x7f;
- }
- }
- if((sh2.m[0x63] & 6) == 6) {
- level = (sh2.m[0x38] >> 8) & 15;
- if(level > irq) {
- irq = level;
- vector = (sh2.m[0x68] >> 24) & 0x7f;
- }
- }
- if((sh2.m[0x67] & 6) == 6) {
- level = (sh2.m[0x38] >> 8) & 15;
- if(level > irq) {
- irq = level;
- vector = (sh2.m[0x6a] >> 24) & 0x7f;
- }
- }
- sh2.internal_irq_level = irq;
- sh2.internal_irq_vector = vector;
- sh2.test_irq = 1;
- }
- static void sh2_timer_callback(int cpunum)
- {
- UINT16 frc;
- cpuintrf_push_context(cpunum);
- sh2_timer_resync();
- frc = sh2.frc;
- if(frc == sh2.ocrb)
- sh2.m[4] |= OCFB;
- if(frc == 0x0000)
- sh2.m[4] |= OVF;
- if(frc == sh2.ocra)
- {
- sh2.m[4] |= OCFA;
- if(sh2.m[4] & 0x010000)
- sh2.frc = 0;
- }
- sh2_recalc_irq();
- sh2_timer_activate();
- cpuintrf_pop_context();
- }
- static void sh2_dmac_callback(int dma)
- {
- int cpunum = dma >> 1;
- dma &= 1;
- cpuintrf_push_context(cpunum);
- ;
- sh2.m[0x63+4*dma] |= 2;
- sh2.dma_timer_active[dma] = 0;
- sh2_recalc_irq();
- cpuintrf_pop_context();
- }
- static void sh2_dmac_check(int dma)
- {
- if(sh2.m[0x63+4*dma] & sh2.m[0x6c] & 1)
- {
- if(!sh2.dma_timer_active[dma] && !(sh2.m[0x63+4*dma] & 2))
- {
- int incs, incd, size;
- UINT32 src, dst, count;
- incd = (sh2.m[0x63+4*dma] >> 14) & 3;
- incs = (sh2.m[0x63+4*dma] >> 12) & 3;
- size = (sh2.m[0x63+4*dma] >> 10) & 3;
- if(incd == 3 || incs == 3)
- {
- logerror("SH2: DMA: bad increment values (%d, %d, %d, %04x)\n", incd, incs, size, sh2.m[0x63+4*dma]);
- return;
- }
- src = sh2.m[0x60+4*dma];
- dst = sh2.m[0x61+4*dma];
- count = sh2.m[0x62+4*dma];
- if(!count)
- count = 0x1000000;
- ;
- sh2.dma_timer_active[dma] = 1;
- mame_timer_adjust(sh2.dma_timer[dma], double_to_mame_time(((double)(2*count+1) * cycles_to_sec[sh2.cpu_number])), (sh2.cpu_number<<1)|dma, double_to_mame_time(0));
- src &= 0x07ffffff;
- dst &= 0x07ffffff;
- switch(size)
- {
- case 0:
- for(;count > 0; count --)
- {
- if(incs == 2)
- src --;
- if(incd == 2)
- dst --;
- program_write_byte_32be(dst, program_read_byte_32be(src));
- if(incs == 1)
- src ++;
- if(incd == 1)
- dst ++;
- }
- break;
- case 1:
- src &= ~1;
- dst &= ~1;
- for(;count > 0; count --)
- {
- if(incs == 2)
- src -= 2;
- if(incd == 2)
- dst -= 2;
- program_write_word_32be(dst, program_read_word_32be(src));
- if(incs == 1)
- src += 2;
- if(incd == 1)
- dst += 2;
- }
- break;
- case 2:
- src &= ~3;
- dst &= ~3;
- for(;count > 0; count --)
- {
- if(incs == 2)
- src -= 4;
- if(incd == 2)
- dst -= 4;
- program_write_dword_32be(dst, program_read_dword_32be(src));
- if(incs == 1)
- src += 4;
- if(incd == 1)
- dst += 4;
- }
- break;
- case 3:
- src &= ~3;
- dst &= ~3;
- count &= ~3;
- for(;count > 0; count -= 4)
- {
- if(incd == 2)
- dst -= 16;
- program_write_dword_32be(dst, program_read_dword_32be(src));
- program_write_dword_32be(dst+4, program_read_dword_32be(src+4));
- program_write_dword_32be(dst+8, program_read_dword_32be(src+8));
- program_write_dword_32be(dst+12, program_read_dword_32be(src+12));
- src += 16;
- if(incd == 1)
- dst += 16;
- }
- break;
- }
- }
- }
- else
- {
- if(sh2.dma_timer_active[dma])
- {
- logerror("SH2: DMA %d cancelled in-flight", dma);
- mame_timer_adjust(sh2.dma_timer[dma], double_to_mame_time((1.0e30)), 0, double_to_mame_time(0));
- sh2.dma_timer_active[dma] = 0;
- }
- }
- }
- void sh2_internal_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 data, __attribute__((__unused__)) UINT32 mem_mask)
- {
- UINT32 old = sh2.m[offset];
- (*(sh2.m+offset) = (*(sh2.m+offset) & mem_mask) | (data & ~mem_mask));
- switch( offset )
- {
- case 0x04:
- if((mem_mask & 0x00ffffff) != 0xffffff)
- sh2_timer_resync();
- logerror("SH2.%d: TIER write %04x @ %04x\n", sh2.cpu_number, data >> 16, mem_mask>>16);
- sh2.m[4] = (sh2.m[4] & ~(ICF|OCFA|OCFB|OVF)) | (old & sh2.m[4] & (ICF|OCFA|OCFB|OVF));
- (*(&sh2.frc) = (*(&sh2.frc) & mem_mask) | (data & ~mem_mask));
- if((mem_mask & 0x00ffffff) != 0xffffff)
- sh2_timer_activate();
- sh2_recalc_irq();
- break;
- case 0x05:
- logerror("SH2.%d: TCR write %08x @ %08x\n", sh2.cpu_number, data, mem_mask);
- sh2_timer_resync();
- if(sh2.m[5] & 0x10)
- sh2.ocrb = (sh2.ocrb & (mem_mask >> 16)) | ((data & ~mem_mask) >> 16);
- else
- sh2.ocra = (sh2.ocra & (mem_mask >> 16)) | ((data & ~mem_mask) >> 16);
- sh2_timer_activate();
- break;
- case 0x06:
- break;
- case 0x18:
- case 0x19:
- case 0x1a:
- sh2_recalc_irq();
- break;
- case 0x1c:
- break;
- case 0x20:
- break;
- case 0x24:
- break;
- case 0x38:
- break;
- case 0x39:
- break;
- case 0x40:
- break;
- case 0x41:
- {
- INT32 a = sh2.m[0x41];
- INT32 b = sh2.m[0x40];
- ;
- if (b)
- {
- sh2.m[0x45] = a / b;
- sh2.m[0x44] = a % b;
- }
- else
- {
- sh2.m[0x42] |= 0x00010000;
- sh2.m[0x45] = 0x7fffffff;
- sh2.m[0x44] = 0x7fffffff;
- sh2_recalc_irq();
- }
- break;
- }
- case 0x42:
- sh2.m[0x42] = (sh2.m[0x42] & ~0x00001000) | (old & sh2.m[0x42] & 0x00010000);
- sh2_recalc_irq();
- break;
- case 0x43:
- sh2_recalc_irq();
- break;
- case 0x44:
- break;
- case 0x45:
- {
- INT64 a = sh2.m[0x45] | ((UINT64)(sh2.m[0x44]) << 32);
- INT64 b = (INT32)sh2.m[0x40];
- ;
- if (b)
- {
- INT64 q = a / b;
- if (q != (INT32)q)
- {
- sh2.m[0x42] |= 0x00010000;
- sh2.m[0x45] = 0x7fffffff;
- sh2.m[0x44] = 0x7fffffff;
- sh2_recalc_irq();
- }
- else
- {
- sh2.m[0x45] = q;
- sh2.m[0x44] = a % b;
- }
- }
- else
- {
- sh2.m[0x42] |= 0x00010000;
- sh2.m[0x45] = 0x7fffffff;
- sh2.m[0x44] = 0x7fffffff;
- sh2_recalc_irq();
- }
- break;
- }
- case 0x60:
- case 0x61:
- break;
- case 0x62:
- sh2.m[0x62] &= 0xffffff;
- break;
- case 0x63:
- sh2.m[0x63] = (sh2.m[0x63] & ~2) | (old & sh2.m[0x63] & 2);
- sh2_dmac_check(0);
- break;
- case 0x64:
- case 0x65:
- break;
- case 0x66:
- sh2.m[0x66] &= 0xffffff;
- break;
- case 0x67:
- sh2.m[0x67] = (sh2.m[0x67] & ~2) | (old & sh2.m[0x67] & 2);
- sh2_dmac_check(1);
- break;
- case 0x68:
- case 0x6a:
- sh2_recalc_irq();
- break;
- case 0x6c:
- sh2.m[0x6c] = (sh2.m[0x6c] & ~6) | (old & sh2.m[0x6c] & 6);
- sh2_dmac_check(0);
- sh2_dmac_check(1);
- break;
- case 0x78:
- case 0x79:
- case 0x7a:
- case 0x7b:
- case 0x7c:
- case 0x7d:
- case 0x7e:
- break;
- default:
- logerror("sh2_internal_w: Unmapped write %08x, %08x @ %08x\n", 0xfffffe00+offset*4, data, mem_mask);
- break;
- }
- }
- UINT32 sh2_internal_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask)
- {
- switch( offset )
- {
- case 0x04:
- if ( mem_mask == 0xff00ffff )
- if ( sh2.ftcsr_read_callback != ((void *)0) )
- sh2.ftcsr_read_callback( (sh2.m[4] & 0xffff0000) | sh2.frc );
- sh2_timer_resync();
- return (sh2.m[4] & 0xffff0000) | sh2.frc;
- case 0x05:
- if(sh2.m[5] & 0x10)
- return (sh2.ocrb << 16) | (sh2.m[5] & 0xffff);
- else
- return (sh2.ocra << 16) | (sh2.m[5] & 0xffff);
- case 0x06:
- return sh2.icr << 16;
- case 0x38:
- return (sh2.m[0x38] & 0x7fffffff) | (sh2.nmi_line_state == ASSERT_LINE ? 0 : 0x80000000);
- case 0x78:
- return sh2.is_slave ? 0x00008000 : 0;
- case 0x41:
- case 0x47:
- return sh2.m[0x45];
- case 0x46:
- return sh2.m[0x44];
- }
- return sh2.m[offset];
- }
- void sh2_set_frt_input(int cpunum, int state)
- {
- if(state == PULSE_LINE)
- {
- sh2_set_frt_input(cpunum, ASSERT_LINE);
- sh2_set_frt_input(cpunum, CLEAR_LINE);
- return;
- }
- cpuintrf_push_context(cpunum);
- if(sh2.frt_input == state) {
- cpuintrf_pop_context();
- return;
- }
- sh2.frt_input = state;
- if(sh2.m[5] & 0x8000) {
- if(state == CLEAR_LINE) {
- cpuintrf_pop_context();
- return;
- }
- } else {
- if(state == ASSERT_LINE) {
- cpuintrf_pop_context();
- return;
- }
- }
- sh2_timer_resync();
- sh2.icr = sh2.frc;
- sh2.m[4] |= ICF;
- logerror("SH2.%d: ICF activated (%x)\n", sh2.cpu_number, sh2.pc & 0x07ffffff);
- sh2_recalc_irq();
- cpuintrf_pop_context();
- }
- static void set_irq_line(int irqline, int state)
- {
- if (irqline == INPUT_LINE_NMI)
- {
- if (sh2.nmi_line_state == state)
- return;
- sh2.nmi_line_state = state;
- if( state == CLEAR_LINE )
- ;
- else
- {
- ;
- sh2_exception("sh2_set_irq_line/nmi", 16);
- }
- }
- else
- {
- if (sh2.irq_line_state[irqline] == state)
- return;
- sh2.irq_line_state[irqline] = state;
- if( state == CLEAR_LINE )
- {
- ;
- sh2.pending_irq &= ~(1 << irqline);
- }
- else
- {
- ;
- sh2.pending_irq |= 1 << irqline;
- if(sh2.delay)
- sh2.test_irq = 1;
- else
- do { int irq = -1; if (sh2.pending_irq & (1 << 0)) irq = 0; if (sh2.pending_irq & (1 << 1)) irq = 1; if (sh2.pending_irq & (1 << 2)) irq = 2; if (sh2.pending_irq & (1 << 3)) irq = 3; if (sh2.pending_irq & (1 << 4)) irq = 4; if (sh2.pending_irq & (1 << 5)) irq = 5; if (sh2.pending_irq & (1 << 6)) irq = 6; if (sh2.pending_irq & (1 << 7)) irq = 7; if (sh2.pending_irq & (1 << 8)) irq = 8; if (sh2.pending_irq & (1 << 9)) irq = 9; if (sh2.pending_irq & (1 << 10)) irq = 10; if (sh2.pending_irq & (1 << 11)) irq = 11; if (sh2.pending_irq & (1 << 12)) irq = 12; if (sh2.pending_irq & (1 << 13)) irq = 13; if (sh2.pending_irq & (1 << 14)) irq = 14; if (sh2.pending_irq & (1 << 15)) irq = 15; if ((sh2.internal_irq_level != -1) && (sh2.internal_irq_level > irq)) irq = sh2.internal_irq_level; if (irq >= 0) sh2_exception("sh2_set_irq_line",irq); } while(0);
- }
- }
- }
- static offs_t sh2_dasm(char *buffer, offs_t pc)
- {
- sprintf( buffer, "$%02X", cpu_readop(pc) );
- return 1;
- }
- static void sh2_init(int index, int clock, const void *config, int (*irqcallback)(int))
- {
- const struct sh2_config *conf = config;
- sh2.timer = _mame_timer_alloc(sh2_timer_callback, "src/cpu/sh2/sh2.c", 2966, "sh2_timer_callback");
- mame_timer_adjust(sh2.timer, double_to_mame_time((1.0e30)), 0, double_to_mame_time(0));
- sh2.dma_timer[0] = _mame_timer_alloc(sh2_dmac_callback, "src/cpu/sh2/sh2.c", 2969, "sh2_dmac_callback");
- mame_timer_adjust(sh2.dma_timer[0], double_to_mame_time((1.0e30)), 0, double_to_mame_time(0));
- sh2.dma_timer[1] = _mame_timer_alloc(sh2_dmac_callback, "src/cpu/sh2/sh2.c", 2972, "sh2_dmac_callback");
- mame_timer_adjust(sh2.dma_timer[1], double_to_mame_time((1.0e30)), 0, double_to_mame_time(0));
- sh2.m = malloc(0x200);
- if (!sh2.m)
- {
- logerror("SH2 failed to malloc FREGS\n");
- raise( 6 );
- }
- if(conf)
- sh2.is_slave = conf->is_slave;
- else
- sh2.is_slave = 0;
- sh2.cpu_number = index;
- sh2.irq_callback = irqcallback;
- do { do { if (!(((sizeof(sh2.pc) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.pc), double)) || (sizeof(sh2.pc) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.pc), float)) || (sizeof(sh2.pc) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.pc), INT64)) || (sizeof(sh2.pc) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.pc), UINT64)) || (sizeof(sh2.pc) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.pc), INT32)) || (sizeof(sh2.pc) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.pc), UINT32)) || (sizeof(sh2.pc) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.pc), INT16)) || (sizeof(sh2.pc) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.pc), UINT16)) || (sizeof(sh2.pc) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.pc), INT8)) || (sizeof(sh2.pc) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.pc), UINT8)) || (sizeof(sh2.pc) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.pc), PAIR)) || (sizeof(sh2.pc) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.pc), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 2990); } while (0); state_save_register_memory("sh2", index, "sh2.pc", &sh2.pc, sizeof(sh2.pc), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[15]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[15]), double)) || (sizeof(sh2.r[15]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[15]), float)) || (sizeof(sh2.r[15]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[15]), INT64)) || (sizeof(sh2.r[15]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[15]), UINT64)) || (sizeof(sh2.r[15]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[15]), INT32)) || (sizeof(sh2.r[15]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[15]), UINT32)) || (sizeof(sh2.r[15]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[15]), INT16)) || (sizeof(sh2.r[15]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[15]), UINT16)) || (sizeof(sh2.r[15]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[15]), INT8)) || (sizeof(sh2.r[15]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[15]), UINT8)) || (sizeof(sh2.r[15]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[15]), PAIR)) || (sizeof(sh2.r[15]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[15]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 2991); } while (0); state_save_register_memory("sh2", index, "sh2.r[15]", &sh2.r[15], sizeof(sh2.r[15]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.sr) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.sr), double)) || (sizeof(sh2.sr) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.sr), float)) || (sizeof(sh2.sr) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.sr), INT64)) || (sizeof(sh2.sr) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.sr), UINT64)) || (sizeof(sh2.sr) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.sr), INT32)) || (sizeof(sh2.sr) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.sr), UINT32)) || (sizeof(sh2.sr) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.sr), INT16)) || (sizeof(sh2.sr) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.sr), UINT16)) || (sizeof(sh2.sr) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.sr), INT8)) || (sizeof(sh2.sr) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.sr), UINT8)) || (sizeof(sh2.sr) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.sr), PAIR)) || (sizeof(sh2.sr) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.sr), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 2992); } while (0); state_save_register_memory("sh2", index, "sh2.sr", &sh2.sr, sizeof(sh2.sr), 1); } while (0);
- do { do { if (!(((sizeof(sh2.pr) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.pr), double)) || (sizeof(sh2.pr) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.pr), float)) || (sizeof(sh2.pr) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.pr), INT64)) || (sizeof(sh2.pr) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.pr), UINT64)) || (sizeof(sh2.pr) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.pr), INT32)) || (sizeof(sh2.pr) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.pr), UINT32)) || (sizeof(sh2.pr) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.pr), INT16)) || (sizeof(sh2.pr) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.pr), UINT16)) || (sizeof(sh2.pr) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.pr), INT8)) || (sizeof(sh2.pr) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.pr), UINT8)) || (sizeof(sh2.pr) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.pr), PAIR)) || (sizeof(sh2.pr) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.pr), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 2993); } while (0); state_save_register_memory("sh2", index, "sh2.pr", &sh2.pr, sizeof(sh2.pr), 1); } while (0);
- do { do { if (!(((sizeof(sh2.gbr) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.gbr), double)) || (sizeof(sh2.gbr) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.gbr), float)) || (sizeof(sh2.gbr) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.gbr), INT64)) || (sizeof(sh2.gbr) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.gbr), UINT64)) || (sizeof(sh2.gbr) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.gbr), INT32)) || (sizeof(sh2.gbr) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.gbr), UINT32)) || (sizeof(sh2.gbr) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.gbr), INT16)) || (sizeof(sh2.gbr) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.gbr), UINT16)) || (sizeof(sh2.gbr) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.gbr), INT8)) || (sizeof(sh2.gbr) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.gbr), UINT8)) || (sizeof(sh2.gbr) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.gbr), PAIR)) || (sizeof(sh2.gbr) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.gbr), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 2994); } while (0); state_save_register_memory("sh2", index, "sh2.gbr", &sh2.gbr, sizeof(sh2.gbr), 1); } while (0);
- do { do { if (!(((sizeof(sh2.vbr) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.vbr), double)) || (sizeof(sh2.vbr) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.vbr), float)) || (sizeof(sh2.vbr) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.vbr), INT64)) || (sizeof(sh2.vbr) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.vbr), UINT64)) || (sizeof(sh2.vbr) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.vbr), INT32)) || (sizeof(sh2.vbr) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.vbr), UINT32)) || (sizeof(sh2.vbr) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.vbr), INT16)) || (sizeof(sh2.vbr) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.vbr), UINT16)) || (sizeof(sh2.vbr) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.vbr), INT8)) || (sizeof(sh2.vbr) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.vbr), UINT8)) || (sizeof(sh2.vbr) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.vbr), PAIR)) || (sizeof(sh2.vbr) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.vbr), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 2995); } while (0); state_save_register_memory("sh2", index, "sh2.vbr", &sh2.vbr, sizeof(sh2.vbr), 1); } while (0);
- do { do { if (!(((sizeof(sh2.mach) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.mach), double)) || (sizeof(sh2.mach) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.mach), float)) || (sizeof(sh2.mach) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.mach), INT64)) || (sizeof(sh2.mach) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.mach), UINT64)) || (sizeof(sh2.mach) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.mach), INT32)) || (sizeof(sh2.mach) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.mach), UINT32)) || (sizeof(sh2.mach) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.mach), INT16)) || (sizeof(sh2.mach) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.mach), UINT16)) || (sizeof(sh2.mach) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.mach), INT8)) || (sizeof(sh2.mach) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.mach), UINT8)) || (sizeof(sh2.mach) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.mach), PAIR)) || (sizeof(sh2.mach) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.mach), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 2996); } while (0); state_save_register_memory("sh2", index, "sh2.mach", &sh2.mach, sizeof(sh2.mach), 1); } while (0);
- do { do { if (!(((sizeof(sh2.macl) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.macl), double)) || (sizeof(sh2.macl) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.macl), float)) || (sizeof(sh2.macl) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.macl), INT64)) || (sizeof(sh2.macl) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.macl), UINT64)) || (sizeof(sh2.macl) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.macl), INT32)) || (sizeof(sh2.macl) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.macl), UINT32)) || (sizeof(sh2.macl) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.macl), INT16)) || (sizeof(sh2.macl) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.macl), UINT16)) || (sizeof(sh2.macl) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.macl), INT8)) || (sizeof(sh2.macl) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.macl), UINT8)) || (sizeof(sh2.macl) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.macl), PAIR)) || (sizeof(sh2.macl) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.macl), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 2997); } while (0); state_save_register_memory("sh2", index, "sh2.macl", &sh2.macl, sizeof(sh2.macl), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[ 0]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), double)) || (sizeof(sh2.r[ 0]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), float)) || (sizeof(sh2.r[ 0]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), INT64)) || (sizeof(sh2.r[ 0]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), UINT64)) || (sizeof(sh2.r[ 0]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), INT32)) || (sizeof(sh2.r[ 0]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), UINT32)) || (sizeof(sh2.r[ 0]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), INT16)) || (sizeof(sh2.r[ 0]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), UINT16)) || (sizeof(sh2.r[ 0]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), INT8)) || (sizeof(sh2.r[ 0]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), UINT8)) || (sizeof(sh2.r[ 0]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), PAIR)) || (sizeof(sh2.r[ 0]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[ 0]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 2998); } while (0); state_save_register_memory("sh2", index, "sh2.r[ 0]", &sh2.r[ 0], sizeof(sh2.r[ 0]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[ 1]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), double)) || (sizeof(sh2.r[ 1]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), float)) || (sizeof(sh2.r[ 1]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), INT64)) || (sizeof(sh2.r[ 1]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), UINT64)) || (sizeof(sh2.r[ 1]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), INT32)) || (sizeof(sh2.r[ 1]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), UINT32)) || (sizeof(sh2.r[ 1]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), INT16)) || (sizeof(sh2.r[ 1]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), UINT16)) || (sizeof(sh2.r[ 1]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), INT8)) || (sizeof(sh2.r[ 1]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), UINT8)) || (sizeof(sh2.r[ 1]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), PAIR)) || (sizeof(sh2.r[ 1]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[ 1]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 2999); } while (0); state_save_register_memory("sh2", index, "sh2.r[ 1]", &sh2.r[ 1], sizeof(sh2.r[ 1]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[ 2]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), double)) || (sizeof(sh2.r[ 2]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), float)) || (sizeof(sh2.r[ 2]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), INT64)) || (sizeof(sh2.r[ 2]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), UINT64)) || (sizeof(sh2.r[ 2]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), INT32)) || (sizeof(sh2.r[ 2]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), UINT32)) || (sizeof(sh2.r[ 2]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), INT16)) || (sizeof(sh2.r[ 2]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), UINT16)) || (sizeof(sh2.r[ 2]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), INT8)) || (sizeof(sh2.r[ 2]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), UINT8)) || (sizeof(sh2.r[ 2]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), PAIR)) || (sizeof(sh2.r[ 2]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[ 2]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3000); } while (0); state_save_register_memory("sh2", index, "sh2.r[ 2]", &sh2.r[ 2], sizeof(sh2.r[ 2]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[ 3]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), double)) || (sizeof(sh2.r[ 3]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), float)) || (sizeof(sh2.r[ 3]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), INT64)) || (sizeof(sh2.r[ 3]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), UINT64)) || (sizeof(sh2.r[ 3]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), INT32)) || (sizeof(sh2.r[ 3]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), UINT32)) || (sizeof(sh2.r[ 3]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), INT16)) || (sizeof(sh2.r[ 3]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), UINT16)) || (sizeof(sh2.r[ 3]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), INT8)) || (sizeof(sh2.r[ 3]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), UINT8)) || (sizeof(sh2.r[ 3]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), PAIR)) || (sizeof(sh2.r[ 3]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[ 3]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3001); } while (0); state_save_register_memory("sh2", index, "sh2.r[ 3]", &sh2.r[ 3], sizeof(sh2.r[ 3]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[ 4]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), double)) || (sizeof(sh2.r[ 4]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), float)) || (sizeof(sh2.r[ 4]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), INT64)) || (sizeof(sh2.r[ 4]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), UINT64)) || (sizeof(sh2.r[ 4]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), INT32)) || (sizeof(sh2.r[ 4]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), UINT32)) || (sizeof(sh2.r[ 4]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), INT16)) || (sizeof(sh2.r[ 4]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), UINT16)) || (sizeof(sh2.r[ 4]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), INT8)) || (sizeof(sh2.r[ 4]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), UINT8)) || (sizeof(sh2.r[ 4]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), PAIR)) || (sizeof(sh2.r[ 4]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[ 4]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3002); } while (0); state_save_register_memory("sh2", index, "sh2.r[ 4]", &sh2.r[ 4], sizeof(sh2.r[ 4]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[ 5]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), double)) || (sizeof(sh2.r[ 5]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), float)) || (sizeof(sh2.r[ 5]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), INT64)) || (sizeof(sh2.r[ 5]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), UINT64)) || (sizeof(sh2.r[ 5]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), INT32)) || (sizeof(sh2.r[ 5]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), UINT32)) || (sizeof(sh2.r[ 5]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), INT16)) || (sizeof(sh2.r[ 5]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), UINT16)) || (sizeof(sh2.r[ 5]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), INT8)) || (sizeof(sh2.r[ 5]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), UINT8)) || (sizeof(sh2.r[ 5]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), PAIR)) || (sizeof(sh2.r[ 5]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[ 5]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3003); } while (0); state_save_register_memory("sh2", index, "sh2.r[ 5]", &sh2.r[ 5], sizeof(sh2.r[ 5]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[ 6]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), double)) || (sizeof(sh2.r[ 6]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), float)) || (sizeof(sh2.r[ 6]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), INT64)) || (sizeof(sh2.r[ 6]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), UINT64)) || (sizeof(sh2.r[ 6]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), INT32)) || (sizeof(sh2.r[ 6]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), UINT32)) || (sizeof(sh2.r[ 6]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), INT16)) || (sizeof(sh2.r[ 6]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), UINT16)) || (sizeof(sh2.r[ 6]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), INT8)) || (sizeof(sh2.r[ 6]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), UINT8)) || (sizeof(sh2.r[ 6]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), PAIR)) || (sizeof(sh2.r[ 6]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[ 6]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3004); } while (0); state_save_register_memory("sh2", index, "sh2.r[ 6]", &sh2.r[ 6], sizeof(sh2.r[ 6]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[ 7]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), double)) || (sizeof(sh2.r[ 7]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), float)) || (sizeof(sh2.r[ 7]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), INT64)) || (sizeof(sh2.r[ 7]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), UINT64)) || (sizeof(sh2.r[ 7]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), INT32)) || (sizeof(sh2.r[ 7]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), UINT32)) || (sizeof(sh2.r[ 7]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), INT16)) || (sizeof(sh2.r[ 7]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), UINT16)) || (sizeof(sh2.r[ 7]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), INT8)) || (sizeof(sh2.r[ 7]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), UINT8)) || (sizeof(sh2.r[ 7]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), PAIR)) || (sizeof(sh2.r[ 7]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[ 7]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3005); } while (0); state_save_register_memory("sh2", index, "sh2.r[ 7]", &sh2.r[ 7], sizeof(sh2.r[ 7]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[ 8]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), double)) || (sizeof(sh2.r[ 8]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), float)) || (sizeof(sh2.r[ 8]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), INT64)) || (sizeof(sh2.r[ 8]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), UINT64)) || (sizeof(sh2.r[ 8]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), INT32)) || (sizeof(sh2.r[ 8]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), UINT32)) || (sizeof(sh2.r[ 8]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), INT16)) || (sizeof(sh2.r[ 8]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), UINT16)) || (sizeof(sh2.r[ 8]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), INT8)) || (sizeof(sh2.r[ 8]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), UINT8)) || (sizeof(sh2.r[ 8]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), PAIR)) || (sizeof(sh2.r[ 8]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[ 8]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3006); } while (0); state_save_register_memory("sh2", index, "sh2.r[ 8]", &sh2.r[ 8], sizeof(sh2.r[ 8]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[ 9]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), double)) || (sizeof(sh2.r[ 9]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), float)) || (sizeof(sh2.r[ 9]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), INT64)) || (sizeof(sh2.r[ 9]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), UINT64)) || (sizeof(sh2.r[ 9]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), INT32)) || (sizeof(sh2.r[ 9]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), UINT32)) || (sizeof(sh2.r[ 9]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), INT16)) || (sizeof(sh2.r[ 9]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), UINT16)) || (sizeof(sh2.r[ 9]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), INT8)) || (sizeof(sh2.r[ 9]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), UINT8)) || (sizeof(sh2.r[ 9]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), PAIR)) || (sizeof(sh2.r[ 9]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[ 9]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3007); } while (0); state_save_register_memory("sh2", index, "sh2.r[ 9]", &sh2.r[ 9], sizeof(sh2.r[ 9]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[10]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[10]), double)) || (sizeof(sh2.r[10]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[10]), float)) || (sizeof(sh2.r[10]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[10]), INT64)) || (sizeof(sh2.r[10]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[10]), UINT64)) || (sizeof(sh2.r[10]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[10]), INT32)) || (sizeof(sh2.r[10]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[10]), UINT32)) || (sizeof(sh2.r[10]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[10]), INT16)) || (sizeof(sh2.r[10]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[10]), UINT16)) || (sizeof(sh2.r[10]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[10]), INT8)) || (sizeof(sh2.r[10]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[10]), UINT8)) || (sizeof(sh2.r[10]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[10]), PAIR)) || (sizeof(sh2.r[10]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[10]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3008); } while (0); state_save_register_memory("sh2", index, "sh2.r[10]", &sh2.r[10], sizeof(sh2.r[10]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[11]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[11]), double)) || (sizeof(sh2.r[11]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[11]), float)) || (sizeof(sh2.r[11]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[11]), INT64)) || (sizeof(sh2.r[11]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[11]), UINT64)) || (sizeof(sh2.r[11]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[11]), INT32)) || (sizeof(sh2.r[11]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[11]), UINT32)) || (sizeof(sh2.r[11]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[11]), INT16)) || (sizeof(sh2.r[11]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[11]), UINT16)) || (sizeof(sh2.r[11]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[11]), INT8)) || (sizeof(sh2.r[11]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[11]), UINT8)) || (sizeof(sh2.r[11]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[11]), PAIR)) || (sizeof(sh2.r[11]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[11]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3009); } while (0); state_save_register_memory("sh2", index, "sh2.r[11]", &sh2.r[11], sizeof(sh2.r[11]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[12]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[12]), double)) || (sizeof(sh2.r[12]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[12]), float)) || (sizeof(sh2.r[12]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[12]), INT64)) || (sizeof(sh2.r[12]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[12]), UINT64)) || (sizeof(sh2.r[12]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[12]), INT32)) || (sizeof(sh2.r[12]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[12]), UINT32)) || (sizeof(sh2.r[12]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[12]), INT16)) || (sizeof(sh2.r[12]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[12]), UINT16)) || (sizeof(sh2.r[12]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[12]), INT8)) || (sizeof(sh2.r[12]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[12]), UINT8)) || (sizeof(sh2.r[12]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[12]), PAIR)) || (sizeof(sh2.r[12]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[12]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3010); } while (0); state_save_register_memory("sh2", index, "sh2.r[12]", &sh2.r[12], sizeof(sh2.r[12]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[13]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[13]), double)) || (sizeof(sh2.r[13]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[13]), float)) || (sizeof(sh2.r[13]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[13]), INT64)) || (sizeof(sh2.r[13]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[13]), UINT64)) || (sizeof(sh2.r[13]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[13]), INT32)) || (sizeof(sh2.r[13]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[13]), UINT32)) || (sizeof(sh2.r[13]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[13]), INT16)) || (sizeof(sh2.r[13]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[13]), UINT16)) || (sizeof(sh2.r[13]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[13]), INT8)) || (sizeof(sh2.r[13]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[13]), UINT8)) || (sizeof(sh2.r[13]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[13]), PAIR)) || (sizeof(sh2.r[13]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[13]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3011); } while (0); state_save_register_memory("sh2", index, "sh2.r[13]", &sh2.r[13], sizeof(sh2.r[13]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.r[14]) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.r[14]), double)) || (sizeof(sh2.r[14]) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.r[14]), float)) || (sizeof(sh2.r[14]) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.r[14]), INT64)) || (sizeof(sh2.r[14]) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.r[14]), UINT64)) || (sizeof(sh2.r[14]) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.r[14]), INT32)) || (sizeof(sh2.r[14]) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.r[14]), UINT32)) || (sizeof(sh2.r[14]) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.r[14]), INT16)) || (sizeof(sh2.r[14]) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.r[14]), UINT16)) || (sizeof(sh2.r[14]) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.r[14]), INT8)) || (sizeof(sh2.r[14]) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.r[14]), UINT8)) || (sizeof(sh2.r[14]) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.r[14]), PAIR)) || (sizeof(sh2.r[14]) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.r[14]), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3012); } while (0); state_save_register_memory("sh2", index, "sh2.r[14]", &sh2.r[14], sizeof(sh2.r[14]), 1); } while (0);
- do { do { if (!(((sizeof(sh2.ea) == sizeof(double) && __builtin_types_compatible_p(typeof(sh2.ea), double)) || (sizeof(sh2.ea) == sizeof(float) && __builtin_types_compatible_p(typeof(sh2.ea), float)) || (sizeof(sh2.ea) == sizeof(INT64) && __builtin_types_compatible_p(typeof(sh2.ea), INT64)) || (sizeof(sh2.ea) == sizeof(UINT64) && __builtin_types_compatible_p(typeof(sh2.ea), UINT64)) || (sizeof(sh2.ea) == sizeof(INT32) && __builtin_types_compatible_p(typeof(sh2.ea), INT32)) || (sizeof(sh2.ea) == sizeof(UINT32) && __builtin_types_compatible_p(typeof(sh2.ea), UINT32)) || (sizeof(sh2.ea) == sizeof(INT16) && __builtin_types_compatible_p(typeof(sh2.ea), INT16)) || (sizeof(sh2.ea) == sizeof(UINT16) && __builtin_types_compatible_p(typeof(sh2.ea), UINT16)) || (sizeof(sh2.ea) == sizeof(INT8) && __builtin_types_compatible_p(typeof(sh2.ea), INT8)) || (sizeof(sh2.ea) == sizeof(UINT8) && __builtin_types_compatible_p(typeof(sh2.ea), UINT8)) || (sizeof(sh2.ea) == sizeof(PAIR) && __builtin_types_compatible_p(typeof(sh2.ea), PAIR)) || (sizeof(sh2.ea) == sizeof(PAIR64) && __builtin_types_compatible_p(typeof(sh2.ea), PAIR64))))) fatalerror("Fatal error: %s (%s:%d)", "Invalid data type supplied for state saving.", "src/cpu/sh2/sh2.c", 3013); } while (0); state_save_register_memory("sh2", index, "sh2.ea", &sh2.ea, sizeof(sh2.ea), 1); } while (0);
- }
- static void sh2_set_info(UINT32 state, union cpuinfo *info)
- {
- switch (state)
- {
- case CPUINFO_INT_INPUT_STATE + 0: set_irq_line(0, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 1: set_irq_line(1, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 2: set_irq_line(2, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 3: set_irq_line(3, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 4: set_irq_line(4, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 5: set_irq_line(5, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 6: set_irq_line(6, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 7: set_irq_line(7, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 8: set_irq_line(8, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 9: set_irq_line(9, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 10: set_irq_line(10, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 11: set_irq_line(11, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 12: set_irq_line(12, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 13: set_irq_line(13, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 14: set_irq_line(14, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 15: set_irq_line(15, info->i); break;
- case CPUINFO_INT_INPUT_STATE + 16: set_irq_line(16, info->i); break;
- case CPUINFO_INT_INPUT_STATE + INPUT_LINE_NMI: set_irq_line(INPUT_LINE_NMI, info->i); break;
- case CPUINFO_INT_REGISTER + SH2_PC:
- case CPUINFO_INT_PC: sh2.pc = info->i; sh2.delay = 0; break;
- case CPUINFO_INT_SP: sh2.r[15] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_PR: sh2.pr = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_SR: sh2.sr = info->i; do { int irq = -1; if (sh2.pending_irq & (1 << 0)) irq = 0; if (sh2.pending_irq & (1 << 1)) irq = 1; if (sh2.pending_irq & (1 << 2)) irq = 2; if (sh2.pending_irq & (1 << 3)) irq = 3; if (sh2.pending_irq & (1 << 4)) irq = 4; if (sh2.pending_irq & (1 << 5)) irq = 5; if (sh2.pending_irq & (1 << 6)) irq = 6; if (sh2.pending_irq & (1 << 7)) irq = 7; if (sh2.pending_irq & (1 << 8)) irq = 8; if (sh2.pending_irq & (1 << 9)) irq = 9; if (sh2.pending_irq & (1 << 10)) irq = 10; if (sh2.pending_irq & (1 << 11)) irq = 11; if (sh2.pending_irq & (1 << 12)) irq = 12; if (sh2.pending_irq & (1 << 13)) irq = 13; if (sh2.pending_irq & (1 << 14)) irq = 14; if (sh2.pending_irq & (1 << 15)) irq = 15; if ((sh2.internal_irq_level != -1) && (sh2.internal_irq_level > irq)) irq = sh2.internal_irq_level; if (irq >= 0) sh2_exception("sh2_set_reg",irq); } while(0); break;
- case CPUINFO_INT_REGISTER + SH2_GBR: sh2.gbr = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_VBR: sh2.vbr = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_MACH: sh2.mach = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_MACL: sh2.macl = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R0: sh2.r[ 0] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R1: sh2.r[ 1] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R2: sh2.r[ 2] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R3: sh2.r[ 3] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R4: sh2.r[ 4] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R5: sh2.r[ 5] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R6: sh2.r[ 6] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R7: sh2.r[ 7] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R8: sh2.r[ 8] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R9: sh2.r[ 9] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R10: sh2.r[10] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R11: sh2.r[11] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R12: sh2.r[12] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R13: sh2.r[13] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R14: sh2.r[14] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_R15: sh2.r[15] = info->i; break;
- case CPUINFO_INT_REGISTER + SH2_EA: sh2.ea = info->i; break;
- case CPUINFO_INT_SH2_FRT_INPUT: sh2_set_frt_input(cpu_getactivecpu(), info->i); break;
- case CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK: sh2.ftcsr_read_callback = (void (*) (UINT32 ))info->f; break;
- }
- }
- void sh2_get_info(UINT32 state, union cpuinfo *info)
- {
- switch (state)
- {
- case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(sh2); break;
- case CPUINFO_INT_INPUT_LINES: info->i = 16; break;
- case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break;
- case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break;
- case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break;
- case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break;
- case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break;
- case CPUINFO_INT_MIN_CYCLES: info->i = 1; break;
- case CPUINFO_INT_MAX_CYCLES: info->i = 4; break;
- case CPUINFO_INT_DATABUS_WIDTH + 0: info->i = 32; break;
- case CPUINFO_INT_ADDRBUS_WIDTH + 0: info->i = 32; break;
- case CPUINFO_INT_ADDRBUS_SHIFT + 0: info->i = 0; break;
- case CPUINFO_INT_DATABUS_WIDTH + 1: info->i = 0; break;
- case CPUINFO_INT_ADDRBUS_WIDTH + 1: info->i = 0; break;
- case CPUINFO_INT_ADDRBUS_SHIFT + 1: info->i = 0; break;
- case CPUINFO_INT_DATABUS_WIDTH + 2: info->i = 0; break;
- case CPUINFO_INT_ADDRBUS_WIDTH + 2: info->i = 0; break;
- case CPUINFO_INT_ADDRBUS_SHIFT + 2: info->i = 0; break;
- case CPUINFO_INT_INPUT_STATE + 0: info->i = sh2.irq_line_state[0]; break;
- case CPUINFO_INT_INPUT_STATE + 1: info->i = sh2.irq_line_state[1]; break;
- case CPUINFO_INT_INPUT_STATE + 2: info->i = sh2.irq_line_state[2]; break;
- case CPUINFO_INT_INPUT_STATE + 3: info->i = sh2.irq_line_state[3]; break;
- case CPUINFO_INT_INPUT_STATE + 4: info->i = sh2.irq_line_state[4]; break;
- case CPUINFO_INT_INPUT_STATE + 5: info->i = sh2.irq_line_state[5]; break;
- case CPUINFO_INT_INPUT_STATE + 6: info->i = sh2.irq_line_state[6]; break;
- case CPUINFO_INT_INPUT_STATE + 7: info->i = sh2.irq_line_state[7]; break;
- case CPUINFO_INT_INPUT_STATE + 8: info->i = sh2.irq_line_state[8]; break;
- case CPUINFO_INT_INPUT_STATE + 9: info->i = sh2.irq_line_state[9]; break;
- case CPUINFO_INT_INPUT_STATE + 10: info->i = sh2.irq_line_state[10]; break;
- case CPUINFO_INT_INPUT_STATE + 11: info->i = sh2.irq_line_state[11]; break;
- case CPUINFO_INT_INPUT_STATE + 12: info->i = sh2.irq_line_state[12]; break;
- case CPUINFO_INT_INPUT_STATE + 13: info->i = sh2.irq_line_state[13]; break;
- case CPUINFO_INT_INPUT_STATE + 14: info->i = sh2.irq_line_state[14]; break;
- case CPUINFO_INT_INPUT_STATE + 15: info->i = sh2.irq_line_state[15]; break;
- case CPUINFO_INT_INPUT_STATE + 16: info->i = sh2.irq_line_state[16]; break;
- case CPUINFO_INT_INPUT_STATE + INPUT_LINE_NMI: info->i = sh2.nmi_line_state; break;
- case CPUINFO_INT_PREVIOUSPC: info->i = sh2.ppc; break;
- case CPUINFO_INT_PC:
- case CPUINFO_INT_REGISTER + SH2_PC: info->i = (sh2.delay) ? (sh2.delay & 0x07ffffff) : (sh2.pc & 0x07ffffff); break;
- case CPUINFO_INT_SP: info->i = sh2.r[15]; break;
- case CPUINFO_INT_REGISTER + SH2_PR: info->i = sh2.pr; break;
- case CPUINFO_INT_REGISTER + SH2_SR: info->i = sh2.sr; break;
- case CPUINFO_INT_REGISTER + SH2_GBR: info->i = sh2.gbr; break;
- case CPUINFO_INT_REGISTER + SH2_VBR: info->i = sh2.vbr; break;
- case CPUINFO_INT_REGISTER + SH2_MACH: info->i = sh2.mach; break;
- case CPUINFO_INT_REGISTER + SH2_MACL: info->i = sh2.macl; break;
- case CPUINFO_INT_REGISTER + SH2_R0: info->i = sh2.r[ 0]; break;
- case CPUINFO_INT_REGISTER + SH2_R1: info->i = sh2.r[ 1]; break;
- case CPUINFO_INT_REGISTER + SH2_R2: info->i = sh2.r[ 2]; break;
- case CPUINFO_INT_REGISTER + SH2_R3: info->i = sh2.r[ 3]; break;
- case CPUINFO_INT_REGISTER + SH2_R4: info->i = sh2.r[ 4]; break;
- case CPUINFO_INT_REGISTER + SH2_R5: info->i = sh2.r[ 5]; break;
- case CPUINFO_INT_REGISTER + SH2_R6: info->i = sh2.r[ 6]; break;
- case CPUINFO_INT_REGISTER + SH2_R7: info->i = sh2.r[ 7]; break;
- case CPUINFO_INT_REGISTER + SH2_R8: info->i = sh2.r[ 8]; break;
- case CPUINFO_INT_REGISTER + SH2_R9: info->i = sh2.r[ 9]; break;
- case CPUINFO_INT_REGISTER + SH2_R10: info->i = sh2.r[10]; break;
- case CPUINFO_INT_REGISTER + SH2_R11: info->i = sh2.r[11]; break;
- case CPUINFO_INT_REGISTER + SH2_R12: info->i = sh2.r[12]; break;
- case CPUINFO_INT_REGISTER + SH2_R13: info->i = sh2.r[13]; break;
- case CPUINFO_INT_REGISTER + SH2_R14: info->i = sh2.r[14]; break;
- case CPUINFO_INT_REGISTER + SH2_R15: info->i = sh2.r[15]; break;
- case CPUINFO_INT_REGISTER + SH2_EA: info->i = sh2.ea; break;
- case CPUINFO_PTR_SET_INFO: info->setinfo = sh2_set_info; break;
- case CPUINFO_PTR_GET_CONTEXT: info->getcontext = sh2_get_context; break;
- case CPUINFO_PTR_SET_CONTEXT: info->setcontext = sh2_set_context; break;
- case CPUINFO_PTR_INIT: info->init = sh2_init; break;
- case CPUINFO_PTR_RESET: info->reset = sh2_reset; break;
- case CPUINFO_PTR_EXIT: info->exit = sh2_exit; break;
- case CPUINFO_PTR_EXECUTE: info->execute = sh2_execute; break;
- case CPUINFO_PTR_BURN: info->burn = ((void *)0); break;
- case CPUINFO_PTR_DISASSEMBLE: info->disassemble = sh2_dasm; break;
- case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &sh2_icount; break;
- case CPUINFO_PTR_REGISTER_LAYOUT: info->p = sh2_reg_layout; break;
- case CPUINFO_PTR_WINDOW_LAYOUT: info->p = sh2_win_layout; break;
- case CPUINFO_STR_NAME: strcpy(info->s = cpuintrf_temp_str(), "SH-2"); break;
- case CPUINFO_STR_CORE_FAMILY: strcpy(info->s = cpuintrf_temp_str(), "Hitachi SH7600"); break;
- case CPUINFO_STR_CORE_VERSION: strcpy(info->s = cpuintrf_temp_str(), "1.01"); break;
- case CPUINFO_STR_CORE_FILE: strcpy(info->s = cpuintrf_temp_str(), "src/cpu/sh2/sh2.c"); break;
- case CPUINFO_STR_CORE_CREDITS: strcpy(info->s = cpuintrf_temp_str(), "Copyright (c) 2000 Juergen Buchmueller, all rights reserved."); break;
- case CPUINFO_STR_FLAGS:
- sprintf(info->s = cpuintrf_temp_str(), "%c%c%d%c%c",
- sh2.sr & 0x00000200 ? 'M':'.',
- sh2.sr & 0x00000100 ? 'Q':'.',
- (sh2.sr & 0x000000f0) >> 4,
- sh2.sr & 0x00000002 ? 'S':'.',
- sh2.sr & 0x00000001 ? 'T':'.');
- break;
- case CPUINFO_STR_REGISTER + SH2_PC: sprintf(info->s = cpuintrf_temp_str(), "PC :%08X", sh2.pc); break;
- case CPUINFO_STR_REGISTER + SH2_SR: sprintf(info->s = cpuintrf_temp_str(), "SR :%08X", sh2.sr); break;
- case CPUINFO_STR_REGISTER + SH2_PR: sprintf(info->s = cpuintrf_temp_str(), "PR :%08X", sh2.pr); break;
- case CPUINFO_STR_REGISTER + SH2_GBR: sprintf(info->s = cpuintrf_temp_str(), "GBR :%08X", sh2.gbr); break;
- case CPUINFO_STR_REGISTER + SH2_VBR: sprintf(info->s = cpuintrf_temp_str(), "VBR :%08X", sh2.vbr); break;
- case CPUINFO_STR_REGISTER + SH2_MACH: sprintf(info->s = cpuintrf_temp_str(), "MACH:%08X", sh2.mach); break;
- case CPUINFO_STR_REGISTER + SH2_MACL: sprintf(info->s = cpuintrf_temp_str(), "MACL:%08X", sh2.macl); break;
- case CPUINFO_STR_REGISTER + SH2_R0: sprintf(info->s = cpuintrf_temp_str(), "R0 :%08X", sh2.r[ 0]); break;
- case CPUINFO_STR_REGISTER + SH2_R1: sprintf(info->s = cpuintrf_temp_str(), "R1 :%08X", sh2.r[ 1]); break;
- case CPUINFO_STR_REGISTER + SH2_R2: sprintf(info->s = cpuintrf_temp_str(), "R2 :%08X", sh2.r[ 2]); break;
- case CPUINFO_STR_REGISTER + SH2_R3: sprintf(info->s = cpuintrf_temp_str(), "R3 :%08X", sh2.r[ 3]); break;
- case CPUINFO_STR_REGISTER + SH2_R4: sprintf(info->s = cpuintrf_temp_str(), "R4 :%08X", sh2.r[ 4]); break;
- case CPUINFO_STR_REGISTER + SH2_R5: sprintf(info->s = cpuintrf_temp_str(), "R5 :%08X", sh2.r[ 5]); break;
- case CPUINFO_STR_REGISTER + SH2_R6: sprintf(info->s = cpuintrf_temp_str(), "R6 :%08X", sh2.r[ 6]); break;
- case CPUINFO_STR_REGISTER + SH2_R7: sprintf(info->s = cpuintrf_temp_str(), "R7 :%08X", sh2.r[ 7]); break;
- case CPUINFO_STR_REGISTER + SH2_R8: sprintf(info->s = cpuintrf_temp_str(), "R8 :%08X", sh2.r[ 8]); break;
- case CPUINFO_STR_REGISTER + SH2_R9: sprintf(info->s = cpuintrf_temp_str(), "R9 :%08X", sh2.r[ 9]); break;
- case CPUINFO_STR_REGISTER + SH2_R10: sprintf(info->s = cpuintrf_temp_str(), "R10 :%08X", sh2.r[10]); break;
- case CPUINFO_STR_REGISTER + SH2_R11: sprintf(info->s = cpuintrf_temp_str(), "R11 :%08X", sh2.r[11]); break;
- case CPUINFO_STR_REGISTER + SH2_R12: sprintf(info->s = cpuintrf_temp_str(), "R12 :%08X", sh2.r[12]); break;
- case CPUINFO_STR_REGISTER + SH2_R13: sprintf(info->s = cpuintrf_temp_str(), "R13 :%08X", sh2.r[13]); break;
- case CPUINFO_STR_REGISTER + SH2_R14: sprintf(info->s = cpuintrf_temp_str(), "R14 :%08X", sh2.r[14]); break;
- case CPUINFO_STR_REGISTER + SH2_R15: sprintf(info->s = cpuintrf_temp_str(), "R15 :%08X", sh2.r[15]); break;
- case CPUINFO_STR_REGISTER + SH2_EA: sprintf(info->s = cpuintrf_temp_str(), "EA :%08X", sh2.ea); break;
- case CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK: info->f = (genf*)sh2.ftcsr_read_callback; break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement