Quellcode durchsuchen

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 vor 17 Jahren
Ursprung
Commit
881dd8e102
1 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen
  1. 7
    7
      src/arch/i386/transitions/librm.S

+ 7
- 7
src/arch/i386/transitions/librm.S Datei anzeigen

@@ -215,9 +215,9 @@ real_to_prot:
215 215
 	movl	pm_esp, %esp
216 216
 
217 217
 	/* Record real-mode %ss:sp (after removal of data) */
218
-	movl	%ebp, rm_ss
218
+	movw	%bp, rm_ss
219 219
 	addl	%ecx, %edx
220
-	movl	%edx, rm_sp
220
+	movw	%dx, rm_sp
221 221
 
222 222
 	/* Move data from RM stack to PM stack */
223 223
 	subl	%ecx, %esp
@@ -258,8 +258,8 @@ prot_to_real:
258 258
 	addl	$4, %ecx
259 259
 	
260 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 263
 	subl	%ecx, %edx
264 264
 	movl	%ebp, %eax
265 265
 	shll	$4, %eax
@@ -413,7 +413,7 @@ prot_call:
413 413
 	popal
414 414
 	/* popal skips %esp.  We therefore want to do "movl -20(%sp),
415 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 417
 	 * we can just use -20(%esp) instead.
418 418
 	 */
419 419
 	addr32 movl -20(%esp), %esp
@@ -531,8 +531,8 @@ rc_function:	.word 0, 0
531 531
  ****************************************************************************
532 532
  */
533 533
 	.section ".data"
534
-rm_sp:	.long 0
535
-rm_ss:	.long 0
534
+rm_sp:	.word 0
535
+rm_ss:	.word 0
536 536
 pm_esp:	.long _estack
537 537
 
538 538
 /****************************************************************************

Laden…
Abbrechen
Speichern