From 90e09ed75f6b9bdf4a4cf57f899876d73592d452 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Thu, 12 Dec 2019 01:52:50 +0100 Subject: [PATCH] Disable thumb code generation on tcctest.gcc this breaks getting the alignment of functions via bit masking which we assume to work in one test. --- tests/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Makefile b/tests/Makefile index 9fe213e..1cfc0c0 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -59,6 +59,13 @@ ifeq ($(OS),Windows_NT) # for libtcc_test to find libtcc.dll PATH := $(CURDIR)/$(TOP)$(if $(findstring :\,$(PATH)),;,:)$(PATH) endif +ifeq ($(ARCH),arm) +# tcctest refers to the alignment of functions, and with thumb mode +# the low bit of code addresses selects the mode, so the "alignment" +# of functions via bit masking comes out as 1. Just disable thumb. +test.ref: CFLAGS+=-marm +endif + RUN_TCC = $(NATIVE_DEFINES) -run $(TOPSRC)/tcc.c $(TCCFLAGS) DISAS = objdump -d DUMPTCC = (set -x; $(TOP)/tcc -vv; ldd $(TOP)/tcc; exit 1)