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 */ /* Must be 4 bytes per entry */
long maskbit[640]; long maskbit[640];
static HANDLE BitmapThreadHandle;
static CLIENT_ID BitmapThreadId; static CLIENT_ID BitmapThreadId;
static PUCHAR BootimageBitmap; static PUCHAR BootimageBitmap;
@ -556,6 +555,7 @@ STATIC BOOLEAN STDCALL
VidInitialize(VOID) VidInitialize(VOID)
{ {
NTSTATUS Status; NTSTATUS Status;
HANDLE BitmapThreadHandle;
InbvMapVideoMemory(); InbvMapVideoMemory();
InbvInitVGAMode(); InbvInitVGAMode();
@ -574,7 +574,7 @@ VidInitialize(VOID)
return FALSE; return FALSE;
} }
NtClose(BitmapThreadHandle); ZwClose(BitmapThreadHandle);
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
_InbvPutPixels: _InbvPutPixels:
pushl %ebp pushl %ebp
movl %esp, %ebp movl %esp, %ebp
pushl %ebx
/* Compute mask and put it in EBX /* Compute mask and put it in EBX
mask = maskbit[x] */ mask = maskbit[x] */
@ -96,6 +97,7 @@ _InbvPutPixels:
shrl $0x8, %eax shrl $0x8, %eax
movb %al, 0x3(%esi) movb %al, 0x3(%esi)
popl %ebx
popl %ebp popl %ebp
ret ret

View file

@ -618,11 +618,9 @@ endif
# if needed, until their problems can be found # if needed, until their problems can be found
# #
ifeq ($(OPTIMIZED), 1) ifeq ($(OPTIMIZED), 1)
ifneq ($(TARGET_NAME), bootvid)
MK_CFLAGS += -O2 -Wno-strict-aliasing MK_CFLAGS += -O2 -Wno-strict-aliasing
MK_CPPFLAGS += -O2 -Wno-strict-aliasing MK_CPPFLAGS += -O2 -Wno-strict-aliasing
endif endif
endif
ifneq ($(TARGET_LIBS),) ifneq ($(TARGET_LIBS),)
MK_LIBS := $(TARGET_LIBS) $(MK_LIBS) MK_LIBS := $(TARGET_LIBS) $(MK_LIBS)