From fef48ab3fafe62c96621a3862be75c74719916c3 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 28 Jan 2005 11:37:09 +0000 Subject: [PATCH] 1. fixed InbvPutPixels() to save the ebx register which caused bootvid to crash when built with optimizations 2. build bootvid with optimizations when enabled svn path=/trunk/; revision=13346 --- reactos/drivers/dd/bootvid/bootvid.c | 4 ++-- reactos/drivers/dd/bootvid/pixelsup_i386.S | 4 +++- reactos/tools/helper.mk | 6 ++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/drivers/dd/bootvid/bootvid.c b/reactos/drivers/dd/bootvid/bootvid.c index c1e468da2e4..20807f34d26 100644 --- a/reactos/drivers/dd/bootvid/bootvid.c +++ b/reactos/drivers/dd/bootvid/bootvid.c @@ -66,7 +66,6 @@ PUCHAR VideoMemory; /* Must be 4 bytes per entry */ long maskbit[640]; -static HANDLE BitmapThreadHandle; static CLIENT_ID BitmapThreadId; static PUCHAR BootimageBitmap; @@ -556,6 +555,7 @@ STATIC BOOLEAN STDCALL VidInitialize(VOID) { NTSTATUS Status; + HANDLE BitmapThreadHandle; InbvMapVideoMemory(); InbvInitVGAMode(); @@ -574,7 +574,7 @@ VidInitialize(VOID) return FALSE; } - NtClose(BitmapThreadHandle); + ZwClose(BitmapThreadHandle); return TRUE; } diff --git a/reactos/drivers/dd/bootvid/pixelsup_i386.S b/reactos/drivers/dd/bootvid/pixelsup_i386.S index 34244ec4ddb..343cff78705 100644 --- a/reactos/drivers/dd/bootvid/pixelsup_i386.S +++ b/reactos/drivers/dd/bootvid/pixelsup_i386.S @@ -28,6 +28,7 @@ _InbvPutPixels: pushl %ebp movl %esp, %ebp + pushl %ebx /* Compute mask and put it in EBX mask = maskbit[x] */ @@ -66,7 +67,7 @@ _InbvPutPixels: (UCHAR) READ_REGISTER_UCHAR(VideoMemory + offset+0); */ movl (_VideoMemory), %esi addl %ebx, %esi - movb 0x0(%esi), %bl + movb 0x0(%esi), %bl /* Write color index for first pixel *((PUCHAR)(VideoMemory + offset+0)) = (c >> 0*8) & 0xff; */ movl 0x10(%ebp), %eax @@ -96,6 +97,7 @@ _InbvPutPixels: shrl $0x8, %eax movb %al, 0x3(%esi) + popl %ebx popl %ebp ret diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index 34fc17fa129..ca0e8d48b64 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -618,10 +618,8 @@ endif # if needed, until their problems can be found # ifeq ($(OPTIMIZED), 1) - ifneq ($(TARGET_NAME), bootvid) - MK_CFLAGS += -O2 -Wno-strict-aliasing - MK_CPPFLAGS += -O2 -Wno-strict-aliasing - endif + MK_CFLAGS += -O2 -Wno-strict-aliasing + MK_CPPFLAGS += -O2 -Wno-strict-aliasing endif ifneq ($(TARGET_LIBS),)