diff options
author | bde <bde@FreeBSD.org> | 1997-05-16 10:40:00 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-05-16 10:40:00 +0000 |
commit | 4b84d808203432df1d3e066d9eda79da496a37f2 (patch) | |
tree | 1875a6a1c53b83a649f648f2e1fb6301cdd240e6 /sys | |
parent | 573a396aa7b880afab0e3d3bbc9957183e7af94c (diff) | |
download | FreeBSD-src-4b84d808203432df1d3e066d9eda79da496a37f2.zip FreeBSD-src-4b84d808203432df1d3e066d9eda79da496a37f2.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/boot/biosboot/bios.S | 16 | ||||
-rw-r--r-- | sys/i386/boot/biosboot/serial.S | 10 |
2 files changed, 2 insertions, 24 deletions
diff --git a/sys/i386/boot/biosboot/bios.S b/sys/i386/boot/biosboot/bios.S index 3bce011..884b7b6 100644 --- a/sys/i386/boot/biosboot/bios.S +++ b/sys/i386/boot/biosboot/bios.S @@ -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 diff --git a/sys/i386/boot/biosboot/serial.S b/sys/i386/boot/biosboot/serial.S index 90356a0..09060ab 100644 --- a/sys/i386/boot/biosboot/serial.S +++ b/sys/i386/boot/biosboot/serial.S @@ -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 |