[ros-diffs] [greatlrd] 24776: - 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)

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sun Nov 19 18:01:24 CET 2006


Author: greatlrd
Date: Sun Nov 19 20:01:23 2006
New Revision: 24776

URL: http://svn.reactos.org/svn/reactos?rev=24776&view=rev
Log:
- 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)

Modified:
    trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S
    trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S

Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S?rev=24776&r1=24775&r2=24776&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S Sun Nov 19 20:01:23 2006
@@ -84,7 +84,7 @@
 	/* 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

Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S?rev=24776&r1=24775&r2=24776&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S Sun Nov 19 20:01:23 2006
@@ -74,7 +74,12 @@
 	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 @@
 	rep
 	movsb
 
+	/* Restore segment and all other registers */
+	popw	%gs
+	popw	%fs
+	popw	%es
+	popw	%ds
 	popal
 
 	/* Get return value */




More information about the Ros-diffs mailing list