Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fdisk/mbr - Use the proper multiply instructions so tha...
details: https://anonhg.NetBSD.org/src/rev/8154a5a9f39f
branches: trunk
changeset: 472490:8154a5a9f39f
user: christos <christos%NetBSD.org@localhost>
date: Fri Apr 30 15:29:44 1999 +0000
description:
- Use the proper multiply instructions so that we don't get truncated.
- Fix comparison, which did not work before.
diffstat:
sbin/fdisk/mbr/mbr.S | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diffs (43 lines):
diff -r c4682e5f368b -r 8154a5a9f39f sbin/fdisk/mbr/mbr.S
--- a/sbin/fdisk/mbr/mbr.S Fri Apr 30 15:29:24 1999 +0000
+++ b/sbin/fdisk/mbr/mbr.S Fri Apr 30 15:29:44 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mbr.S,v 1.4 1999/04/28 23:27:02 fvdl Exp $ */
+/* $NetBSD: mbr.S,v 1.5 1999/04/30 15:29:44 christos Exp $ */
/*
* Copyright (C) 1998 Wolfgang Solfrank.
@@ -145,6 +145,10 @@
*/
boot:
movb_ireg0_reg(SI_INDEX,DL)
+ data32
+ xorl %ecx,%ecx
+ data32
+ xorl %eax,%eax
movb $8,%ah
int $0x13
@@ -161,14 +165,16 @@
orl %ebx,%ecx
incl %ecx /* cx has #cylinders */
- mul %edx /* h * s (will fit in 16 bits) */
- mul %ecx /* dx:ax = c * h * s */
+ mull %edx /* h * s (will fit in 16 bits) */
+ data32
+ mull %ecx /* %eax = c * h * s */
- cmpw_reg_iregoff(DX,SI_INDEX,10)
movb_ireg0_reg(SI_INDEX,DL)
- jl noext
- jne tryext
- cmpw_reg_iregoff(AX,SI_INDEX,8)
+ data32
+ addr32
+ movl 8(%esi), %ebx
+ data32
+ cmpl %eax, %ebx
jl noext /* total # chs sectors > part. start */
tryext:
Home |
Main Index |
Thread Index |
Old Index