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

Already on GitHub? Sign in to your account

asap/xasm: Fix broken if statement and support building with older versions of gdc #1607

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+6 −5
Split
View
@@ -2120,7 +2120,7 @@ else
fi
if test "$use_asap" = "yes"; then
- AC_CHECK_PROG(HAVE_GDC,gdc,"yes","no")
+ AC_CHECK_PROGS(HAVE_GDC,gdc-4.4 gdc-4.3 gdc,"no")
if test "$HAVE_GDC" = "no"; then
AC_MSG_ERROR($missing_program);
fi
View
@@ -73,7 +73,7 @@ mads/mads: force
make -C mads
xasm/xasm: force
- make -C xasm
+ make -C xasm GDC=@HAVE_GDC@
players/cmc.obx: players/cmc.asx xasm/xasm
$(XASM) -d CM3=0 -o $@ players/cmc.asx
View
@@ -5,14 +5,15 @@ ASCIIDOC_POSTPROCESS = perl -pi.bak -e "s/527bbd;/20a0a0;/;END{unlink '$@.bak'}"
ASCIIDOC_VALIDATE = xmllint --valid --noout --nonet $@
RM = rm -f
ZIP = 7z a -mx=9 -tzip $@
+GDC ?= gdc
all: xasm
xasm.o: xasm.d
- gdc -c -o xasm.o -O2 $<
+ $(GDC) -c -o xasm.o -O2 $<
xasm: xasm.o
- gdc -o xasm xasm.o
+ $(GDC) -o xasm xasm.o
xasm.html: xasm.1.txt
$(ASCIIDOC) -d manpage $<
View
@@ -548,7 +548,7 @@ int operatorShiftLeft(int a, int b) {
if (b < 0) {
return operatorShiftRight(a, -b);
}
- if (a != 0 & b >= 32) {
+ if (a != 0 && b >= 32) {
throw new AssemblyError("Arithmetic overflow");
}
long r = cast(long) a << b;