Update vbcc stuff from latest VBCC. The include files are copied from m68k-linux and the libraries from m68k-atari.
Without this you get weird warnings.
This commit is contained in:
parent
a3846c799a
commit
08f6942dfe
|
@ -13,9 +13,6 @@
|
||||||
/** Return the maximum value of x or y */
|
/** Return the maximum value of x or y */
|
||||||
#define max(x, y) ((x < y) ? y : x)
|
#define max(x, y) ((x < y) ? y : x)
|
||||||
|
|
||||||
/** Return the absolute value of x */
|
|
||||||
#define abs(x) ((x >= 0) ? x : 0 - x)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Re-entrant version of strtok_r, because VBCC does not provide it
|
* Re-entrant version of strtok_r, because VBCC does not provide it
|
||||||
*
|
*
|
||||||
|
|
|
@ -33,7 +33,7 @@ int toupper(int);
|
||||||
int tolower(int);
|
int tolower(int);
|
||||||
|
|
||||||
#ifndef __NOINLINE__
|
#ifndef __NOINLINE__
|
||||||
int toupper(__reg("d0") int) =
|
__regsused("d0/a0") int __asm_toupper(__reg("d0") int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\txref\t___ctype\n"
|
"\txref\t___ctype\n"
|
||||||
"\tlea\t___ctype,a0\n"
|
"\tlea\t___ctype,a0\n"
|
||||||
|
@ -42,7 +42,7 @@ int toupper(__reg("d0") int) =
|
||||||
"\tand.b\t#$df,d0\n"
|
"\tand.b\t#$df,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int tolower(__reg("d0") int) =
|
__regsused("d0/a0") int __asm_tolower(__reg("d0") int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\txref\t___ctype\n"
|
"\txref\t___ctype\n"
|
||||||
"\tlea\t___ctype,a0\n"
|
"\tlea\t___ctype,a0\n"
|
||||||
|
@ -51,6 +51,8 @@ int tolower(__reg("d0") int) =
|
||||||
"\tor.b\t#$20,d0\n"
|
"\tor.b\t#$20,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
|
#define toupper(c) __asm_toupper(c)
|
||||||
|
#define tolower(c) __asm_tolower(c)
|
||||||
#endif /* __NOINLINE__ */
|
#endif /* __NOINLINE__ */
|
||||||
|
|
||||||
#endif /* __CTYPE_H */
|
#endif /* __CTYPE_H */
|
||||||
|
|
|
@ -40,33 +40,33 @@ int feupdateenv(const fenv_t *);
|
||||||
#if defined(__M68881) || defined(__M68882)
|
#if defined(__M68881) || defined(__M68882)
|
||||||
/* direct FPU support */
|
/* direct FPU support */
|
||||||
|
|
||||||
int fegetenv(__reg("a0")fenv_t *) =
|
__regsused("d0/a0") int __asm_fegetenv(__reg("a0")fenv_t *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.l\tfpcr,(a0)\n"
|
"\tfmove.l\tfpcr,(a0)\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fegetround(void) =
|
__regsused("d0/d1") int __asm_fegetround() =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.l\tfpcr,d1\n"
|
"\tfmove.l\tfpcr,d1\n"
|
||||||
"\tmoveq\t#$30,d0\n"
|
"\tmoveq\t#$30,d0\n"
|
||||||
"\tand.l\td1,d0\n"
|
"\tand.l\td1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fegetprec(void) =
|
__regsused("d0") int __asm_fegetprec() =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.l\tfpcr,d0\n"
|
"\tfmove.l\tfpcr,d0\n"
|
||||||
"\tand.l\t#$c0,d0\n"
|
"\tand.l\t#$c0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int feholdexcept(__reg("a0")fenv_t *) =
|
__regsused("d0/a0") int __asm_feholdexcept(__reg("a0")fenv_t *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.l\tfpcr,(a0)\n"
|
"\tfmove.l\tfpcr,(a0)\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fesetenv(__reg("a0")const fenv_t *) =
|
__regsused("d0/a0") int __asm_fesetenv(__reg("a0")const fenv_t *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.l\t(a0),fpcr\n"
|
"\tfmove.l\t(a0),fpcr\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fesetround(__reg("d0")int) =
|
__regsused("d0/d1") int __asm_fesetround(__reg("d0")int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.l\tfpcr,d1\n"
|
"\tfmove.l\tfpcr,d1\n"
|
||||||
"\tand.w\t#$ffcf,d1\n"
|
"\tand.w\t#$ffcf,d1\n"
|
||||||
|
@ -74,7 +74,7 @@ int fesetround(__reg("d0")int) =
|
||||||
"\tfmove.l\td1,fpcr\n"
|
"\tfmove.l\td1,fpcr\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fesetprec(__reg("d0")int) =
|
__regsused("d0/d1") int __asm_fesetprec(__reg("d0")int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.l\tfpcr,d1\n"
|
"\tfmove.l\tfpcr,d1\n"
|
||||||
"\tand.w\t#$ff3f,d1\n"
|
"\tand.w\t#$ff3f,d1\n"
|
||||||
|
@ -86,62 +86,77 @@ int fesetprec(__reg("d0")int) =
|
||||||
#else
|
#else
|
||||||
/* IEEE or software floating-point */
|
/* IEEE or software floating-point */
|
||||||
|
|
||||||
int fegetenv(__reg("a0")fenv_t *) =
|
__regsused("d0") int __asm_fegetenv(__reg("a0")fenv_t *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fegetround(void) =
|
__regsused("d0") int __asm_fegetround() =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fegetprec(void) =
|
__regsused("d0") int __asm_fegetprec() =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int feholdexcept(__reg("a0")fenv_t *) =
|
__regsused("d0") int __asm_feholdexcept(__reg("a0")fenv_t *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fesetenv(__reg("a0")const fenv_t *) =
|
__regsused("d0") int __asm_fesetenv(__reg("a0")const fenv_t *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fesetround(__reg("d0")int) =
|
__regsused("d0") int __asm_fesetround(__reg("d0")int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fesetprec(__reg("d0")int) =
|
__regsused("d0") int __asm_fesetprec(__reg("d0")int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int feclearexcept(__reg("d0")int) =
|
__regsused("d0") int __asm_feclearexcept(__reg("d0")int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fegetexceptflag(__reg("a0")fexcept_t *, __reg("d0")int) =
|
__regsused("d0") int __asm_fegetexceptflag(__reg("a0")fexcept_t *,
|
||||||
|
__reg("d0")int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int feraiseexcept(__reg("d0")int) =
|
__regsused("d0") int __asm_feraiseexcept(__reg("d0")int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fesetexceptflag(__reg("a0")const fexcept_t *, __reg("d0")int) =
|
__regsused("d0") int __asm_fesetexceptflag(__reg("a0")const fexcept_t *,
|
||||||
|
__reg("d0")int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int fetestexcept(__reg("d0")int) =
|
__regsused("d0") int __asm_fetestexcept(__reg("d0")int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int feupdateenv(__reg("a0")const fenv_t *) =
|
__regsused("d0") int __asm_feupdateenv(__reg("a0")const fenv_t *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#-1,d0\n"
|
"\tmoveq\t#-1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
|
|
||||||
|
#define feclearexcept(x) __asm_feclearexcept(x)
|
||||||
|
#define fegetenv(x) __asm_fegetenv(x)
|
||||||
|
#define fegetexceptflag(x,y) __asm_fegetexceptflag(x,y)
|
||||||
|
#define fegetround() __asm_fegetround()
|
||||||
|
#define fegetprec() __asm_fegetprec()
|
||||||
|
#define feholdexcept(x) __asm_feholdexcept(x)
|
||||||
|
#define feraiseexcept(x) __asm_feraiseexcept(x)
|
||||||
|
#define fesetenv(x) __asm_fesetenv(x)
|
||||||
|
#define fesetexceptflag(x,y) __asm_fesetexceptflag(x,y)
|
||||||
|
#define fesetround(x) __asm_fesetround(x)
|
||||||
|
#define fesetprec(x) __asm_fesetprec(x)
|
||||||
|
#define fetestexcept(x) __asm_fetestexcept(x)
|
||||||
|
#define feupdateenv(x) __asm_feupdateenv(x)
|
||||||
#endif /* __NOINLINE__ */
|
#endif /* __NOINLINE__ */
|
||||||
|
|
||||||
#endif /* __FENV_H */
|
#endif /* __FENV_H */
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* $VER: math_040.h 1.0 (06.04.2017)
|
/* $VER: math_040.h 1.1 (25.09.2021)
|
||||||
** math.h 68040 specific support, link with -lm040
|
** math.h 68040 specific support, link with -lm040
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* macros */
|
/* macros */
|
||||||
int fpclassify(__reg("fp0")double) =
|
__regsused("d0/d1/fp0") int fpclassify(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftst.x\tfp0\n"
|
"\tftst.x\tfp0\n"
|
||||||
"\tmoveq\t#7,d1\n"
|
"\tmoveq\t#7,d1\n"
|
||||||
|
@ -11,7 +11,7 @@ int fpclassify(__reg("fp0")double) =
|
||||||
"\trol.l\t#8,d0\n"
|
"\trol.l\t#8,d0\n"
|
||||||
"\tand.l\td1,d0\n"
|
"\tand.l\td1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isfinite(__reg("fp0")double) =
|
__regsused("d0/fp0") int isfinite(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftst.x\tfp0\n"
|
"\tftst.x\tfp0\n"
|
||||||
"\tfmove.l\tfpsr,d0\n"
|
"\tfmove.l\tfpsr,d0\n"
|
||||||
|
@ -19,7 +19,7 @@ int isfinite(__reg("fp0")double) =
|
||||||
"\tseq\td0\n"
|
"\tseq\td0\n"
|
||||||
"\textb.l\td0\n"
|
"\textb.l\td0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isnormal(__reg("fp0")double) =
|
__regsused("d0/fp0") int isnormal(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftst.x\tfp0\n"
|
"\tftst.x\tfp0\n"
|
||||||
"\tfmove.l\tfpsr,d0\n"
|
"\tfmove.l\tfpsr,d0\n"
|
||||||
|
@ -27,7 +27,7 @@ int isnormal(__reg("fp0")double) =
|
||||||
"\tseq\td0\n"
|
"\tseq\td0\n"
|
||||||
"\textb.l\td0\n"
|
"\textb.l\td0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isnan(__reg("fp0")double) =
|
__regsused("d0/fp0") int isnan(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftst.x\tfp0\n"
|
"\tftst.x\tfp0\n"
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
|
@ -35,7 +35,7 @@ int isnan(__reg("fp0")double) =
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isinf(__reg("fp0")double) =
|
__regsused("d0/d1/fp0") int isinf(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftst.x\tfp0\n"
|
"\tftst.x\tfp0\n"
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
|
@ -43,13 +43,13 @@ int isinf(__reg("fp0")double) =
|
||||||
"\trol.l\t#7,d1\n"
|
"\trol.l\t#7,d1\n"
|
||||||
"\tand.l\td1,d0\n"
|
"\tand.l\td1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int signbit(__reg("fp0")double) =
|
__regsused("d0/d1/fp0") int signbit(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\tfp0,d0\n"
|
"\tfmove.s\tfp0,d0\n"
|
||||||
"\tmoveq\t#31,d1\n"
|
"\tmoveq\t#31,d1\n"
|
||||||
"\tasr.l\td1,d0\n"
|
"\tasr.l\td1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isgreater(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int isgreater(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
|
@ -57,7 +57,7 @@ int isgreater(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isgreaterequal(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int isgreaterequal(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
|
@ -65,7 +65,7 @@ int isgreaterequal(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isless(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int isless(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
|
@ -73,7 +73,7 @@ int isless(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int islessequal(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int islessequal(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
|
@ -81,7 +81,7 @@ int islessequal(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int islessgreater(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int islessgreater(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
|
@ -89,7 +89,7 @@ int islessgreater(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isunordered(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int isunordered(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
|
@ -100,7 +100,7 @@ int isunordered(__reg("fp0")double,__reg("fp1")double) =
|
||||||
|
|
||||||
#ifndef __NOINLINE__
|
#ifndef __NOINLINE__
|
||||||
/* faster inline functions */
|
/* faster inline functions */
|
||||||
__fp0ret double ceil(__reg("fp0")double) =
|
__regsused("d0/d1/fp0") __fp0ret double __asm_ceil(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.l\tfpcr,d1\n"
|
"\tfmove.l\tfpcr,d1\n"
|
||||||
"\tmoveq\t#$30,d0\n"
|
"\tmoveq\t#$30,d0\n"
|
||||||
|
@ -110,7 +110,7 @@ __fp0ret double ceil(__reg("fp0")double) =
|
||||||
"\tfmove.l\td0,fp0\n"
|
"\tfmove.l\td0,fp0\n"
|
||||||
"\tfmove.l\td1,fpcr\n"
|
"\tfmove.l\td1,fpcr\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double copysign(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") __fp0ret double __asm_copysign(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\tfp1,d0\n"
|
"\tfmove.s\tfp1,d0\n"
|
||||||
"\tfabs.x\tfp0\n"
|
"\tfabs.x\tfp0\n"
|
||||||
|
@ -119,16 +119,16 @@ __fp0ret double copysign(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tfneg.x\tfp0\n"
|
"\tfneg.x\tfp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fabs(__reg("fp0")double) =
|
__regsused("fp0") __fp0ret double __asm_fabs(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfabs.x\tfp0\n"
|
"\tfabs.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fdim(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("fp0/fp1") __fp0ret double __asm_fdim(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfsub.x\tfp1,fp0\n"
|
"\tfsub.x\tfp1,fp0\n"
|
||||||
"\tfabs.x\tfp0\n"
|
"\tfabs.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double floor(__reg("fp0")double) =
|
__regsused("d0/d1/fp0") __fp0ret double __asm_floor(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.l\tfpcr,d1\n"
|
"\tfmove.l\tfpcr,d1\n"
|
||||||
"\tmoveq\t#$20,d0\n"
|
"\tmoveq\t#$20,d0\n"
|
||||||
|
@ -139,12 +139,12 @@ __fp0ret double floor(__reg("fp0")double) =
|
||||||
"\tfmove.l\td0,fp0\n"
|
"\tfmove.l\td0,fp0\n"
|
||||||
"\tfmove.l\td1,fpcr\n"
|
"\tfmove.l\td1,fpcr\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fma(__reg("fp0")double,__reg("fp1")double,__reg("fp2")double) =
|
__regsused("fp0/fp1/fp2") __fp0ret double __asm_fma(__reg("fp0")double,__reg("fp1")double,__reg("fp2")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmul.x\tfp1,fp0\n"
|
"\tfmul.x\tfp1,fp0\n"
|
||||||
"\tfadd.x\tfp2,fp0\n"
|
"\tfadd.x\tfp2,fp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fmax(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("fp0/fp1") __fp0ret double __asm_fmax(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tfboge\t.skip\n"
|
"\tfboge\t.skip\n"
|
||||||
|
@ -153,7 +153,7 @@ __fp0ret double fmax(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tfmove.x\tfp1,fp0\n"
|
"\tfmove.x\tfp1,fp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fmin(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("fp0/fp1") __fp0ret double __asm_fmin(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tfbole\t.skip\n"
|
"\tfbole\t.skip\n"
|
||||||
|
@ -162,27 +162,27 @@ __fp0ret double fmin(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tfmove.x\tfp1,fp0\n"
|
"\tfmove.x\tfp1,fp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double hypot(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("fp0/fp1") __fp0ret double __asm_hypot(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmul.x\tfp0,fp0\n"
|
"\tfmul.x\tfp0,fp0\n"
|
||||||
"\tfmul.x\tfp1,fp1\n"
|
"\tfmul.x\tfp1,fp1\n"
|
||||||
"\tfadd.x\tfp1,fp0\n"
|
"\tfadd.x\tfp1,fp0\n"
|
||||||
"\tfsqrt.x\tfp0\n"
|
"\tfsqrt.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double nan(__reg("a0")const char *) =
|
__regsused("fp0") __fp0ret double __asm_nan(__reg("a0")const char *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\t#$7fc00000,fp0\n"
|
"\tfmove.s\t#$7fc00000,fp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double nearbyint(__reg("fp0")double) =
|
__regsused("d0/fp0") __fp0ret double __asm_nearbyint(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.l\tfp0,d0\n"
|
"\tfmove.l\tfp0,d0\n"
|
||||||
"\tfmove.l\td0,fp0\n"
|
"\tfmove.l\td0,fp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double sqrt(__reg("fp0")double) =
|
__regsused("fp0") __fp0ret double __asm_sqrt(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfsqrt.x\tfp0\n"
|
"\tfsqrt.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double trunc(__reg("fp0")double) =
|
__regsused("d0/d1/fp0") __fp0ret double __asm_trunc(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#$10,d0\n"
|
"\tmoveq\t#$10,d0\n"
|
||||||
"\tfmove.l\tfpcr,d1\n"
|
"\tfmove.l\tfpcr,d1\n"
|
||||||
|
@ -194,18 +194,33 @@ __fp0ret double trunc(__reg("fp0")double) =
|
||||||
"\tfmove.l\td1,fpcr\n"
|
"\tfmove.l\td1,fpcr\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
|
|
||||||
|
/* double precision */
|
||||||
|
#define ceil(x) __asm_ceil(x)
|
||||||
|
#define copysign(x,y) __asm_copysign(x,y)
|
||||||
|
#define fabs(x) __asm_fabs(x)
|
||||||
|
#define fdim(x,y) __asm_fdim(x,y)
|
||||||
|
#define floor(x) __asm_floor(x)
|
||||||
|
#define fma(x,y) __asm_fma(x,y)
|
||||||
|
#define fmax(x,y) __asm_fmax(x,y)
|
||||||
|
#define fmin(x,y) __asm_fmin(x,y)
|
||||||
|
#define hypot(x,y) __asm_hypot(x,y)
|
||||||
|
#define nan(x) __asm_nan(x)
|
||||||
|
#define nearbyint(x) __asm_nearbyint(x)
|
||||||
|
#define sqrt(x) __asm_sqrt(x)
|
||||||
|
#define trunc(x) __asm_trunc(x)
|
||||||
|
|
||||||
/* single precision */
|
/* single precision */
|
||||||
#define ceilf(x) ceil(x)
|
#define ceilf(x) __asm_ceil(x)
|
||||||
#define copysignf(x,y) copysign(x,y)
|
#define copysignf(x,y) __asm_copysign(x,y)
|
||||||
#define fabsf(x) fabs(x)
|
#define fabsf(x) __asm_fabs(x)
|
||||||
#define fdimf(x,y) fdim(x,y)
|
#define fdimf(x,y) __asm_fdim(x,y)
|
||||||
#define floorf(x) floor(x)
|
#define floorf(x) __asm_floor(x)
|
||||||
#define fmaf(x,y) fma(x,y)
|
#define fmaf(x,y) __asm_fma(x,y)
|
||||||
#define fmaxf(x,y) fmax(x,y)
|
#define fmaxf(x,y) __asm_fmax(x,y)
|
||||||
#define fminf(x,y) fmin(x,y)
|
#define fminf(x,y) __asm_fmin(x,y)
|
||||||
#define hypotf(x,y) hypot(x,y)
|
#define hypotf(x,y) __asm_hypot(x,y)
|
||||||
#define nanf(x) nan(x)
|
#define nanf(x) __asm_nan(x)
|
||||||
#define nearbyintf(x) nearbyint(x)
|
#define nearbyintf(x) __asm_nearbyint(x)
|
||||||
#define sqrtf(x) sqrt(x)
|
#define sqrtf(x) __asm_sqrt(x)
|
||||||
#define truncf(x) trunc(x)
|
#define truncf(x) __asm_trunc(x)
|
||||||
#endif /* __NOINLINE__ */
|
#endif /* __NOINLINE__ */
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* $VER: math_060.h 1.0 (06.04.2017)
|
/* $VER: math_060.h 1.1 (25.09.2021)
|
||||||
** math.h 68060 specific support, link with -lm060
|
** math.h 68060 specific support, link with -lm060
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* macros */
|
/* macros */
|
||||||
int fpclassify(__reg("fp0")double) =
|
__regsused("d0/d1/fp0") int fpclassify(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftst.x\tfp0\n"
|
"\tftst.x\tfp0\n"
|
||||||
"\tmoveq\t#7,d1\n"
|
"\tmoveq\t#7,d1\n"
|
||||||
|
@ -11,7 +11,7 @@ int fpclassify(__reg("fp0")double) =
|
||||||
"\trol.l\t#8,d0\n"
|
"\trol.l\t#8,d0\n"
|
||||||
"\tand.l\td1,d0\n"
|
"\tand.l\td1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isfinite(__reg("fp0")double) =
|
__regsused("d0/fp0") int isfinite(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftst.x\tfp0\n"
|
"\tftst.x\tfp0\n"
|
||||||
"\tfmove.l\tfpsr,d0\n"
|
"\tfmove.l\tfpsr,d0\n"
|
||||||
|
@ -19,7 +19,7 @@ int isfinite(__reg("fp0")double) =
|
||||||
"\tseq\td0\n"
|
"\tseq\td0\n"
|
||||||
"\textb.l\td0\n"
|
"\textb.l\td0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isnormal(__reg("fp0")double) =
|
__regsused("d0/fp0") int isnormal(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftst.x\tfp0\n"
|
"\tftst.x\tfp0\n"
|
||||||
"\tfmove.l\tfpsr,d0\n"
|
"\tfmove.l\tfpsr,d0\n"
|
||||||
|
@ -27,7 +27,7 @@ int isnormal(__reg("fp0")double) =
|
||||||
"\tseq\td0\n"
|
"\tseq\td0\n"
|
||||||
"\textb.l\td0\n"
|
"\textb.l\td0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isnan(__reg("fp0")double) =
|
__regsused("d0/fp0") int isnan(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftst.x\tfp0\n"
|
"\tftst.x\tfp0\n"
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
|
@ -35,7 +35,7 @@ int isnan(__reg("fp0")double) =
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isinf(__reg("fp0")double) =
|
__regsused("d0/d1/fp0") int isinf(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftst.x\tfp0\n"
|
"\tftst.x\tfp0\n"
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
|
@ -43,13 +43,13 @@ int isinf(__reg("fp0")double) =
|
||||||
"\trol.l\t#7,d1\n"
|
"\trol.l\t#7,d1\n"
|
||||||
"\tand.l\td1,d0\n"
|
"\tand.l\td1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int signbit(__reg("fp0")double) =
|
__regsused("d0/d1/fp0") int signbit(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\tfp0,d0\n"
|
"\tfmove.s\tfp0,d0\n"
|
||||||
"\tmoveq\t#31,d1\n"
|
"\tmoveq\t#31,d1\n"
|
||||||
"\tasr.l\td1,d0\n"
|
"\tasr.l\td1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isgreater(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int isgreater(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
|
@ -57,7 +57,7 @@ int isgreater(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isgreaterequal(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int isgreaterequal(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
|
@ -65,7 +65,7 @@ int isgreaterequal(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isless(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int isless(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
|
@ -73,7 +73,7 @@ int isless(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int islessequal(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int islessequal(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
|
@ -81,7 +81,7 @@ int islessequal(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int islessgreater(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int islessgreater(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
|
@ -89,7 +89,7 @@ int islessgreater(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int isunordered(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") int isunordered(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tmoveq\t#1,d0\n"
|
"\tmoveq\t#1,d0\n"
|
||||||
|
@ -100,7 +100,7 @@ int isunordered(__reg("fp0")double,__reg("fp1")double) =
|
||||||
|
|
||||||
#ifndef __NOINLINE__
|
#ifndef __NOINLINE__
|
||||||
/* faster inline functions */
|
/* faster inline functions */
|
||||||
__fp0ret double ceil(__reg("fp0")double) =
|
__regsused("fp0/fp1") __fp0ret double __asm_ceil(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.x\tfp0,fp1\n"
|
"\tfmove.x\tfp0,fp1\n"
|
||||||
"\tfintrz.x\tfp0\n"
|
"\tfintrz.x\tfp0\n"
|
||||||
|
@ -109,7 +109,7 @@ __fp0ret double ceil(__reg("fp0")double) =
|
||||||
"\tfadd.s\t#$3f800000,fp0\n"
|
"\tfadd.s\t#$3f800000,fp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double copysign(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("d0/fp0/fp1") __fp0ret double __asm_copysign(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\tfp1,d0\n"
|
"\tfmove.s\tfp1,d0\n"
|
||||||
"\tfabs.x\tfp0\n"
|
"\tfabs.x\tfp0\n"
|
||||||
|
@ -118,16 +118,16 @@ __fp0ret double copysign(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tfneg.x\tfp0\n"
|
"\tfneg.x\tfp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fabs(__reg("fp0")double) =
|
__regsused("fp0") __fp0ret double __asm_fabs(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfabs.x\tfp0\n"
|
"\tfabs.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fdim(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("fp0/fp1") __fp0ret double __asm_fdim(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfsub.x\tfp1,fp0\n"
|
"\tfsub.x\tfp1,fp0\n"
|
||||||
"\tfabs.x\tfp0\n"
|
"\tfabs.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double floor(__reg("fp0")double) =
|
__regsused("fp0/fp1") __fp0ret double __asm_floor(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.x\tfp0,fp1\n"
|
"\tfmove.x\tfp0,fp1\n"
|
||||||
"\tfintrz.x\tfp0\n"
|
"\tfintrz.x\tfp0\n"
|
||||||
|
@ -136,12 +136,12 @@ __fp0ret double floor(__reg("fp0")double) =
|
||||||
"\tfsub.s\t#$3f800000,fp0\n"
|
"\tfsub.s\t#$3f800000,fp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fma(__reg("fp0")double,__reg("fp1")double,__reg("fp2")double) =
|
__regsused("fp0/fp1/fp2") __fp0ret double __asm_fma(__reg("fp0")double,__reg("fp1")double,__reg("fp2")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmul.x\tfp1,fp0\n"
|
"\tfmul.x\tfp1,fp0\n"
|
||||||
"\tfadd.x\tfp2,fp0\n"
|
"\tfadd.x\tfp2,fp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fmax(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("fp0/fp1") __fp0ret double __asm_fmax(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tfboge\t.skip\n"
|
"\tfboge\t.skip\n"
|
||||||
|
@ -150,7 +150,7 @@ __fp0ret double fmax(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tfmove.x\tfp1,fp0\n"
|
"\tfmove.x\tfp1,fp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fmin(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("fp0/fp1") __fp0ret double __asm_fmin(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tfbole\t.skip\n"
|
"\tfbole\t.skip\n"
|
||||||
|
@ -159,14 +159,14 @@ __fp0ret double fmin(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tfmove.x\tfp1,fp0\n"
|
"\tfmove.x\tfp1,fp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double hypot(__reg("fp0")double,__reg("fp1")double) =
|
__regsused("fp0/fp1") __fp0ret double __asm_hypot(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmul.x\tfp0,fp0\n"
|
"\tfmul.x\tfp0,fp0\n"
|
||||||
"\tfmul.x\tfp1,fp1\n"
|
"\tfmul.x\tfp1,fp1\n"
|
||||||
"\tfadd.x\tfp1,fp0\n"
|
"\tfadd.x\tfp1,fp0\n"
|
||||||
"\tfsqrt.x\tfp0\n"
|
"\tfsqrt.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
long lround(__reg("fp0")double) =
|
__regsused("d0/fp0") long __asm_lround(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\tfp0,d0\n"
|
"\tfmove.s\tfp0,d0\n"
|
||||||
"\tand.l\t#$80000000,d0\n"
|
"\tand.l\t#$80000000,d0\n"
|
||||||
|
@ -175,15 +175,15 @@ long lround(__reg("fp0")double) =
|
||||||
"\tfintrz.x\tfp0\n"
|
"\tfintrz.x\tfp0\n"
|
||||||
"\tfmove.l\tfp0,d0\n"
|
"\tfmove.l\tfp0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double nan(__reg("a0")const char *) =
|
__regsused("fp0") __fp0ret double __asm_nan(__reg("a0")const char *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\t#$7fc00000,fp0\n"
|
"\tfmove.s\t#$7fc00000,fp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double nearbyint(__reg("fp0")double) =
|
__regsused("fp0") __fp0ret double __asm_nearbyint(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfint.x\tfp0\n"
|
"\tfint.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double round(__reg("fp0")double) =
|
__regsused("d0/fp0") __fp0ret double __asm_round(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\tfp0,d0\n"
|
"\tfmove.s\tfp0,d0\n"
|
||||||
"\tand.l\t#$80000000,d0\n"
|
"\tand.l\t#$80000000,d0\n"
|
||||||
|
@ -191,29 +191,46 @@ __fp0ret double round(__reg("fp0")double) =
|
||||||
"\tfadd.s\td0,fp0\n"
|
"\tfadd.s\td0,fp0\n"
|
||||||
"\tfintrz.x\tfp0\n"
|
"\tfintrz.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double sqrt(__reg("fp0")double) =
|
__regsused("fp0") __fp0ret double __asm_sqrt(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfsqrt.x\tfp0\n"
|
"\tfsqrt.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double trunc(__reg("fp0")double) =
|
__regsused("fp0") __fp0ret double __asm_trunc(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfintrz.x\tfp0\n"
|
"\tfintrz.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
|
|
||||||
|
/* double precision */
|
||||||
|
#define ceil(x) __asm_ceil(x)
|
||||||
|
#define copysign(x,y) __asm_copysign(x,y)
|
||||||
|
#define fabs(x) __asm_fabs(x)
|
||||||
|
#define fdim(x,y) __asm_fdim(x,y)
|
||||||
|
#define floor(x) __asm_floor(x)
|
||||||
|
#define fma(x,y) __asm_fma(x,y)
|
||||||
|
#define fmax(x,y) __asm_fmax(x,y)
|
||||||
|
#define fmin(x,y) __asm_fmin(x,y)
|
||||||
|
#define hypot(x,y) __asm_hypot(x,y)
|
||||||
|
#define lround(x) __asm_lround(x)
|
||||||
|
#define nan(x) __asm_nan(x)
|
||||||
|
#define nearbyint(x) __asm_nearbyint(x)
|
||||||
|
#define round(x) __asm_round(x)
|
||||||
|
#define sqrt(x) __asm_sqrt(x)
|
||||||
|
#define trunc(x) __asm_trunc(x)
|
||||||
|
|
||||||
/* single precision */
|
/* single precision */
|
||||||
#define ceilf(x) ceil(x)
|
#define ceilf(x) __asm_ceil(x)
|
||||||
#define copysignf(x,y) copysign(x,y)
|
#define copysignf(x,y) __asm_copysign(x,y)
|
||||||
#define fabsf(x) fabs(x)
|
#define fabsf(x) __asm_fabs(x)
|
||||||
#define fdimf(x,y) fdim(x,y)
|
#define fdimf(x,y) __asm_fdim(x,y)
|
||||||
#define floorf(x) floor(x)
|
#define floorf(x) __asm_floor(x)
|
||||||
#define fmaf(x,y) fma(x,y)
|
#define fmaf(x,y) __asm_fma(x,y)
|
||||||
#define fmaxf(x,y) fmax(x,y)
|
#define fmaxf(x,y) __asm_fmax(x,y)
|
||||||
#define fminf(x,y) fmin(x,y)
|
#define fminf(x,y) __asm_fmin(x,y)
|
||||||
#define hypotf(x,y) hypot(x,y)
|
#define hypotf(x,y) __asm_hypot(x,y)
|
||||||
#define lroundf(x) lround(x)
|
#define lroundf(x) __asm_lround(x)
|
||||||
#define nanf(x) nan(x)
|
#define nanf(x) __asm_nan(x)
|
||||||
#define nearbyintf(x) nearbyint(x)
|
#define nearbyintf(x) __asm_nearbyint(x)
|
||||||
#define roundf(x) round(x)
|
#define roundf(x) __asm_round(x)
|
||||||
#define sqrtf(x) sqrt(x)
|
#define sqrtf(x) __asm_sqrt(x)
|
||||||
#define truncf(x) trunc(x)
|
#define truncf(x) __asm_trunc(x)
|
||||||
#endif /* __NOINLINE__ */
|
#endif /* __NOINLINE__ */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $VER: math_881.h 1.0 (06.04.2017)
|
/* $VER: math_881.h 1.1 (25.09.2021)
|
||||||
** math.h 6888x specific support, link with -lm881
|
** math.h 6888x specific support, link with -lm881
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -100,23 +100,23 @@ int isunordered(__reg("fp0")double,__reg("fp1")double) =
|
||||||
|
|
||||||
#ifndef __NOINLINE__
|
#ifndef __NOINLINE__
|
||||||
/* faster inline functions */
|
/* faster inline functions */
|
||||||
__fp0ret double acos(__reg("fp0")double) =
|
__fp0ret double __asm_acos(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfacos.x\tfp0\n"
|
"\tfacos.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double asin(__reg("fp0")double) =
|
__fp0ret double __asm_asin(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfasin.x\tfp0\n"
|
"\tfasin.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double atan(__reg("fp0")double) =
|
__fp0ret double __asm_atan(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfatan.x\tfp0\n"
|
"\tfatan.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double atanh(__reg("fp0")double) =
|
__fp0ret double __asm_atanh(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfatanh.x\tfp0\n"
|
"\tfatanh.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double ceil(__reg("fp0")double) =
|
__fp0ret double __asm_ceil(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.x\tfp0,fp1\n"
|
"\tfmove.x\tfp0,fp1\n"
|
||||||
"\tfintrz.x\tfp0\n"
|
"\tfintrz.x\tfp0\n"
|
||||||
|
@ -125,7 +125,7 @@ __fp0ret double ceil(__reg("fp0")double) =
|
||||||
"\tfadd.s\t#$3f800000,fp0\n"
|
"\tfadd.s\t#$3f800000,fp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double copysign(__reg("fp0")double,__reg("fp1")double) =
|
__fp0ret double __asm_copysign(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\tfp1,d0\n"
|
"\tfmove.s\tfp1,d0\n"
|
||||||
"\tfabs.x\tfp0\n"
|
"\tfabs.x\tfp0\n"
|
||||||
|
@ -134,40 +134,40 @@ __fp0ret double copysign(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tfneg.x\tfp0\n"
|
"\tfneg.x\tfp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double cos(__reg("fp0")double) =
|
__fp0ret double __asm_cos(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcos.x\tfp0\n"
|
"\tfcos.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double cosh(__reg("fp0")double) =
|
__fp0ret double __asm_cosh(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcosh.x\tfp0\n"
|
"\tfcosh.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double exp(__reg("fp0")double) =
|
__fp0ret double __asm_exp(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfetox.x\tfp0\n"
|
"\tfetox.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double exp2(__reg("fp0")double) =
|
__fp0ret double __asm_exp2(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftwotox.x\tfp0\n"
|
"\tftwotox.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double exp10(__reg("fp0")double) =
|
__fp0ret double __asm_exp10(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftentox.x\tfp0\n"
|
"\tftentox.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double expm1(__reg("fp0")double) =
|
__fp0ret double __asm_expm1(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfetoxm1.x\tfp0\n"
|
"\tfetoxm1.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fabs(__reg("fp0")double) =
|
__fp0ret double __asm_fabs(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfabs.x\tfp0\n"
|
"\tfabs.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fdim(__reg("fp0")double,__reg("fp1")double) =
|
__fp0ret double __asm_fdim(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfsub.x\tfp1,fp0\n"
|
"\tfsub.x\tfp1,fp0\n"
|
||||||
"\tfabs.x\tfp0\n"
|
"\tfabs.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double floor(__reg("fp0")double) =
|
__fp0ret double __asm_floor(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.x\tfp0,fp1\n"
|
"\tfmove.x\tfp0,fp1\n"
|
||||||
"\tfintrz.x\tfp0\n"
|
"\tfintrz.x\tfp0\n"
|
||||||
|
@ -176,12 +176,12 @@ __fp0ret double floor(__reg("fp0")double) =
|
||||||
"\tfsub.s\t#$3f800000,fp0\n"
|
"\tfsub.s\t#$3f800000,fp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fma(__reg("fp0")double,__reg("fp1")double,__reg("fp2")double) =
|
__fp0ret double __asm_fma(__reg("fp0")double,__reg("fp1")double,__reg("fp2")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmul.x\tfp1,fp0\n"
|
"\tfmul.x\tfp1,fp0\n"
|
||||||
"\tfadd.x\tfp2,fp0\n"
|
"\tfadd.x\tfp2,fp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fmax(__reg("fp0")double,__reg("fp1")double) =
|
__fp0ret double __asm_fmax(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tfboge\t.skip\n"
|
"\tfboge\t.skip\n"
|
||||||
|
@ -190,7 +190,7 @@ __fp0ret double fmax(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tfmove.x\tfp1,fp0\n"
|
"\tfmove.x\tfp1,fp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fmin(__reg("fp0")double,__reg("fp1")double) =
|
__fp0ret double __asm_fmin(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfcmp.x\tfp1,fp0\n"
|
"\tfcmp.x\tfp1,fp0\n"
|
||||||
"\tfbole\t.skip\n"
|
"\tfbole\t.skip\n"
|
||||||
|
@ -199,42 +199,42 @@ __fp0ret double fmin(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tfmove.x\tfp1,fp0\n"
|
"\tfmove.x\tfp1,fp0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double fmod(__reg("fp0")double,__reg("fp1")double) =
|
__fp0ret double __asm_fmod(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmod.x\tfp1,fp0\n"
|
"\tfmod.x\tfp1,fp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double hypot(__reg("fp0")double,__reg("fp1")double) =
|
__fp0ret double __asm_hypot(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmul.x\tfp0,fp0\n"
|
"\tfmul.x\tfp0,fp0\n"
|
||||||
"\tfmul.x\tfp1,fp1\n"
|
"\tfmul.x\tfp1,fp1\n"
|
||||||
"\tfadd.x\tfp1,fp0\n"
|
"\tfadd.x\tfp1,fp0\n"
|
||||||
"\tfsqrt.x\tfp0\n"
|
"\tfsqrt.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double ldexp(__reg("fp0")double,__reg("d0")int) =
|
__fp0ret double __asm_ldexp(__reg("fp0")double,__reg("d0")int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfscale.l\td0,fp0\n"
|
"\tfscale.l\td0,fp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double log(__reg("fp0")double) =
|
__fp0ret double __asm_log(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tflogn.x\tfp0\n"
|
"\tflogn.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double log10(__reg("fp0")double) =
|
__fp0ret double __asm_log10(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tflog10.x\tfp0\n"
|
"\tflog10.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double log2(__reg("fp0")double) =
|
__fp0ret double __asm_log2(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tflog2.x\tfp0\n"
|
"\tflog2.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double logb(__reg("fp0")double) =
|
__fp0ret double __asm_logb(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfgetexp.x\tfp0\n"
|
"\tfgetexp.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double lognp1(__reg("fp0")double) =
|
__fp0ret double __asm_lognp1(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tflognp1.x\tfp0\n"
|
"\tflognp1.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
long lround(__reg("fp0")double) =
|
long __asm_lround(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\tfp0,d0\n"
|
"\tfmove.s\tfp0,d0\n"
|
||||||
"\tand.l\t#$80000000,d0\n"
|
"\tand.l\t#$80000000,d0\n"
|
||||||
|
@ -243,19 +243,19 @@ long lround(__reg("fp0")double) =
|
||||||
"\tfintrz.x\tfp0\n"
|
"\tfintrz.x\tfp0\n"
|
||||||
"\tfmove.l\tfp0,d0\n"
|
"\tfmove.l\tfp0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double nan(__reg("a0")const char *) =
|
__fp0ret double __asm_nan(__reg("a0")const char *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\t#$7fc00000,fp0\n"
|
"\tfmove.s\t#$7fc00000,fp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double nearbyint(__reg("fp0")double) =
|
__fp0ret double __asm_nearbyint(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfint.x\tfp0\n"
|
"\tfint.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double remainder(__reg("fp0")double,__reg("fp1")double) =
|
__fp0ret double __asm_remainder(__reg("fp0")double,__reg("fp1")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfrem.x\tfp1,fp0\n"
|
"\tfrem.x\tfp1,fp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double round(__reg("fp0")double) =
|
__fp0ret double __asm_round(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfmove.s\tfp0,d0\n"
|
"\tfmove.s\tfp0,d0\n"
|
||||||
"\tand.l\t#$80000000,d0\n"
|
"\tand.l\t#$80000000,d0\n"
|
||||||
|
@ -263,67 +263,106 @@ __fp0ret double round(__reg("fp0")double) =
|
||||||
"\tfadd.s\td0,fp0\n"
|
"\tfadd.s\td0,fp0\n"
|
||||||
"\tfintrz.x\tfp0\n"
|
"\tfintrz.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double sin(__reg("fp0")double) =
|
__fp0ret double __asm_sin(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfsin.x\tfp0\n"
|
"\tfsin.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double sinh(__reg("fp0")double) =
|
__fp0ret double __asm_sinh(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfsinh.x\tfp0\n"
|
"\tfsinh.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double sqrt(__reg("fp0")double) =
|
__fp0ret double __asm_sqrt(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfsqrt.x\tfp0\n"
|
"\tfsqrt.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double tan(__reg("fp0")double) =
|
__fp0ret double __asm_tan(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftan.x\tfp0\n"
|
"\tftan.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double tanh(__reg("fp0")double) =
|
__fp0ret double __asm_tanh(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tftanh.x\tfp0\n"
|
"\tftanh.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
__fp0ret double trunc(__reg("fp0")double) =
|
__fp0ret double __asm_trunc(__reg("fp0")double) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tfintrz.x\tfp0\n"
|
"\tfintrz.x\tfp0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
|
|
||||||
|
/* double precision */
|
||||||
|
#define acos(x) __asm_acos(x)
|
||||||
|
#define asin(x) __asm_asin(x)
|
||||||
|
#define atan(x) __asm_atan(x)
|
||||||
|
#define atanh(x) __asm_atanh(x)
|
||||||
|
#define ceil(x) __asm_ceil(x)
|
||||||
|
#define copysign(x,y) __asm_copysign(x,y)
|
||||||
|
#define cos(x) __asm_cos(x)
|
||||||
|
#define cosh(x) __asm_cosh(x)
|
||||||
|
#define exp(x) __asm_exp(x)
|
||||||
|
#define exp2(x) __asm_exp2(x)
|
||||||
|
#define exp10(x) __asm_exp10(x)
|
||||||
|
#define expm1(x) __asm_expm1(x)
|
||||||
|
#define fabs(x) __asm_fabs(x)
|
||||||
|
#define fdim(x,y) __asm_fdim(x,y)
|
||||||
|
#define floor(x) __asm_floor(x)
|
||||||
|
#define fma(x,y) __asm_fma(x,y)
|
||||||
|
#define fmax(x,y) __asm_fmax(x,y)
|
||||||
|
#define fmin(x,y) __asm_fmin(x,y)
|
||||||
|
#define fmod(x,y) __asm_fmod(x,y)
|
||||||
|
#define hypot(x,y) __asm_hypot(x,y)
|
||||||
|
#define ldexp(x,exp) __asm_ldexp(x,exp)
|
||||||
|
#define log(x) __asm_log(x)
|
||||||
|
#define log10(x) __asm_log10(x)
|
||||||
|
#define log2(x) __asm_log2(x)
|
||||||
|
#define logb(x) __asm_logb(x)
|
||||||
|
#define lognp1(x) __asm_lognp1(x)
|
||||||
|
#define lround(x) __asm_lround(x)
|
||||||
|
#define nan(x) __asm_nan(x)
|
||||||
|
#define nearbyint(x) __asm_nearbyint(x)
|
||||||
|
#define remainder(x,y) __asm_remainder(x,y)
|
||||||
|
#define round(x) __asm_round(x)
|
||||||
|
#define sin(x) __asm_sin(x)
|
||||||
|
#define sinh(x) __asm_sinh(x)
|
||||||
|
#define sqrt(x) __asm_sqrt(x)
|
||||||
|
#define tan(x) __asm_tan(x)
|
||||||
|
#define tanh(x) __asm_tanh(x)
|
||||||
|
#define trunc(x) __asm_trunc(x)
|
||||||
|
|
||||||
/* single precision */
|
/* single precision */
|
||||||
#define acosf(x) acos(x)
|
#define acosf(x) __asm_acos(x)
|
||||||
#define asinf(x) asin(x)
|
#define asinf(x) __asm_asin(x)
|
||||||
#define atanf(x) atan(x)
|
#define atanf(x) __asm_atan(x)
|
||||||
#define atanhf(x) atanh(x)
|
#define atanhf(x) __asm_atanh(x)
|
||||||
#define ceilf(x) ceil(x)
|
#define ceilf(x) __asm_ceil(x)
|
||||||
#define copysignf(x,y) copysign(x,y)
|
#define copysignf(x,y) __asm_copysign(x,y)
|
||||||
#define cosf(x) cos(x)
|
#define cosf(x) __asm_cos(x)
|
||||||
#define coshf(x) cosh(x)
|
#define coshf(x) __asm_cosh(x)
|
||||||
#define expf(x) exp(x)
|
#define expf(x) __asm_exp(x)
|
||||||
#define exp2f(x) exp2(x)
|
#define exp2f(x) __asm_exp2(x)
|
||||||
#define exp10f(x) exp10(x)
|
#define exp10f(x) __asm_exp10(x)
|
||||||
#define expm1f(x) expm1(x)
|
#define expm1f(x) __asm_expm1(x)
|
||||||
#define fabsf(x) fabs(x)
|
#define fabsf(x) __asm_fabs(x)
|
||||||
#define fdimf(x,y) fdim(x,y)
|
#define fdimf(x,y) __asm_fdim(x,y)
|
||||||
#define floorf(x) floor(x)
|
#define floorf(x) __asm_floor(x)
|
||||||
#define fmaf(x,y) fma(x,y)
|
#define fmaf(x,y) __asm_fma(x,y)
|
||||||
#define fmaxf(x,y) fmax(x,y)
|
#define fmaxf(x,y) __asm_fmax(x,y)
|
||||||
#define fminf(x,y) fmin(x,y)
|
#define fminf(x,y) __asm_fmin(x,y)
|
||||||
#define fmodf(x,y) fmod(x,y)
|
#define fmodf(x,y) __asm_fmod(x,y)
|
||||||
#define hypotf(x,y) hypot(x,y)
|
#define hypotf(x,y) __asm_hypot(x,y)
|
||||||
#define ldexpf(x,exp) ldexp(x,exp)
|
#define ldexpf(x,exp) __asm_ldexp(x,exp)
|
||||||
#define logf(x) log(x)
|
#define logf(x) __asm_log(x)
|
||||||
#define log10f(x) log10(x)
|
#define log10f(x) __asm_log10(x)
|
||||||
#define log2f(x) log2(x)
|
#define log2f(x) __asm_log2(x)
|
||||||
#define logbf(x) logb(x)
|
#define logbf(x) __asm_logb(x)
|
||||||
#define lognp1f(x) lognp1(x)
|
#define lognp1f(x) __asm_lognp1(x)
|
||||||
#define lroundf(x) lround(x)
|
#define lroundf(x) __asm_lround(x)
|
||||||
#define nanf(x) nan(x)
|
#define nanf(x) __asm_nan(x)
|
||||||
#define nearbyintf(x) nearbyint(x)
|
#define nearbyintf(x) __asm_nearbyint(x)
|
||||||
#define remainderf(x,y) remainder(x,y)
|
#define remainderf(x,y) __asm_remainder(x,y)
|
||||||
#define roundf(x) round(x)
|
#define roundf(x) __asm_round(x)
|
||||||
#define sinf(x) sin(x)
|
#define sinf(x) __asm_sin(x)
|
||||||
#define sinhf(x) sinh(x)
|
#define sinhf(x) __asm_sinh(x)
|
||||||
#define sqrtf(x) sqrt(x)
|
#define sqrtf(x) __asm_sqrt(x)
|
||||||
#define tanf(x) tan(x)
|
#define tanf(x) __asm_tan(x)
|
||||||
#define tanhf(x) tanh(x)
|
#define tanhf(x) __asm_tanh(x)
|
||||||
#define truncf(x) trunc(x)
|
#define truncf(x) __asm_trunc(x)
|
||||||
#endif /* __NOINLINE__ */
|
#endif /* __NOINLINE__ */
|
||||||
|
|
|
@ -125,9 +125,11 @@ int snprintf(char *,size_t,const char *,...);
|
||||||
Simple versions of IO functions (see vbcc documentation).
|
Simple versions of IO functions (see vbcc documentation).
|
||||||
If versions with __v1 or __v2 are declared they are also used.
|
If versions with __v1 or __v2 are declared they are also used.
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
int __v0fprintf(FILE *, const char *);
|
int __v0fprintf(FILE *, const char *);
|
||||||
int __v0printf(const char *);
|
int __v0printf(const char *);
|
||||||
int __v0sprintf(char *, const char *);
|
int __v0sprintf(char *, const char *);
|
||||||
|
*/
|
||||||
int vprintf(const char *,va_list);
|
int vprintf(const char *,va_list);
|
||||||
int vfprintf(FILE *,const char *,va_list);
|
int vfprintf(FILE *,const char *,va_list);
|
||||||
int vsprintf(char *,const char *,va_list);
|
int vsprintf(char *,const char *,va_list);
|
||||||
|
|
|
@ -40,6 +40,7 @@ long atol(const char *);
|
||||||
long long atoll(const char *);
|
long long atoll(const char *);
|
||||||
#endif
|
#endif
|
||||||
double strtod(const char *,char **);
|
double strtod(const char *,char **);
|
||||||
|
float strtof(const char *,char **);
|
||||||
long strtol(const char *,char **,int);
|
long strtol(const char *,char **,int);
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#if __STDC_VERSION__ >= 199901L
|
||||||
signed long long strtoll(const char *,char **,int);
|
signed long long strtoll(const char *,char **,int);
|
||||||
|
@ -81,23 +82,24 @@ long long llabs(long long);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __NOINLINE__
|
#ifndef __NOINLINE__
|
||||||
int abs(__reg("d0") int) =
|
__regsused("d0") int __asm_abs(__reg("d0") int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\ttst.l\td0\n"
|
"\ttst.l\td0\n"
|
||||||
"\tbpl\t.skip\n"
|
"\tbpl\t.skip\n"
|
||||||
"\tneg.l\td0\n"
|
"\tneg.l\td0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
long labs(__reg("d0") long) =
|
__regsused("d0") long __asm_labs(__reg("d0") long) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\ttst.l\td0\n"
|
"\ttst.l\td0\n"
|
||||||
"\tbpl\t.skip\n"
|
"\tbpl\t.skip\n"
|
||||||
"\tneg.l\td0\n"
|
"\tneg.l\td0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
|
#define abs(x) __asm_abs(x)
|
||||||
|
#define labs(x) __asm_labs(x)
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#if __STDC_VERSION__ >= 199901L
|
||||||
long long llabs(__reg("d0/d1") long long) =
|
__regsused("d0/d1") long long __asm_llabs(__reg("d0/d1") long long) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\ttst.l\td0\n"
|
"\ttst.l\td0\n"
|
||||||
"\tbpl\t.skip\n"
|
"\tbpl\t.skip\n"
|
||||||
|
@ -105,18 +107,21 @@ long long llabs(__reg("d0/d1") long long) =
|
||||||
"\tnegx.l\td0\n"
|
"\tnegx.l\td0\n"
|
||||||
".skip\n"
|
".skip\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
|
#define llabs(x) __asm_llabs(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__M68000) && !defined(__M68010)
|
#if !defined(__M68000) && !defined(__M68010)
|
||||||
div_t div(__reg("d0") int,__reg("d1") int) =
|
__regsused("d0/d1") div_t __asm_div(__reg("d0") int,__reg("d1") int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tdivsl.l\td1,d1:d0\n"
|
"\tdivsl.l\td1,d1:d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
ldiv_t ldiv(__reg("d0") long,__reg("d1") long) =
|
__regsused("d0/d1") ldiv_t __asm_ldiv(__reg("d0") long,__reg("d1") long) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tdivsl.l\td1,d1:d0\n"
|
"\tdivsl.l\td1,d1:d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
#endif
|
#endif
|
||||||
|
#define div(n,d) __asm_div(n,d)
|
||||||
|
#define ldiv(n,d) __asm_ldiv(n,d)
|
||||||
#endif /* __NOINLINE__ */
|
#endif /* __NOINLINE__ */
|
||||||
|
|
||||||
#define atof(s) strtod((s),(char **)NULL)
|
#define atof(s) strtod((s),(char **)NULL)
|
||||||
|
|
|
@ -34,7 +34,7 @@ size_t strxfrm(char *,const char *,size_t);
|
||||||
|
|
||||||
#ifndef __NOINLINE__
|
#ifndef __NOINLINE__
|
||||||
#if defined(__M68000) || defined(__M68010)
|
#if defined(__M68000) || defined(__M68010)
|
||||||
void *memcpy(__reg("a0") void *, __reg("a1") const void *,
|
void *__asm_memcpy(__reg("a0") void *, __reg("a1") const void *,
|
||||||
__reg("d2") size_t) =
|
__reg("d2") size_t) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmove.l\ta0,d0\n"
|
"\tmove.l\ta0,d0\n"
|
||||||
|
@ -73,7 +73,7 @@ void *memcpy(__reg("a0") void *, __reg("a1") const void *,
|
||||||
"\tdbf\td2,.l6\n"
|
"\tdbf\td2,.l6\n"
|
||||||
".l7\n"
|
".l7\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
void *__memcpy_desc(__reg("a0") void *, __reg("a1") const void *,
|
void *__asm_memcpy_desc(__reg("a0") void *, __reg("a1") const void *,
|
||||||
__reg("d2") size_t) =
|
__reg("d2") size_t) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tcmp.l\t#16,d2\n"
|
"\tcmp.l\t#16,d2\n"
|
||||||
|
@ -113,7 +113,7 @@ void *__memcpy_desc(__reg("a0") void *, __reg("a1") const void *,
|
||||||
".l7\n"
|
".l7\n"
|
||||||
"\tmove.l\ta0,d0\n"
|
"\tmove.l\ta0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
void *memset(__reg("a0") void *, __reg("d0") int, __reg("d2") size_t) =
|
void *__asm_memset(__reg("a0") void *, __reg("d0") int, __reg("d2") size_t) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmove.l\ta0,a1\n"
|
"\tmove.l\ta0,a1\n"
|
||||||
"\tcmp.l\t#16,d2\n"
|
"\tcmp.l\t#16,d2\n"
|
||||||
|
@ -149,7 +149,8 @@ void *memset(__reg("a0") void *, __reg("d0") int, __reg("d2") size_t) =
|
||||||
"\teinline";
|
"\teinline";
|
||||||
|
|
||||||
#else /* 68020+ */
|
#else /* 68020+ */
|
||||||
void *memcpy(__reg("a0") void *, __reg("a1") const void *, __reg("d2") size_t) =
|
void *__asm_memcpy(__reg("a0") void *, __reg("a1") const void *,
|
||||||
|
__reg("d2") size_t) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmove.l\ta0,d0\n"
|
"\tmove.l\ta0,d0\n"
|
||||||
"\tsubq.l\t#4,d2\n"
|
"\tsubq.l\t#4,d2\n"
|
||||||
|
@ -179,7 +180,7 @@ void *memcpy(__reg("a0") void *, __reg("a1") const void *, __reg("d2") size_t) =
|
||||||
"\tdbf\td2,.l4\n"
|
"\tdbf\td2,.l4\n"
|
||||||
".l5\n"
|
".l5\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
void *__memcpy_desc(__reg("a0") void *, __reg("a1") const void *,
|
void *__asm_memcpy_desc(__reg("a0") void *, __reg("a1") const void *,
|
||||||
__reg("d2") size_t) =
|
__reg("d2") size_t) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tsubq.l\t#4,d2\n"
|
"\tsubq.l\t#4,d2\n"
|
||||||
|
@ -209,7 +210,7 @@ void *__memcpy_desc(__reg("a0") void *, __reg("a1") const void *,
|
||||||
".l5\n"
|
".l5\n"
|
||||||
"\tmove.l\ta0,d0\n"
|
"\tmove.l\ta0,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
void *memset(__reg("a0") void *, __reg("d0") int, __reg("d2") size_t) =
|
void *__asm_memset(__reg("a0") void *, __reg("d0") int, __reg("d2") size_t) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmove.l\ta0,a1\n"
|
"\tmove.l\ta0,a1\n"
|
||||||
"\tsubq.l\t#8,d2\n"
|
"\tsubq.l\t#8,d2\n"
|
||||||
|
@ -251,7 +252,7 @@ void *memset(__reg("a0") void *, __reg("d0") int, __reg("d2") size_t) =
|
||||||
|
|
||||||
#endif /* 68020+ */
|
#endif /* 68020+ */
|
||||||
|
|
||||||
size_t strlen(__reg("a0") const char *) =
|
__regsused("d0/a0") size_t __asm_strlen(__reg("a0") const char *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmove.l\ta0,d0\n"
|
"\tmove.l\ta0,d0\n"
|
||||||
".l1\n"
|
".l1\n"
|
||||||
|
@ -260,14 +261,14 @@ size_t strlen(__reg("a0") const char *) =
|
||||||
"\tsub.l\ta0,d0\n"
|
"\tsub.l\ta0,d0\n"
|
||||||
"\tnot.l\td0\n"
|
"\tnot.l\td0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
char *strcpy(__reg("a0") char *, __reg("a1") const char *) =
|
__regsused("d0/a0/a1") char *__asm_strcpy(__reg("a0") char *, __reg("a1") const char *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmove.l\ta0,d0\n"
|
"\tmove.l\ta0,d0\n"
|
||||||
".l1\n"
|
".l1\n"
|
||||||
"\tmove.b\t(a1)+,(a0)+\n"
|
"\tmove.b\t(a1)+,(a0)+\n"
|
||||||
"\tbne\t.l1\n"
|
"\tbne\t.l1\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
char *strncpy(__reg("a0") char *, __reg("a1") const char *,
|
char *__asm_strncpy(__reg("a0") char *, __reg("a1") const char *,
|
||||||
__reg("d1") size_t) =
|
__reg("d1") size_t) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmove.l\ta0,d0\n"
|
"\tmove.l\ta0,d0\n"
|
||||||
|
@ -280,7 +281,7 @@ char *strncpy(__reg("a0") char *, __reg("a1") const char *,
|
||||||
"\tsubq.l\t#1,d1\n"
|
"\tsubq.l\t#1,d1\n"
|
||||||
"\tbpl\t.l1\n"
|
"\tbpl\t.l1\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int strcmp(__reg("a0") const char *, __reg("a1") const char *) =
|
int __asm_strcmp(__reg("a0") const char *, __reg("a1") const char *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
"\tmoveq\t#0,d1\n"
|
"\tmoveq\t#0,d1\n"
|
||||||
|
@ -294,7 +295,7 @@ int strcmp(__reg("a0") const char *, __reg("a1") const char *) =
|
||||||
".l2\n"
|
".l2\n"
|
||||||
"\tsub.l\td1,d0\n"
|
"\tsub.l\td1,d0\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
int strncmp(__reg("a0") const char *, __reg("a1") const char *,
|
int __asm_strncmp(__reg("a0") const char *, __reg("a1") const char *,
|
||||||
__reg("d2") size_t) =
|
__reg("d2") size_t) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
|
@ -312,7 +313,7 @@ int strncmp(__reg("a0") const char *, __reg("a1") const char *,
|
||||||
"\tsub.l\td1,d0\n"
|
"\tsub.l\td1,d0\n"
|
||||||
".l3\n"
|
".l3\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
char *strcat(__reg("a0") char *, __reg("a1") const char *) =
|
__regsused("d0/a0/a1") char *__asm_strcat(__reg("a0") char *, __reg("a1") const char *) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmove.l\ta0,d0\n"
|
"\tmove.l\ta0,d0\n"
|
||||||
".l1\n"
|
".l1\n"
|
||||||
|
@ -323,12 +324,12 @@ char *strcat(__reg("a0") char *, __reg("a1") const char *) =
|
||||||
"\tmove.b\t(a1)+,(a0)+\n"
|
"\tmove.b\t(a1)+,(a0)+\n"
|
||||||
"\tbne\t.l2\n"
|
"\tbne\t.l2\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
char *strncat(__reg("a0") char *, __reg("a1") const char *,
|
char *__asm_strncat(__reg("a0") char *, __reg("a1") const char *,
|
||||||
__reg("d1") size_t) =
|
__reg("d1") size_t) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmove.l\ta0,d0\n"
|
"\tmove.l\ta0,d0\n"
|
||||||
"\ttst.l\td1\n"
|
"\ttst.l\td1\n"
|
||||||
"\tbeq\t.l3\n"
|
"\tbeq\t.l4\n"
|
||||||
".l1\n"
|
".l1\n"
|
||||||
"\ttst.b\t(a0)+\n"
|
"\ttst.b\t(a0)+\n"
|
||||||
"\tbne\t.l1\n"
|
"\tbne\t.l1\n"
|
||||||
|
@ -339,8 +340,10 @@ char *strncat(__reg("a0") char *, __reg("a1") const char *,
|
||||||
"\tsubq.l\t#1,d1\n"
|
"\tsubq.l\t#1,d1\n"
|
||||||
"\tbne\t.l2\n"
|
"\tbne\t.l2\n"
|
||||||
".l3\n"
|
".l3\n"
|
||||||
|
"\tclr.b\t(a0)\n"
|
||||||
|
".l4\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
char *strrchr(__reg("a0") const char *, __reg("d1") int) =
|
__regsused("d0/d1/a0") char *__asm_strrchr(__reg("a0") const char *, __reg("d1") int) =
|
||||||
"\tinline\n"
|
"\tinline\n"
|
||||||
"\tmoveq\t#0,d0\n"
|
"\tmoveq\t#0,d0\n"
|
||||||
".l1\n"
|
".l1\n"
|
||||||
|
@ -352,8 +355,20 @@ char *strrchr(__reg("a0") const char *, __reg("d1") int) =
|
||||||
"\tbne\t.l1\n"
|
"\tbne\t.l1\n"
|
||||||
"\teinline";
|
"\teinline";
|
||||||
|
|
||||||
#define memmove(d,s,n) ((d)<=(s) ? memcpy(d,s,n) : \
|
#ifdef __OPTSPEED__
|
||||||
__memcpy_desc((char *)(d)+(n),(char *)(s)+(n),n))
|
#define memmove(d,s,n) ((d)<=(s) ? __asm_memcpy(d,s,n) : \
|
||||||
|
__asm_memcpy_desc((char *)(d)+(n),(char *)(s)+(n),n))
|
||||||
|
#endif
|
||||||
|
#define memcpy(d,s,n) __asm_memcpy(d,s,n)
|
||||||
|
#define memset(p,f,n) __asm_memset(p,f,n)
|
||||||
|
#define strlen(p) __asm_strlen(p)
|
||||||
|
#define strcpy(d,s) __asm_strcpy(d,s)
|
||||||
|
#define strncpy(d,s,n) __asm_strncpy(d,s,n)
|
||||||
|
#define strcmp(s1,s2) __asm_strcmp(s1,s2)
|
||||||
|
#define strncmp(s1,s2,n) __asm_strncmp(s1,s2,n)
|
||||||
|
#define strcat(d,s) __asm_strcat(d,s)
|
||||||
|
#define strncat(d,s,n) __asm_strncat(d,s,n)
|
||||||
|
#define strrchr(s,n) __asm_strrchr(s,n)
|
||||||
#endif /* __NOINLINE__ */
|
#endif /* __NOINLINE__ */
|
||||||
|
|
||||||
#endif /* __STRING_H */
|
#endif /* __STRING_H */
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue