delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/10/10/04:33:07

To: cnc AT netcom19 DOT netcom DOT com (Christopher Christensen)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: 32/16bit?
Date: Mon, 10 Oct 94 08:51:39 +0200
From: eliz AT is DOT elta DOT co DOT il

>                   If you refer to the Intel processor manuals for the i486
> and Pentium processors, you will find that when an instruction with 16-bit
> operands exists in a 32-bit segment, it requires an OPERAND SIZE prefix.
> The same is true for 32-bit instructions in a 16-bit segment.  This OPERAND
> SIZE prefix is 1 byte long and takes 1 clock cycle to decode on both i486
> and Pentium processors.  This means that for simple instructions like ADD
> or MOV which normally take 1 clock cycle, using the wrong bitness will DOUBLE
> the execution time of that instruction.

With all due respect to counting clock cycles, you forget the prefetch
and decode queues of the processor, which all but annihilate that extra
clock cycle (except for the very first instruction each time the queues
are flushed, which shouldn't happen too often).

	Eli Zaretskii

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019