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
This commit is contained in:
Thomas Bluemel 2005-01-28 11:37:09 +00:00
parent c6e6ddf2d4
commit fef48ab3fa
3 changed files with 7 additions and 7 deletions

View file

@ -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;
}

View file

@ -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

View file

@ -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),)