IP Library Granted Patent US 8,484,446
Granted Patent B2
US 8,484,446 · App. 12/076,857 · Granted Jul 9, 2013

Microprocessor saving data stored in register and register saving method

Inventor: Yoshimasa Takebe (Kawasaki, JP)
Assignee: Fujitsu Semiconductor Limited
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,484,446
App. No.
12/076,857
Granted
Jul 9, 2013
Kind
B2
Abstract

A microprocessor which realizes fast register saving and restoring which are involved in subroutine calls, and is capable of reducing the scale of a program. A register file is provided with at least one register for storing data to be used for computational processing. A saving memory stores therein data saved from the registers. A saving control unit saves data from a writing destination register to the saving memory when an instruction to write to the register is executed in a subroutine. Then the saving control unit restores data saved in the saving memory back to the original registers when an instruction to return from the subroutine is executed.

Claims (22)

1. A microprocessor capable of executing a program including calling of a subroutine, comprising:

a register file including a plurality of registers that stores data;

a saving memory that stores therein data saved from the registers; and

a saving control unit that controls saving of data stored in the registers and includes a map memory unit storing map data, the map data indicating an order of saving among the registers, wherein:

the saving control unit detects a write instruction for writing second data into one of the registers that stores first data when the write instruction is read into the microprocessor, the write instruction being included in the subroutine;

the saving control unit saves the first data stored in the one of the registers to the saving memory after the write instruction is read into the microprocessor and before the second data is written into the one of the registers according to the write instruction, and updates the map data when the first data is saved; and

the saving control unit restores data saved in the saving memory back to the registers according to the order of saving indicated by the map data when a return instruction for returning from the subroutine is executed.

2. The microprocessor according to claim 1 , wherein:

the saving control unit saves the map data stored in the map memory unit to the saving memory and then initializes the map data when an instruction to call the subroutine is executed; and

the saving control unit restores the data back to the registers and then restores the saved map data back to the map memory unit when the return instruction is executed.

3. The microprocessor according to claim 1 , wherein when the first data of the one of the registers is saved, the saving control unit generates an address indicating a position on the saving memory based on an identification number of the one of the registers and stores the first data at the position indicated by the generated address.

4. The microprocessor according to claim 1 , wherein when the saving control unit detects that the saving memory is a lack of free space before the first data of the one of the registers is saved, the saving control unit secures a free space on the saving memory by moving data stored in the saving memory to an external memory connected to the microprocessor.

5. A register saving method to be executed by a microprocessor that includes a plurality of registers for storing data and is capable of executing a program including calling of a subroutine, the register saving method comprising:

detecting a write instruction for writing second data into one of the registers that stores first data when the write instruction is read into the microprocessor, the write instruction being included in the subroutine;

saving the first data stored in the one of the registers to a saving memory included in the microprocessor after the write instruction is read into the microprocessor and before the second data is written into the one of the registers according to the write instruction;

updating map data that indicates an order of saving among the registers when the first data is saved, the map data being stored in a map memory unit included in the microprocessor; and

restoring data saved in the saving memory back to the registers according to the order of saving indicated by the map data when a return instruction for returning from the subroutine is executed.

6. The register saving method according to claim 5 , wherein:

when an instruction to call the subroutine is executed, the map data stored in the map memory unit is saved to the saving memory and is initialized; and

when the return instruction is executed, the map data saved is restored back to the map memory unit after the data is restored back to the original registers.

7. The register saving method according to claim 5 , wherein when the first data of the one of the registers is saved, an address on the saving memory is generated based on an identification number that is previously given to the one of the registers, and the first data is stored at a position indicated by the generated address.

8. The register saving method according to the claim 5 , wherein when it is detected that the saving memory is a lack of free space before the first data of the one of the registers is saved, a free space is secured by moving data stored in the saving memory to an external memory connected to the microprocessor.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 27, 2015
From: FUJITSU SEMICONDUCTOR LIMITED
To: SOCIONEXT INC.
Reel/Frame 035508/0637 →
CHANGE OF NAME Recorded Jul 27, 2010
From: FUJITSU MICROELECTRONICS LIMITED
To: FUJITSU SEMICONDUCTOR LIMITED
Reel/Frame 024794/0500 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 10, 2008
From: FUJITSU LIMITED
To: FUJITSU MICROELECTRONICS LIMITED
Reel/Frame 021985/0715 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 24, 2008
From: TAKEBE, YOSHIMASA
To: FUJITSU LIMITED
Reel/Frame 020750/0320 →
Priority Claims (1)
JP 2007-123900 · May 8, 2007 · national
Continuity (1)
Related Publication 20080282071A1 · Nov 13, 2008