fixed : suppression des fonctions ASM (aucune amélioration de perf)

This commit is contained in:
attilavs2 2024-02-11 19:16:27 +01:00
parent cd30c37210
commit e93cec3894
3 changed files with 1 additions and 102 deletions

View File

@ -47,9 +47,6 @@ set(ASSETS
)
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
set(ASMSOURCES
src/fixed.S
)
#fxconv_declare_converters(assets-cg/map/converters.py)
#Les lignes suivantes proviennent de https://gitea.planet-casio.com/Slyvtt/Collab_RPG
@ -68,7 +65,7 @@ fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA)
set(CFLAGS -Wall -Wextra -Ofast -pipe -flto)
add_executable(RaycasterGame ${ASMSOURCES} ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
add_executable(RaycasterGame ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
target_link_libraries(RaycasterGame LibProf::LibProf)

View File

@ -1,79 +0,0 @@
#Fcalva, 10/02/2024
.global _fmul
.type _fmul, @function
.global _fdec
.type _fdec, @function
.global _fceil
.type _fceil, @function
.global _fround
.type _fround, @function
.global _feasein
.type _feasein, @function
.global _fease
.type _fease, @function
_fmul:
dmuls.l r4, r5
sts MACH, r1
sts MACL , r0
rts
xtrct r1, r0
_fdec:
mov #-1, r0
extu.w r0, r0
rts
and r4, r0
_fceil:
mov #-1, r0
extu.w r0, r0
add r4, r0
mov #-16, r1
rts
shad r1, r0
_fround:
mov.l .half_constant, r0
add r4, r0
mov #-16, r1
rts
shad r1, r0
_feasein:
mov r4, r5
dmuls.l r4, r5
sts MACH, r1
sts MACL , r0
rts
xtrct r1, r0
_fease:
mov.l .half_constant, r1
cmp/gt r1, r4
bf fease_sml
nop
mov #-1, r2
extu.w r2, r2
sub r2, r4
mov r4, r5
bra _fmul
mov #-1, r3
shad r3, r0
rts
sub r2, r0
fease_sml:
mov r4, r5
bra _fmul
mov #-1, r3
rts
sub r2, r0
.half_constant:
.long 0x8000

View File

@ -13,8 +13,6 @@ typedef int32_t fixed_t;
//GCC complained when in inline functions
#define ffloor(f) ((int)(f) >> 16)
#ifndef FXCG50
static inline fixed_t fmul(fixed_t left, fixed_t right)
{
/* Generally optimized by the compiler to use dmuls.l and xtrct */
@ -53,23 +51,6 @@ static inline fixed_t fease(fixed_t x)
}
}
#endif
#ifdef FXCG50
extern inline fixed_t fmul(fixed_t left, fixed_t right);
extern inline fixed_t fdec(fixed_t f);
extern inline int fceil(fixed_t f);
extern inline int fround(fixed_t f);
extern inline fixed_t feasein(fixed_t x);
extern inline fixed_t fease(fixed_t x);
#endif
static inline fixed_t fdiv(fixed_t left, fixed_t right)
{
/* Pretty slow */