bootsect.S changes

Andrzej Krzysztofowicz (ankry@green.mif.pg.gda.pl)
Fri, 15 Oct 1999 15:28:31 +0200 (CEST)


Hi,
As I see the i386 bootsect code evaluates into 32 bit code.
Could anybody explain me what is the reason ?

32-bit code is in most cases a bit larger (one byte per statement)
but in the bootsector every byte is very valuable. Are there any problems
with 16-bit code? (compilation? non-working on some machines?)

What are the advantages of the following code:
movw $128, %cx
subw %si, %si
subw %di, %di
cld
rep
movsl <------- 32 bit
instead of
movw $256, %cx
subw %si, %si
subw %di, %di
cld
rep
movsw <------- 16 bit
(which is shorter), etc.
I hope, nobody will joke saying it is faster ...

Regards
Andrzej

PS. IMHO, using 32-bit code in bootsect.S/setup.S makes sense only
if it is really necessary to handle 32-bit addresses/data or it
is shorter. Am I wrong?

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/