/** * Safety Checker configuration for non-standard C code * supported by the TASKING ARM C compiler. * */ #ifndef _CARM_H #define _CARM_H 1 /** * Configuration of non-standard basic data types */ /** * Configuration of non-standard predefined types */ /** * Configuration of non-standard data type qualifiers */ #define __data #define __export #define __import #define __fpu #define __reentrant #define __return_in_regs #define __rtl #define __unaligned /** * Configuration of non-standard memory qualifiers */ #define __rtl_alloc /** * Configuration of non-standard function qualifiers */ #define __CC(wishbone,value,nowait) #define __frame(...) #define __interrupt(...) #define __interrupt_dabt #define __interrupt_fiq #define __interrupt_iabt #define __interrupt_irq #define __interrupt_svc #define __interrupt_swi #define __interrupt_und #define __nesting_enabled #define __noinline #define __novector /** * Configuration of non-standard attributes */ #define __align(n) #define __align__(n) #define __aligned__(n) #define __arm #define __at(address) #define __at__(address) #define __group__(group) #define __linkonce(name) #define __packed__ #define __protect__ #define __section(name) #define __thumb /** * Configuration of non-standard predefined typedefs */ typedef signed char __data * __bounds_t; typedef signed char __data * __bounds_mem_t; typedef signed int __bounds_off_t; typedef void __data * __prof_adm; typedef void __reentrant (* __codeptr)(); /** * Configuration of non-standard predefined macros */ #define __ARM__ 1 #define __CARM__ 1 /** * #define __FPU_NONE__ use -D__FPU_NONE__ * #define __CPU_ARMVxx__ use -D__CPU_ARMV{4T,4,5TE,5T,6M,7A,7EM,7M,7R}__ or -D__CPU_XS__ * #define __CPU__ ARMvxx use -D__CPU__=ARMvxx{4T,4,5TE,5T,6M,7A,7EM,7M,7R}__ or -D__CPU__=XS * #define __FPU_xx__ use -D__FPU_{FP5,FPV4SP,FPV5SP,HAS_FMA,NONE,VFP2,VFP3D32,VFP3SP,VFP3,VFP4D32,VFP4SP,VFP4,VFP5SP,VFP5,VFP_SP,VFP}__ * #define __LITTLE/BIG_ENDIAN__ use -D__LITTLE_ENDIAN__ or -D_BIG_ENDIAN__ * #define __THUMB2__ use -D__THUMB2__ * #define __THUMB__ use -D__THUMB__ */ /** * Prototype intrinsic functions */ void * __va_start(void); __codeptr __get_return_address(void); void volatile __swi(int); void volatile __svc(int); unsigned int volatile __getcpsr(void); unsigned int volatile __setcpsr(int, int); unsigned int volatile __getspsr(void); unsigned int volatile __setspsr(int, int); unsigned int volatile __getapsr(void); unsigned int volatile __setapsr(int, int); unsigned int volatile __getipsr(void); unsigned int volatile __setipsr(int, int); unsigned int volatile __getapsr(void); unsigned int volatile __setapsr(int, int); void volatile __setcpsr_c(int); unsigned int volatile __setcpsr(int, int); void volatile __setcpsr_c(int); unsigned int volatile __getcpsr(void); unsigned int volatile __setspsr(int, int); void volatile __setspsr_c(int); unsigned int volatile __getspsr(void); unsigned int volatile __setapsr(int, int); void volatile __setapsr_c(int); unsigned int volatile __getapsr(void); unsigned int volatile __setipsr(int, int); void volatile __setipsr_c(int); unsigned int volatile __getipsr(void); void volatile __setfpscr(int); unsigned int volatile __getfpscr(void); void volatile __setsp( __data void * stack ); void volatile __remap_pc( void ); void volatile __nop(void); void volatile __enable_irq(void); void volatile __disable_irq(void); void volatile __set_PRIMASK(unsigned int value); unsigned int volatile __get_PRIMASK(void); void volatile __enable_fault_irq(void); void volatile __disable_fault_irq(void); void volatile __set_FAULTMASK(unsigned int value); unsigned int volatile __get_FAULTMASK(void); void volatile __set_BASEPRI(unsigned int value); unsigned int volatile __get_BASEPRI(void); void volatile __set_CONTROL(unsigned int value); unsigned int volatile __get_CONTROL(void); void volatile __set_PSP(unsigned int value); unsigned int volatile __get_PSP(void); void volatile __set_MSP(unsigned int value); unsigned int volatile __get_MSP(void); void volatile __NOP(void); void volatile __WFI(void); void volatile __WFE(void); void volatile __SEV(void); void volatile __ISB(void); void volatile __DSB(void); void volatile __DMB(void); unsigned int __REV(unsigned int value); unsigned int __REV16(unsigned short value); signed int __REVSH(signed int value); unsigned int __RBIT(unsigned int value); unsigned int __ROR(unsigned int op, unsigned int shift); unsigned volatile char __LDREXB(unsigned char *addr); unsigned volatile short __LDREXH(unsigned short *addr); unsigned int volatile __LDREXW(unsigned int *addr); unsigned int volatile __STREXB(unsigned char value, unsigned char *addr); unsigned int volatile __STREXH(unsigned short value, unsigned short *addr); unsigned int volatile __STREXW(unsigned int value, unsigned int *addr); void volatile __CLREX(void); unsigned int volatile __RRX(unsigned int value); unsigned char volatile __LDRBT(unsigned char *addr); unsigned volatile short __LDRHT(unsigned short *addr); unsigned int volatile __LDRT(unsigned int *addr); void volatile __STRBT(unsigned char value, unsigned char *addr); void volatile __STRHT(unsigned short value, unsigned short *addr); void volatile __STRT(unsigned int value, unsigned int *addr); void volatile __BKPT(unsigned short int); unsigned char __CLZ(unsigned int val1); #if defined(__CPU_ARMV7M__) || defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) int __SSAT(int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7M__) || defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __USAT(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SADD16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SASX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SSAX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SSUB16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SADD8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SSUB8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __QADD16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __QASX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __QSAX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __QSUB16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __QADD8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __QSUB8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SHADD16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SHASX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SHSAX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SHSUB16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SHADD8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SHSUB8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UADD16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UASX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __USAX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __USUB16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UADD8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __USUB8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UQADD16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UQASX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UQSAX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UQSUB16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UQADD8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UQSUB8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UHADD16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UHASX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UHSAX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UHSUB16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UHADD8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UHSUB8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SXTB16(unsigned int val1); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UXTB16(unsigned int val1); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __UXTAB16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SXTAB16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SSAT16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __USAT16(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SMUAD(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SMUADX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SMUSD(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SMUSDX(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __QADD(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __QSUB(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __USAD8(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SEL(unsigned int val1, unsigned int val2); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SMLAD(unsigned int val1, unsigned int val2, unsigned int val3); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SMLADX(unsigned int val1, unsigned int val2, unsigned int val3); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SMLSD(unsigned int val1, unsigned int val2, unsigned int val3); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __SMLSDX(unsigned int val1, unsigned int val2, unsigned int val3); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __USADA8(unsigned int val1, unsigned int val2, unsigned int val3); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __PKHBT(unsigned int val1, unsigned int val2, unsigned int val3); #endif #if defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__) unsigned int __PKHTB(unsigned int val1, unsigned int val2, unsigned int val3); #endif #if (__STDC_VERSION__ >= 199901L) && (defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__)) unsigned long long int __SMLALD(unsigned int val1, unsigned int val2, unsigned long long int val3); #endif #if (__STDC_VERSION__ >= 199901L) && (defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__)) unsigned long long int __SMLALDX(unsigned int val1, unsigned int val2, unsigned long long int val3); #endif #if (__STDC_VERSION__ >= 199901L) && (defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__)) unsigned long long int __SMLSLD(unsigned int val1, unsigned int val2, unsigned long long int val3); #endif #if (__STDC_VERSION__ >= 199901L) && (defined(__CPU_ARMV7EM__) || defined(__CPU_ARMV7R__) || defined(__CPU_ARMV7A__)) unsigned long long int __SMLSLDX(unsigned int val1, unsigned int val2, unsigned long long int val3); #endif double __vfp_fabs(double x); double __vfp_sqrt(double x); double __vfp_ceil(double x); double __vfp_floor(double x); double __vfp_trunc(double x); double __vfp_round(double x); double __vfp_rint(double x); double __vfp_nearbyint(double x); double __vfp_fmax(double x, double y); double __vfp_fmin(double x, double y); double __vfp_fma(double x, double y, double z); long __vfp_lrint(double x); long __vfp_lround(double x); float __vfp_fabsf(float x); float __vfp_sqrtf(float x); float __vfp_ceilf(float x); float __vfp_floorf(float x); float __vfp_truncf(float x); float __vfp_roundf(float x); float __vfp_rintf(float x); float __vfp_nearbyintf(float x); float __vfp_fmaxf(float x, float y); float __vfp_fminf(float x, float y); float __vfp_fmaf(float x, float y, float z); long __vfp_lrintf(float x); long __vfp_lroundf(float x); long double __vfp_fabsl(long double x); long double __vfp_sqrtl(long double x); long double __vfp_ceill(long double x); long double __vfp_floorl(long double x); long double __vfp_truncl(long double x); long double __vfp_roundl(long double x); long double __vfp_rintl(long double x); long double __vfp_nearbyintl(long double x); long double __vfp_fmaxl(long double x, long double y); long double __vfp_fminl(long double x, long double y); long double __vfp_fmal(long double x, long double y, long double z); long __vfp_lrintl(long double x); long __vfp_lroundl(long double x); #endif /* _CARM_H */