Removed some useless code:
- gcc assumes that %ecx and %edx are clobbered (due to calling conventions), thus there is no need for saving/restoring those two registers. - %es is reset to default value by real_to_prot, thus there is no need for saving/restorig that register. Submitted by: tegge
This commit is contained in:
parent
43f67e2b2e
commit
906265bada
@ -24,7 +24,7 @@
|
||||
* the rights to redistribute these changes.
|
||||
*
|
||||
* from: Mach, Revision 2.2 92/04/04 11:34:26 rpd
|
||||
* $Id$
|
||||
* $Id: bios.S,v 1.9 1997/02/22 09:30:05 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -77,9 +77,6 @@ ENTRY(biosread)
|
||||
push %ebx
|
||||
push %esi
|
||||
push %edi
|
||||
push %ecx
|
||||
push %edx
|
||||
push %es
|
||||
|
||||
movb 0x10(%ebp), %dh
|
||||
movw 0x0c(%ebp), %cx
|
||||
@ -111,9 +108,6 @@ ENTRY(biosread)
|
||||
xor %eax, %eax
|
||||
movb %bh, %al /* return value in %ax */
|
||||
|
||||
pop %es
|
||||
pop %edx
|
||||
pop %ecx
|
||||
pop %edi
|
||||
pop %esi
|
||||
pop %ebx
|
||||
@ -138,7 +132,6 @@ ENTRY(putc)
|
||||
push %ebx
|
||||
push %esi
|
||||
push %edi
|
||||
push %ecx
|
||||
|
||||
movb 0x8(%ebp), %cl
|
||||
|
||||
@ -155,7 +148,6 @@ ENTRY(putc)
|
||||
data32
|
||||
call EXT(real_to_prot)
|
||||
|
||||
pop %ecx
|
||||
pop %edi
|
||||
pop %esi
|
||||
pop %ebx
|
||||
@ -252,12 +244,9 @@ nochar:
|
||||
ENTRY(get_diskinfo)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
push %es
|
||||
push %ebx
|
||||
push %esi
|
||||
push %edi
|
||||
push %ecx
|
||||
push %edx
|
||||
|
||||
movb 0x8(%ebp), %dl /* diskinfo(drive #) */
|
||||
call EXT(prot_to_real) /* enter real mode */
|
||||
@ -306,12 +295,9 @@ ok:
|
||||
andb $0x3f, %cl /* mask of cylinder gunk */
|
||||
movb %cl, %al /* max sector (and # sectors) */
|
||||
|
||||
pop %edx
|
||||
pop %ecx
|
||||
pop %edi
|
||||
pop %esi
|
||||
pop %ebx
|
||||
pop %es
|
||||
pop %ebp
|
||||
ret
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* the rights to redistribute these changes.
|
||||
*
|
||||
* from: Mach, Revision 2.2 92/04/04 11:34:26 rpd
|
||||
* $Id$
|
||||
* $Id: serial.S,v 1.6 1997/02/22 09:30:11 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -93,7 +93,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
ENTRY(serial_putc)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
push %edx
|
||||
|
||||
mov $COMCONSOLE + 5, %edx # line status reg
|
||||
1: inb %dx, %al
|
||||
@ -105,7 +104,6 @@ ENTRY(serial_putc)
|
||||
sub $5, %edx # TX output reg
|
||||
outb %al, %dx # send this one
|
||||
|
||||
pop %edx
|
||||
pop %ebp
|
||||
ret
|
||||
|
||||
@ -117,7 +115,6 @@ ENTRY(serial_putc)
|
||||
ENTRY(serial_getc)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
push %edx
|
||||
|
||||
mov $COMCONSOLE + 5, %edx # line status reg
|
||||
1:
|
||||
@ -134,7 +131,6 @@ ENTRY(serial_getc)
|
||||
jne 2f
|
||||
mov $0x08, %eax # look like BS
|
||||
2:
|
||||
pop %edx
|
||||
pop %ebp
|
||||
ret
|
||||
|
||||
@ -145,14 +141,12 @@ ENTRY(serial_getc)
|
||||
ENTRY(serial_ischar)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
push %edx
|
||||
|
||||
xorl %eax, %eax
|
||||
mov $COMCONSOLE + 5, %edx # line status reg
|
||||
inb %dx, %al
|
||||
andb $0x01, %al # RX char available?
|
||||
|
||||
pop %edx
|
||||
pop %ebp
|
||||
ret
|
||||
|
||||
@ -163,7 +157,6 @@ ENTRY(serial_ischar)
|
||||
ENTRY(init_serial)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
push %edx
|
||||
|
||||
mov $COMCONSOLE + 3, %edx # line control reg
|
||||
movb $0x80, %al
|
||||
@ -195,6 +188,5 @@ ENTRY(init_serial)
|
||||
add $5, %edx
|
||||
jmp 1b
|
||||
2:
|
||||
pop %edx
|
||||
pop %ebp
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user