Commit ee441454 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Start adding counterparts to ARM ASM codepaths

parent 427472f8
......@@ -52,7 +52,8 @@ else ifeq ($(platform), ctr)
CC = $(DEVKITARM)/bin/arm-none-eabi-gcc$(EXE_EXT)
CXX = $(DEVKITARM)/bin/arm-none-eabi-g++$(EXE_EXT)
AR = $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT)
CFLAGS += -DARM11 -D_3DS
ARM_ASM = 1
CFLAGS += -DARM11 -D_3DS
CFLAGS += -march=armv6k -mtune=mpcore -mfloat-abi=hard
CFLAGS += -Wall -mword-relocations
CFLAGS += -fomit-frame-pointer -ffast-math
......@@ -68,6 +69,10 @@ else
CFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__
endif
ifeq ($(ARM_ASM), 1)
CFLAGS += -DARM_ASM
endif
CORE_DIR := ./src
LIBRETRO_DIR := ./libretro
......
......@@ -31,9 +31,7 @@ SOURCES += $(CORE_DIR)/sdd1emu.cpp
SOURCES += $(CORE_DIR)/snapshot.cpp
SOURCES += $(CORE_DIR)/soundux.cpp
SOURCES += $(CORE_DIR)/spc700.cpp
SOURCES += $(CORE_DIR)/spc700a.s
SOURCES += $(CORE_DIR)/srtc.cpp
SOURCES += $(CORE_DIR)/spc_decode.S
SOURCES += $(CORE_DIR)/tile16.cpp
SOURCES += $(CORE_DIR)/tile16add.cpp
SOURCES += $(CORE_DIR)/tile16add1_2.cpp
......@@ -57,6 +55,10 @@ SOURCES += $(CORE_DIR)/rops.cpp
SOURCES += $(LIBRETRO_DIR)/libretro.cpp
SOURCES += $(LIBRETRO_DIR)/memstream.c
ifeq ($(ARM_ASM), 1)
SOURCES += $(CORE_DIR)/spc700a.s \
$(CORE_DIR)/spc_decode.S
endif
SOURCES += $(CORE_DIR)/os9x_65c816_global.s
SOURCES += $(CORE_DIR)/os9x_65c816_spcasm.s
......
#ifndef _ASMMEMFUNCS_H_
#define _ASMMEMFUNCS_H_
#ifdef ARM_ASM
#define memset32(_dst, _c, _count) \
({ uint32_t *dst = (_dst); register uint32_t c asm ("r7") = (_c); int count = (_count); register uint32_t dummy0 asm ("r4"), dummy1 asm ("r5"), dummy2 asm ("r6"); \
__asm__ __volatile__ ( \
......@@ -202,5 +203,11 @@
: "r4", "r5", "r6", "r7", "cc", "memory" \
); _dst; \
})
#else
#define memset32(_dst, _c, _count) memset(_dst, _c, _count)
#define memset16(_dst, _c, _count) memset(_dst, _c, _count)
#define memcpy32(_dst, _src, _count) memcpy(_dst, _src, _count)
#define memcpy16(_dst, _src, _count) memcpy(_dst, _src, _count)
#endif
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment