From: kub Date: Wed, 20 Mar 2019 18:07:16 +0000 (+0100) Subject: arm asm syntax fixes for open2x X-Git-Tag: v2.00~887 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c479106af9fd2a037c9eb6118ed0909c0fc1400;p=picodrive.git arm asm syntax fixes for open2x --- diff --git a/Makefile b/Makefile index dff08b2b..95d4b5d8 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ TARGET ?= PicoDrive DEBUG ?= 0 -CFLAGS += -Wall -g +CFLAGS += -Wall -ggdb -ffunction-sections -fdata-sections CFLAGS += -I. ifeq "$(DEBUG)" "0" -CFLAGS += -O3 -DNDEBUG +CFLAGS += -O2 -finline-functions -DNDEBUG endif # This is actually needed, bevieve me. @@ -11,6 +11,7 @@ endif ifndef NO_ALIGN_FUNCTIONS CFLAGS += -falign-functions=2 endif +LDFLAGS += -Wl,--gc-sections all: config.mak target_ diff --git a/pico/carthw/svp/stub_arm.S b/pico/carthw/svp/stub_arm.S index 9d5c5fa1..736d459b 100644 --- a/pico/carthw/svp/stub_arm.S +++ b/pico/carthw/svp/stub_arm.S @@ -8,7 +8,7 @@ #include "../../arm_features.h" -.syntax unified +@.syntax unified .text .align 2 @@ -281,8 +281,8 @@ ssp_hle_902_loop: bgt ssp_hle_902_loop tst r12, #1 - ldrhne r0, [r2], #2 - strhne r0, [r3], #2 + ldrneh r0, [r2], #2 + strneh r0, [r3], #2 ldr r0, [r7, #SSP_OFFS_IRAM_ROM] add r1, r7, #0x200 @@ -501,7 +501,7 @@ FUNCTION(ssp_hle_07_036): mov r12, #0x4000 orr r12,r12,#0x0018 subs r12,r3, r12 - subsne r12,r12,#0x0400 + subnes r12,r12,#0x0400 blne tr_unhandled orr r2, r2, r2, lsl #16 @@ -510,7 +510,7 @@ FUNCTION(ssp_hle_07_036): hle_07_036_no_ovrwr: tst r1, #2 - strhne r2, [r1], #0x3e @ align + strneh r2, [r1], #0x3e @ align subne r0, r0, #1 subs r0, r0, #4 blt hle_07_036_l2 @@ -525,7 +525,7 @@ hle_07_036_l2: tst r0, #2 strne r2, [r1], #0x40 tst r0, #1 - strhne r2, [r1], #2 + strneh r2, [r1], #2 b hle_07_036_end_copy hle_07_036_ovrwr: @@ -562,10 +562,10 @@ hle_07_036_ol1: hle_07_036_ol2: tst r0, #1 - ldrhne r3, [r1] + ldrneh r3, [r1] andne r3, r3, r12 orrne r3, r3, r2 - strhne r3, [r1], #2 + strneh r3, [r1], #2 hle_07_036_end_copy: ldr r2, [r7, #SSP_OFFS_DRAM] diff --git a/pico/videoport.c b/pico/videoport.c index aadba24f..cd76dc04 100644 --- a/pico/videoport.c +++ b/pico/videoport.c @@ -14,12 +14,6 @@ extern const unsigned char hcounts_32[]; extern const unsigned char hcounts_40[]; -#ifndef UTYPES_DEFINED -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned int u32; -#define UTYPES_DEFINED -#endif int (*PicoDmaHook)(unsigned int source, int len, unsigned short **base, unsigned int *mask) = NULL;