Patent ID: 8402254

Claim:
A data processor of Reduced Instruction Set Computer type, comprising: an instruction execution unit; and an instruction set having a first instruction which caused the instruction-execution unit to execute a process involving flag generation, and a second instruction which causes instruction-execution unit to execute a process involving use of a flag, wherein the instruction-execution unit has an operation circuit operable to perform a process according to a result of decode of an instruction, a flag latch circuit, and a flag select circuit, wherein the operation circuit is configured to execute an operation process on operands of large data size and of small data size according to a result of decode of the first instruction, wherein the operation circuit is configured to perform a first process on the operand of a small data size, to generate a first flag group and a second flag group, and to select a first flag out of the first flag group and a second flag out of the second flag group according to a result of decode of the first instruction, wherein the operation circuit is configured to perform a second process on the operand of a large data size, to generate the first flag group and the second flag group, and to select a first flag out of the first flag group and a second flag out of the second flag group according to a result of decode of the first instruction, wherein the operation of the first process on the small data size operand is identical to the operation of the second process on the low-order bits of a large data size operand, wherein the first flag group and the second flag group generated by the operation on the operand of the small data size and the first flag group and the second flag group generated by the operation on the operand of the large data size are the same flag groups, wherein the flag latch circuit latches the first flag and the second flag generated by the operation circuit according to a result of decode of the first instruction, and wherein the flag select circuit selects one of the first flag and the second flag latched by the flag latch circuit, according to a result of decode of the second instruction.