From db71b2786bf9a007dd635923b6832936bce175ab Mon Sep 17 00:00:00 2001 From: crazii Date: Sun, 18 Feb 2024 16:16:16 +0800 Subject: [PATCH] re-enable -O2 for au_base.c; update makefile. --- makefile | 31 ------------------------------- mpxplay/au_cards/au_base.c | 2 ++ 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/makefile b/makefile index aaa72ac2..8d8c2c6c 100644 --- a/makefile +++ b/makefile @@ -7,12 +7,6 @@ VERSION ?= $(shell git describe --tags) INCLUDES := -I./mpxplay -I./sbemu DEFINES := -D__DOS__ -DSBEMU -DDEBUG=$(DEBUG) -DMAIN_SBEMU_VER=\"$(VERSION)\" -#CFLAGS := -fcommon -march=i386 -Os -flto -Wno-attributes $(INCLUDES) $(DEFINES) -AU_BASE_CFLAGS := -fcommon -march=i386 -Os -flto $(INCLUDES) $(DEFINES) -AU_CFLAGS := -fcommon -march=i386 -O2 -flto $(INCLUDES) $(DEFINES) -SC_CFLAGS := -fcommon -march=i386 -O2 -flto $(INCLUDES) $(DEFINES) -MPXPLAY_CFLAGS := -fcommon -march=i386 -O2 -flto $(INCLUDES) $(DEFINES) -SBEMU_CFLAGS := -fcommon -march=i386 -O2 -flto $(INCLUDES) $(DEFINES) CFLAGS := -fcommon -march=i386 -O2 -flto $(INCLUDES) $(DEFINES) LDFLAGS := -lstdc++ -lm -Wno-attributes @@ -80,31 +74,6 @@ $(TARGET): $(OBJS) $(SILENTMSG) "LINK\t$@\n" $(SILENTCMD)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -output/mpxplay/au_cards/sc_%.o: mpxplay/au_cards/sc_%.c - @mkdir -p $(dir $@) - $(SILENTMSG) "CC\t$@\n" - $(SILENTCMD)$(CC) $(SC_CFLAGS) -c $< -o $@ - -output/mpxplay/au_cards/au_base.o: mpxplay/au_cards/au_base.c - @mkdir -p $(dir $@) - $(SILENTMSG) "CC\t$@\n" - $(CC) $(AU_BASE_CFLAGS) -c $< -o $@ - -output/mpxplay/au_cards/au_%.o: mpxplay/au_cards/au_%.c - @mkdir -p $(dir $@) - $(SILENTMSG) "CC\t$@\n" - $(SILENTCMD)$(CC) $(AU_CFLAGS) -c $< -o $@ - -output/mpxplay/%.o: mpxplay/%.c - @mkdir -p $(dir $@) - $(SILENTMSG) "CC\t$@\n" - $(SILENTCMD)$(CC) $(MPXPLAY_CFLAGS) -c $< -o $@ - -output/sbemu/%.o: sbemu/%.c - @mkdir -p $(dir $@) - $(SILENTMSG) "CC\t$@\n" - $(SILENTCMD)$(CC) $(SBEMU_CFLAGS) -c $< -o $@ - output/%.o: %.c @mkdir -p $(dir $@) $(SILENTMSG) "CC\t$@\n" diff --git a/mpxplay/au_cards/au_base.c b/mpxplay/au_cards/au_base.c index a00f77b3..3f271893 100644 --- a/mpxplay/au_cards/au_base.c +++ b/mpxplay/au_cards/au_base.c @@ -195,9 +195,11 @@ unsigned long pds_dpmi_map_physical_memory(unsigned long phys_addr,unsigned long physicalmaps[i] = info; unsigned long newlimit = info.address + memsize - 1; newlimit = ((newlimit+1+0xFFF)&~0xFFF)-1;//__dpmi_set_segment_limit need page aligned + int intr = disable(); __dpmi_set_segment_limit(_my_ds(), max(limit, newlimit)); __dpmi_set_segment_limit(__djgpp_ds_alias, max(limit, newlimit)); __djgpp_selector_limit = max(limit, newlimit); + if (intr) enable(); return info.address; } return 0;