]> xenbits.xensource.com Git - seabios.git/commitdiff
VGA: Reduce stack usage.
authorKevin O'Connor <kevin@koconnor.net>
Mon, 1 Jun 2009 00:46:43 +0000 (20:46 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 1 Jun 2009 00:46:43 +0000 (20:46 -0400)
Make 'struct carattr' 3 bytes in size - gcc does better with this.
Add 'noinline' directives to some funcs to reduce handle_10 stack usage.

vgasrc/vga.c
vgasrc/vgatables.h

index 403f047b69b5647d284fe65f2f855d7c930870df..a01b0fc3545098f9d7ed6a8d93e8029e9ef4c9a6 100644 (file)
@@ -513,7 +513,7 @@ handle_1008(struct bregs *regs)
     regs->ah = ca.attr;
 }
 
-static void
+static void noinline
 write_chars(u8 page, struct carattr ca, u16 count)
 {
     struct cursorpos cp = get_cursor_pos(page);
@@ -581,7 +581,7 @@ handle_100d(struct bregs *regs)
     biosfn_read_pixel(regs->bh, regs->cx, regs->dx, &regs->ax);
 }
 
-static void
+static void noinline
 handle_100e(struct bregs *regs)
 {
     // Ralf Brown Interrupt list is WRONG on bh(page)
@@ -647,7 +647,7 @@ handle_101009(struct bregs *regs)
     vgahw_get_all_palette_reg(regs->es, (u8*)(regs->dx + 0));
 }
 
-static void
+static void noinline
 handle_101010(struct bregs *regs)
 {
     u8 rgb[3] = {regs->dh, regs->ch, regs->cl};
@@ -666,7 +666,7 @@ handle_101013(struct bregs *regs)
     vgahw_select_video_dac_color_page(regs->bl, regs->bh);
 }
 
-static void
+static void noinline
 handle_101015(struct bregs *regs)
 {
     u8 rgb[3];
@@ -987,7 +987,7 @@ handle_1012(struct bregs *regs)
 }
 
 
-static void
+static void noinline
 handle_1013(struct bregs *regs)
 {
     struct cursorpos cp = {regs->dl, regs->dh, regs->bh};
index 0d64586a99772d9ab72c1bbf341d825db769301e..2eb0c71977138b90c88e1423dbdf91f06d5e610e 100644 (file)
@@ -152,8 +152,7 @@ extern u8 vgafont16alt[];
 
 // vga.c
 struct carattr {
-    u8 car, attr;
-    u16 use_attr;
+    u8 car, attr, use_attr;
 };
 struct cursorpos {
     u8 x, y, page;