aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-03-20 20:21:13 -0400
committerKevin O'Connor <kevin@koconnor.net>2010-03-20 20:42:12 -0400
commitd705e5accd1de84c46c60d1f872e12a5374e8082 (patch)
tree9d10721c33765cd362b5314544215c6bfdf620c5
parentbca0736f5a6df16d0d98a877d695d406a9be88b7 (diff)
downloadseabios-d705e5accd1de84c46c60d1f872e12a5374e8082.tar.gz
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.
-rw-r--r--Makefile2
-rw-r--r--src/resume.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d2c0ffdc..fe0c1cee 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 e9115d09..81ad1ac7 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");