From d705e5accd1de84c46c60d1f872e12a5374e8082 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 20 Mar 2010 20:21:13 -0400 Subject: [PATCH] Disable inlining on old compilers. If the compiler can't restrict inlining by stack usage, then disable inlining in 16bit mode. Otherwise, old compilers produce code that uses too much stack space. --- Makefile | 2 +- src/resume.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d2c0ffd..fe0c1ce 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ CFLAGSSEG = $(COMMONCFLAGS) -DMODESEGMENT=1 -fno-defer-pop \ $(call cc-option,$(CC),-fno-tree-switch-conversion,) CFLAGS32SEG = $(CFLAGSSEG) -DMODE16=0 -g CFLAGS16INC = $(CFLAGSSEG) -DMODE16=1 \ - $(call cc-option,$(CC),--param large-stack-frame=4,) + $(call cc-option,$(CC),--param large-stack-frame=4,-fno-inline) CFLAGS16 = $(CFLAGS16INC) -g all: $(OUT) $(OUT)bios.bin diff --git a/src/resume.c b/src/resume.c index e9115d0..81ad1ac 100644 --- a/src/resume.c +++ b/src/resume.c @@ -96,6 +96,7 @@ handle_resume(u8 status) void VISIBLE32FLAT s3_resume(void) { + ASSERT32FLAT(); if (!CONFIG_S3_RESUME) panic("S3 resume support not compiled in.\n"); -- 2.25.1