Disable inlining on old compilers.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 21 Mar 2010 00:21:13 +0000 (20:21 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 21 Mar 2010 00:42:12 +0000 (20:42 -0400)
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
src/resume.c

index d2c0ffdcbd063fdc838d96a2134fcc43a0862b46..fe0c1ceea8d9dc60e1ac2b3a5ea7da2ba328af55 100644 (file)
--- 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
index e9115d0919422bc9bf941cac0f3a63b07a62629f..81ad1ac7b55d1f8063a31e295817361d32b05cb7 100644 (file)
@@ -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");