On Sat, Apr 11, 2015 at 08:58:20AM +0200, Paul Menzel wrote:
Am Freitag, den 10.04.2015, 11:07 -0400 schrieb Kevin O'Connor:
Add a kconfig build option (CONFIG_VGA_FIXUP_ASM) to allow users to build the vgabios without the complex assembler fixups that work around emulator bugs.
Signed-off-by: Kevin O'Connor kevin@koconnor.net
Makefile | 21 +++++++++++---------- vgasrc/Kconfig | 10 ++++++++++ vgasrc/vgaentry.S | 4 ++++ 3 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile index a84a5f7..a4d945c 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ COMMONCFLAGS := -I$(OUT) -Isrc -Os -MD -g \ -Wall -Wno-strict-aliasing -Wold-style-definition \ $(call cc-option,$(CC),-Wtype-limits,) \ -m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 \
- -minline-all-stringops \
- -minline-all-stringops -fomit-frame-pointer \
could you elaborate why `-fomit-frame-pointer` causes issues and needs to be moved around?
The x86 vgabios interpretter on some versions of Windows gets confused when addresses relative to %esp are used (eg, "movl 4(%esp), %eax"). See 9887ecb7 and 41c6061d. In practice, -fno-omit-frame-pointer causes gcc to not emit these addresses.
- config VGA_FIXUP_ASM
bool "Fixup assembler to work with broken emulators"
default y
help
This option will cause the build to attempt to avoid
certain x86 machine instructions that are known to confuse
some emulators. In particular, it works around
deficiencies in the Windows vgabios emulator and the
Use Microsoft Windows?
Was that unclear? I prefer not to call out company names in defect descriptions.
-Kevin