]> xenbits.xensource.com Git - seabios.git/commitdiff
vgabios: Avoid memory references via %esp register in vgabios.
authorKevin O'Connor <kevin@koconnor.net>
Mon, 9 Dec 2013 22:27:54 +0000 (17:27 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 9 Dec 2013 22:27:54 +0000 (17:27 -0500)
Win7 interprets the vgabios and it does not properly handle memory
references relative to the %esp register.  Commit 4a8b58cb introduced
some of these %esp references - rework that assembler to avoid these
instructions and make win7 happy.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgasrc/vgaentry.S

index 35747b7466de46d38c798249c01d2379f342a34d..a5622b8a6fa311ddd1e5d0ee56248ddd91de4ca3 100644 (file)
@@ -97,12 +97,9 @@ entry_10_extrastack:
         movl %ecx, BREGS_ecx(%eax)
         movw %es, BREGS_es(%eax)
         movl %esp, BREGS_size+0(%eax)
-        movzwl %sp, %esp
         movw %ss, BREGS_size+4(%eax)
-        movl (%esp), %edx
-        movl %edx, BREGS_code(%eax)
-        movw 4(%esp), %dx
-        movw %dx, BREGS_flags(%eax)
+        popl BREGS_code(%eax)
+        popw BREGS_flags(%eax)
 
         movw %ds, %dx           // Setup %ss/%esp and call function
         movw %dx, %ss