Patent attributes
The present invention provides a microprocessor which enables task switching with a small time overhead. Upon reception of input of an interrupt control signal during execution of a task-1, a first program counter is switched to a second program counter and a first register file is switched to a second register file to start execution of a task-2. During the execution of the task-2, a task switch controller controls switches to select the first program counter, first memory devices of a processing pipeline circuit, and the first register file to save data stored in them in a save memory. After the data saving, data on a task-3 saved in the save memory is restored in the first program counter, the first memory devices of the processing pipeline circuit, and the first register file.