]> xenbits.xensource.com Git - seabios.git/commitdiff
Mark disk.c functions that take an address of a stack variable as noinline.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 25 Mar 2012 14:21:27 +0000 (10:21 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 25 Mar 2012 14:21:27 +0000 (10:21 -0400)
Some versions of gcc have been found to inline these funcions and then
cause the calling functions to use very large stack usage.  Since
these functions are called from 16bit mode, their stack space usage is
very sensitive.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/disk.c

index 7a58af4ac3f3a404253186f5c923627800deabea..706b9f44d413db4f1e515cff2dcd0c0237084d9e 100644 (file)
@@ -76,7 +76,7 @@ fillLCHS(struct drive_s *drive_g, u16 *nlc, u16 *nlh, u16 *nlspt)
 }
 
 // Perform read/write/verify using old-style chs accesses
-static void
+static void noinline
 basic_access(struct bregs *regs, struct drive_s *drive_g, u16 command)
 {
     struct disk_op_s dop;
@@ -119,7 +119,7 @@ basic_access(struct bregs *regs, struct drive_s *drive_g, u16 command)
 }
 
 // Perform read/write/verify using new-style "int13ext" accesses.
-static void
+static void noinline
 extended_access(struct bregs *regs, struct drive_s *drive_g, u16 command)
 {
     struct disk_op_s dop;
@@ -201,7 +201,7 @@ disk_1304(struct bregs *regs, struct drive_s *drive_g)
 }
 
 // format disk track
-static void
+static void noinline
 disk_1305(struct bregs *regs, struct drive_s *drive_g)
 {
     debug_stub(regs);
@@ -228,7 +228,7 @@ disk_1305(struct bregs *regs, struct drive_s *drive_g)
 }
 
 // read disk drive parameters
-static void
+static void noinline
 disk_1308(struct bregs *regs, struct drive_s *drive_g)
 {
     u16 ebda_seg = get_ebda_seg();
@@ -329,7 +329,7 @@ disk_1314(struct bregs *regs, struct drive_s *drive_g)
 }
 
 // read disk drive size
-static void
+static void noinline
 disk_1315(struct bregs *regs, struct drive_s *drive_g)
 {
     disk_ret(regs, DISK_RET_SUCCESS);
@@ -463,7 +463,7 @@ disk_1345(struct bregs *regs, struct drive_s *drive_g)
 }
 
 // IBM/MS eject media
-static void
+static void noinline
 disk_1346(struct bregs *regs, struct drive_s *drive_g)
 {
     if (regs->dl < EXTSTART_CD) {