Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cyclone: use HAVE_ARMv6 flag for backward asm compatibility #1922

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DEBUG ?= 0
DEBUGGER ?= 0
SPLIT_UP_LINK ?= 0
ARM ?= 0 # set to 0 or 1 to indicate ARM or not
HAVE_ARMv6 ?= 0
CPU_ARCH ?= 0 # as of November 2018 this flag doesn't seem to be used but is being set to either arm or arm64 for some platforms

LIBS ?=
Expand Down Expand Up @@ -180,6 +181,7 @@ else ifeq ($(platform), rpi0)
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions
CPU_ARCH := arm
ARM = 1
HAVE_ARMv6 = 1

# Raspberry Pi 1
else ifeq ($(platform), rpi1)
Expand All @@ -192,6 +194,7 @@ else ifeq ($(platform), rpi1)
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions
CPU_ARCH := arm
ARM = 1
HAVE_ARMv6 = 1

# Raspberry Pi 2
else ifeq ($(platform), rpi2)
Expand All @@ -204,6 +207,7 @@ else ifeq ($(platform), rpi2)
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions
CPU_ARCH := arm
ARM = 1
HAVE_ARMv6 = 1

# Raspberry Pi 3
else ifeq ($(platform), rpi3)
Expand All @@ -216,6 +220,7 @@ else ifeq ($(platform), rpi3)
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions
CPU_ARCH := arm
ARM = 1
HAVE_ARMv6 = 1

# Raspberry Pi 3 (AArch64)
else ifeq ($(platform), rpi3_64)
Expand All @@ -239,6 +244,7 @@ else ifeq ($(platform), rpi4)
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions
CPU_ARCH := arm
ARM = 1
HAVE_ARMv6 = 1

# Raspberry Pi 4 (AArch64)
else ifeq ($(platform), rpi4_64)
Expand Down Expand Up @@ -271,6 +277,7 @@ else ifeq ($(platform), classic_armv7_a7)
ARCH = arm
CPU_ARCH := arm
ARM = 1
HAVE_ARMv6 = 1
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
CFLAGS += -march=armv7-a
else
Expand Down Expand Up @@ -301,6 +308,7 @@ else ifeq ($(platform), s812)
ARCH = arm
CPU_ARCH := arm
ARM = 1
HAVE_ARMv6 = 1

# Playstation Classic
else ifeq ($(platform), classic_armv8_a35)
Expand All @@ -322,6 +330,7 @@ else ifeq ($(platform), classic_armv8_a35)
ARCH = arm
CPU_ARCH := arm
ARM = 1
HAVE_ARMv6 = 1
CFLAGS += -march=armv8-a
LDFLAGS += -static-libgcc -static-libstdc++

Expand Down Expand Up @@ -470,6 +479,7 @@ else ifeq ($(platform), vita)
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions
HAVE_RZLIB := 1
ARM = 1
HAVE_ARMv6 = 1
STATIC_LINKING := 1
USE_CYCLONE := 1
USE_DRZ80 := 1
Expand Down Expand Up @@ -841,6 +851,10 @@ else
endif
endif

ifeq ($(HAVE_ARMv6),1)
CFLAGS += -DHAVE_ARMv6
endif

# include the various .mak files
ifneq (,$(filter $(INCLUDE_DRV),all))
include Makefile.common
Expand All @@ -857,7 +871,7 @@ CFLAGS += $(INCFLAGS) $(INCFLAGS_PLATFORM)
# combine the various definitions to one
CDEFS = $(DEFS) $(CPUDEFS) $(SOUNDDEFS) $(ASMDEFS) $(DBGDEFS)

OBJECTS := $(SOURCES_C:.c=.o) $(SOURCES_ASM:.s=.o)
OBJECTS := $(SOURCES_C:.c=.o) $(SOURCES_ASM:.s=.o) $(SOURCES_ASM_PP:.S=.o)

OBJOUT = -o
LINKOUT = -o
Expand Down
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -2722,7 +2722,7 @@ endif

ifeq ($(USE_CYCLONE), 1)
CPUDEFS += -DHAS_CYCLONE=1
SOURCES_ASM += $(CORE_DIR)/cpu/m68000_cyclone/cyclone.s
SOURCES_ASM_PP += $(CORE_DIR)/cpu/m68000_cyclone/cyclone.S
SOURCES_C += $(CORE_DIR)/cpu/m68000_cyclone/c68000.c
endif

Expand Down
2 changes: 1 addition & 1 deletion Makefile.split
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,7 @@ endif

ifeq ($(USE_CYCLONE), 1)
CPUDEFS += -DHAS_CYCLONE=1
SOURCES_ASM += $(CORE_DIR)/cpu/m68000_cyclone/cyclone.s
SOURCES_ASM_PP += $(CORE_DIR)/cpu/m68000_cyclone/cyclone.S
SOURCES_C += $(CORE_DIR)/cpu/m68000_cyclone/c68000.c
endif

Expand Down
Loading