decompile memcpy

This commit is contained in:
Alejandro Javier Asenjo Nitti 2023-10-16 13:52:40 -03:00
parent 003384482a
commit 4985931714
4 changed files with 21 additions and 3 deletions

View File

@ -192,6 +192,7 @@ build/src/libultra/2BDF0.o: OPTFLAGS := -O1 -g0
build/src/libultra/2C700.o: OPTFLAGS := -O1 -g0
build/src/libultra/2D300.o: OPTFLAGS := -O1 -g0
build/src/libultra/io/controller.o: OPTFLAGS := -O1 -g0
build/src/libultra/libc/string.o: OPTFLAGS := -O2 -g0
# cc & asm-processor
build/src/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(CC) -- $(AS) $(ASFLAGS) --

View File

@ -57,6 +57,8 @@ typedef volatile long long vs64; /* signed 64-bit */
typedef float f32; /* single prec floating point */
typedef double f64; /* double prec floating point */
typedef u32 size_t;
#endif /* _LANGUAGE_C */

View File

@ -1,6 +1,18 @@
#include "common.h"
#include "global.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/libc/string/memcpy.s")
void* memcpy(void* s1, const void* s2, size_t n) {
unsigned char* su1 = (unsigned char*)s1;
const unsigned char* su2 = (const unsigned char*)s2;
while (n > 0) {
*su1 = *su2;
su1++;
su2++;
n--;
}
return s1;
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/libc/string/strlen.s")

View File

@ -1 +1,4 @@
compiler_type = "ido"
compiler_type = "ido"
[decompme.compilers]
"tools/ido_recomp/linux/5.3/cc" = "ido5.3"