Browse Source

Switch rm_ss and rm_sp back to being words; it'll make it less

confusing to read the code.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
881dd8e102
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      src/arch/i386/transitions/librm.S

+ 7
- 7
src/arch/i386/transitions/librm.S View File

215
 	movl	pm_esp, %esp
215
 	movl	pm_esp, %esp
216
 
216
 
217
 	/* Record real-mode %ss:sp (after removal of data) */
217
 	/* Record real-mode %ss:sp (after removal of data) */
218
-	movl	%ebp, rm_ss
218
+	movw	%bp, rm_ss
219
 	addl	%ecx, %edx
219
 	addl	%ecx, %edx
220
-	movl	%edx, rm_sp
220
+	movw	%dx, rm_sp
221
 
221
 
222
 	/* Move data from RM stack to PM stack */
222
 	/* Move data from RM stack to PM stack */
223
 	subl	%ecx, %esp
223
 	subl	%ecx, %esp
258
 	addl	$4, %ecx
258
 	addl	$4, %ecx
259
 	
259
 	
260
 	/* Real-mode %ss:sp => %ebp:edx and virtual address => %edi */
260
 	/* Real-mode %ss:sp => %ebp:edx and virtual address => %edi */
261
-	movl	rm_ss, %ebp
262
-	movl	rm_sp, %edx
261
+	movzwl	rm_ss, %ebp
262
+	movzwl	rm_sp, %edx
263
 	subl	%ecx, %edx
263
 	subl	%ecx, %edx
264
 	movl	%ebp, %eax
264
 	movl	%ebp, %eax
265
 	shll	$4, %eax
265
 	shll	$4, %eax
413
 	popal
413
 	popal
414
 	/* popal skips %esp.  We therefore want to do "movl -20(%sp),
414
 	/* popal skips %esp.  We therefore want to do "movl -20(%sp),
415
 	 * %esp", but -20(%sp) is not a valid 80386 expression.
415
 	 * %esp", but -20(%sp) is not a valid 80386 expression.
416
-	 * Fortunately, pot_to_real() zeroes the high word of %esp, so
416
+	 * Fortunately, prot_to_real() zeroes the high word of %esp, so
417
 	 * we can just use -20(%esp) instead.
417
 	 * we can just use -20(%esp) instead.
418
 	 */
418
 	 */
419
 	addr32 movl -20(%esp), %esp
419
 	addr32 movl -20(%esp), %esp
531
  ****************************************************************************
531
  ****************************************************************************
532
  */
532
  */
533
 	.section ".data"
533
 	.section ".data"
534
-rm_sp:	.long 0
535
-rm_ss:	.long 0
534
+rm_sp:	.word 0
535
+rm_ss:	.word 0
536
 pm_esp:	.long _estack
536
 pm_esp:	.long _estack
537
 
537
 
538
 /****************************************************************************
538
 /****************************************************************************

Loading…
Cancel
Save