With a few additional checks it's possible to emulate all the leal cases without requiring a function call. Although this makes the vgafixup.py code a little more complex it eliminates the need for the "emulate_leal" function and it produces better code. In my tests, almost all "leal" instructions are replaced with 4 (or fewer) instructions.
-Kevin
Kevin O'Connor (2): vgabios: Add config option for assembler fixups vgabios: Emulate "leal" instruction
Makefile | 21 +++++++++--------- scripts/vgafixup.py | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++--- vgasrc/Kconfig | 10 +++++++++ vgasrc/vgaentry.S | 28 +++++------------------ 4 files changed, 87 insertions(+), 36 deletions(-)