Patent ID: 8443172

Claim:
An apparatus in a microprocessor that has an instruction set architecture in which instructions may include a length-modifying prefix used to select an address/operand size other than a default address/operand size, the apparatus configured to mark the start byte and the end byte of each instruction in a stream of instruction bytes, the apparatus comprising: hardware decode logic, configured to decode each instruction byte of a predetermined number of instruction bytes of the stream and determine whether each instruction byte specifies a length-modifying prefix, the start of an instruction, or the end of an instruction, the decode logic generating instruction start and end marks based on an address/operand size; and hardware operand/address size logic, coupled to the decode logic, configured to provide the default operand/address size to the decode logic to use to generate the start and end marks during a first clock cycle during which the decode logic decodes the predetermined number of instruction bytes, wherein if during the first clock cycle and any of N subsequent clock cycles the decode logic indicates that one of the predetermined number of instruction bytes of the stream specifies a length-modifying prefix, the operand/address size logic is further configured to provide to the decode logic on the next clock cycle the address/operand size specified by the length-modifying prefix to use to generate the start and end marks; wherein N is the number of instructions of the predetermined number of instruction bytes of the stream having at least one length-modifying prefix, wherein N is zero if none of the instructions of the predetermined number of instruction bytes of the stream have at least one length-modifying prefix; and wherein the apparatus is configured to generate the correct start and end mark for each of the instruction bytes in N+1 clock cycles, regardless of the number of prefix bytes included in any of the instructions of the predetermined number of instruction bytes of the stream.