- Add segment registers save+restore in Int386() in FreeLdr (thanks to tamlin too)
svn path=/trunk/; revision=24776
/* 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
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
rep
movsb
+ /* Restore segment and all other registers */
+ popw %gs
+ popw %fs
+ popw %es
+ popw %ds
popal
/* Get return value */