VGA: Reduce stack usage.
Make 'struct carattr' 3 bytes in size - gcc does better with this.
Add 'noinline' directives to some funcs to reduce handle_10 stack usage.
diff --git a/vgasrc/vga.c b/vgasrc/vga.c
index 403f047..a01b0fc 100644
--- a/vgasrc/vga.c
+++ b/vgasrc/vga.c
@@ -513,7 +513,7 @@
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 @@
biosfn_read_pixel(regs->bh, regs->cx, regs->dx, ®s->ax);
}
-static void
+static void noinline
handle_100e(struct bregs *regs)
{
// Ralf Brown Interrupt list is WRONG on bh(page)
@@ -647,7 +647,7 @@
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 @@
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 @@
}
-static void
+static void noinline
handle_1013(struct bregs *regs)
{
struct cursorpos cp = {regs->dl, regs->dh, regs->bh};
diff --git a/vgasrc/vgatables.h b/vgasrc/vgatables.h
index 0d64586..2eb0c71 100644
--- a/vgasrc/vgatables.h
+++ b/vgasrc/vgatables.h
@@ -152,8 +152,7 @@
// vga.c
struct carattr {
- u8 car, attr;
- u16 use_attr;
+ u8 car, attr, use_attr;
};
struct cursorpos {
u8 x, y, page;