mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
- 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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user