Patent ID: 7802078

Claim:
A microprocessor for performing an Intel Architecture (IA-32) repeat move data from string to string (REP MOVS) macroinstruction, wherein the word length of the string is specified in the IA-32 architectural ECX register, the microprocessor comprising: a memory, configured to store: a first sequence of microinstructions for accomplishing the REP MOVS macroinstruction that includes a control transfer microinstruction that, when executed, conditionally transfers control to a microinstruction within the first sequence based on the word length stored in the IA-32 architectural ECX register; and a second sequence of microinstructions for accomplishing the REP MOVS macroinstruction that does not include any control transfer microinstructions that conditionally transfer control based on the word length stored in the IA-32 architectural ECX register; and an instruction translator, coupled to said memory, configured to: in response to a macroinstruction that moves an immediate value into the IA-32 architectural ECX register, set a flag and save the immediate value; in response to a macroinstruction that modifies the IA-32 architectural ECX register in a manner other than moving an immediate value into the IA-32 architectural ECX register, clear the flag; and in response to a REP MOVS macroinstruction: transfer control to the first sequence of microinstructions in the memory, if the flag is clear; and transfer control to a location within the second sequence of microinstructions in the memory based on the saved immediate value, if the flag is set.