- Change movw $0x0000,%ax to xorw %ax,%ax (because of probable bug in binutils, which compiles the first instruction into something weird)

- Add segment registers save+restore in Int386() in FreeLdr (thanks to tamlin too)

svn path=/trunk/; revision=24776
This commit is contained in:
Magnus Olsen
2006-11-19 17:01:23 +00:00
parent e59260f8cb
commit a24ea27b47
2 changed files with 11 additions and 1 deletions
@@ -84,7 +84,7 @@ EXTERN(switch_to_prot)
/* Of course CS has to already be valid. */
/* We are currently in real-mode so we */
/* need real-mode segment values. */
movw $0x0000,%ax
xorw %ax,%ax
movw %ax,%ds
movw %ax,%es
movw %ax,%fs
@@ -74,7 +74,12 @@ EXTERN(_Int386)
movl 0x0c(%esp),%eax
movl %eax,Int386_regsout
/* Save all registers + segment registers */
pushal
pushw %ds
pushw %es
pushw %fs
pushw %gs
/* Copy the input regs to our variables */
movl $Int386_REGS,%edi
@@ -147,6 +152,11 @@ Int386_vector_opcode:
rep
movsb
/* Restore segment and all other registers */
popw %gs
popw %fs
popw %es
popw %ds
popal
/* Get return value */