summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--obj_files.mk8
-rw-r--r--src/Runtime/__mem.c36
2 files changed, 22 insertions, 22 deletions
diff --git a/obj_files.mk b/obj_files.mk
index c1ad2c8..085c6ed 100644
--- a/obj_files.mk
+++ b/obj_files.mk
@@ -7,11 +7,11 @@ O_FILES := $(BUILD_DIR)/src/main.o \
$(BUILD_DIR)/src/Runtime/global_destructor_chain.o \
$(BUILD_DIR)/src/Runtime/NMWException.o \
$(BUILD_DIR)/src/Runtime/ptmf.o \
- $(BUILD_DIR)/asm/Runtime/ExceptionPPC.o \
$(BUILD_DIR)/src/Runtime/runtime.o \
$(BUILD_DIR)/src/Runtime/__init_cpp_exceptions.o \
- $(BUILD_DIR)/src/Runtime/__mem.o \
+ $(BUILD_DIR)/asm/Runtime/ExceptionPPC.o \
$(BUILD_DIR)/src/Dolphin/os/__start.o \
+ $(BUILD_DIR)/src/Dolphin/os/__ppc_eabi_init.o \
$(BUILD_DIR)/src/Dolphin/PPCArch.o \
$(BUILD_DIR)/src/Dolphin/db.o \
$(BUILD_DIR)/src/Dolphin/os/OS.o \
@@ -35,7 +35,6 @@ O_FILES := $(BUILD_DIR)/src/main.o \
$(BUILD_DIR)/src/Dolphin/os/OSSync.o \
$(BUILD_DIR)/src/Dolphin/os/OSThread.o \
$(BUILD_DIR)/src/Dolphin/os/OSTime.o \
- $(BUILD_DIR)/src/Dolphin/os/__ppc_eabi_init.o \
$(BUILD_DIR)/src/Dolphin/mtx/mtx.o \
$(BUILD_DIR)/src/Dolphin/mtx/mtxvec.o \
$(BUILD_DIR)/src/Dolphin/mtx/mtx44.o \
@@ -150,4 +149,5 @@ O_FILES := $(BUILD_DIR)/src/main.o \
$(BUILD_DIR)/asm/OdemuExi2/DebuggerDriver.o \
$(BUILD_DIR)/asm/odenotstub/odenotstub.o \
$(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/common_float_tables.o \
- $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/exponentialsf.o
+ $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/exponentialsf.o \
+ $(BUILD_DIR)/src/Runtime/__mem.o
diff --git a/src/Runtime/__mem.c b/src/Runtime/__mem.c
index a5ef6c1..84703b7 100644
--- a/src/Runtime/__mem.c
+++ b/src/Runtime/__mem.c
@@ -1,20 +1,8 @@
#include "string.h"
-void* memcpy(void* dst, const void* src, size_t n) {
- const char* p;
- char* q;
- int rev = ((unsigned long)src < (unsigned long)dst);
-
- if (!rev) {
-
- for (p = (const char*)src - 1, q = (char*)dst - 1, n++; --n;)
- *++q = *++p;
-
- } else {
- for (p = (const char*)src + n, q = (char*)dst + n, n++; --n;)
- *--q = *--p;
- }
- return (dst);
+void* memset(void* str, int c, size_t n) {
+ __fill_mem(str, c, n);
+ return str;
}
#define cps ((unsigned char*)src)
@@ -79,7 +67,19 @@ void __fill_mem(void* dst, int val, size_t n) {
return;
}
-void* memset(void* str, int c, size_t n) {
- __fill_mem(str, c, n);
- return str;
+void* memcpy(void* dst, const void* src, size_t n) {
+ const char* p;
+ char* q;
+ int rev = ((unsigned long)src < (unsigned long)dst);
+
+ if (!rev) {
+
+ for (p = (const char*)src - 1, q = (char*)dst - 1, n++; --n;)
+ *++q = *++p;
+
+ } else {
+ for (p = (const char*)src + n, q = (char*)dst + n, n++; --n;)
+ *--q = *--p;
+ }
+ return (dst);
}