IP Library Granted Patent US 6,907,442
Granted Patent B2
US 6,907,442 · App. 10/098,151 · Granted Jun 14, 2005

Development system of microprocessor for application program including integer division or integer remainder operations

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 6,907,442
App. No.
10/098,151
Granted
Jun 14, 2005
Kind
B2
Abstract

A microprocessor ( 10 ) comprises a compiler ( 4 ), which, for a source program including an integer division q=int(a÷b)(int( ) is a function discarding figures below decimal point in parentheses) for dividing integer a, expressed in N bits, by integer constant b, causes a computer to execute a first process for calculating mb=int(m÷b) (where m=2 N ), and a second process for generating an object code, which stores the mb in a first register ( 24 ), calculates qx=int(a×mb÷m), calculates rx=a−qx×b, set a quotient q to q=qx when rx<b, or q=qx+1 when rx>=b; and a microprocessor having an arithmetic circuit ( 11 ), which comprises the first register, a multiplier ( 14 ), and an adder-subtractor ( 16 ), and which executes the object code generated by the compiler.

Claims (60)

1. A system for executing an object code converted from a source program having an integer division, said system comprising:

a compiler having program code, which, for a source program including an integer division calculation q=int(a−b)(int( ) being a function which discards figures below decimal point in parentheses) for dividing integer a, which is expressed in N bits, by integer constant b, causes a computer to execute a first process for calculating mb=int(m÷b) (where m=2 N ), and a second process for generating an object code, which stores the mb in a first register, calculates qx=int(a×mb÷m), calculates rx=a−qx×b, set a quotient q to q=qx when rx<b, and set the quotient q to q=qx+1 when rx>=b; and

a microprocessor having an arithmetic circuit, which comprises said first register, a multiplier, and an adder-subtractor, and which executes the object code generated by the compiler.

2. The system according to the claim 1 , wherein the object code for calculating qx=int(a×mb÷m) in said second process of the compiler is to make, when the product value of a×mb is stored by double precision in a higher rank register and lower rank register, the value registered in the higher rank register qx.

3. The system according to the claim 1 , wherein the integers a and b are signed integers, and, in said second process of the compiler, when both said integers a and b are negative, an object code for converting the signs of both a and b to positive is further generated, and when one of said integers a and b is negative, an object code for converting the negative sign of the integers to positive, and for adding a negative sign to a division result is further generated.

4. The microprocessor evaluation system according to the claim 1 , wherein said microprocessor is an evaluation microprocessor.

5. A system for executing an object code converted from a source program having an integer division, said system comprising:

a compiler having a program code, which, for a source program including an integer division calculation q=int(a÷b)(int( ) being a function which discards figures below decimal point in parentheses) for dividing integer a, which is expressed in N bits, by integer constant b inside a repetitive loop statement, causes a computer to execute a first process, for generating, outside of said loop statement, an object code which calculates mb=int(m÷b) (where m=2 N ) and stores the mb in a first register, and a second process for generating an object code, which calculates qx=int(a×mb÷m), calculates rx=a÷qx×b, set a quotient q to q=qx when rx<b, and set the quotient q to q=qx+1 when rx>=b; and

a microprocessor having an arithmetic circuit, which comprises said first register, a multiplier, an adder-subtractor and a divider, and which executes the object code generated by the compiler.

6. The system according to the claim 5 , wherein the object code for calculating qx=int(a×mb÷m) in said second process of the compiler is to make, when the product value of a×mb is stored by double precision in a higher rank register and lower rank register, the value registered in the higher rank register qx.

7. The system according to the claim 5 , wherein the integers a and b are signed integers, and, in said second process of the compiler, when both said integers a and b are negative, an object code for converting the signs of both a and b to positive is further generated, and when one of said integers a and b is negative, an object code for converting the negative sign of the integers to positive, and for adding a negative sign to a division result is further generated.

8. The microprocessor evaluation system according to the claim 5 , wherein said microprocessor is an evaluation microprocessor.

9. A system for executing an object code converted from a source program having an integer remainder calculation, said system comprising:

a compiler having program code, which, for a source program including an integer remainder calculation q=int(a mod b)(int( ) being a function which discards figures below decimal point in parentheses) for determining a reminder when integer a, which is expressed in N bits, is divided by integer constant b, causes a computer to execute a first process for calculating mb=int(m÷b) (where m=2 N ), and a second process for generating an object code, which stores the mb in a first register, calculates qx=int(a×mb÷m), calculates rx=a−qx×b, set a remainder r to r=rx when rx<b, and set the remainder r to r=rx−b when rx>=b; and

a microprocessor having an arithmetic circuit, which comprises said first register, a multiplier, and an adder-subtractor, and which executes the object code generated by the compiler.

10. The system according to the claim 9 , wherein the object code for calculating qx=int(a×mb÷m) in said second process of the compiler is to make, when the product value of a×mb is stored by double precision in a higher rank register and a lower rank register, the value registered in the higher rank register qx.

11. The system according to the claim 9 , wherein the integers a and b are signed integers, and, in said second process of the compiler, when both said integers a and b are negative, an object code for converting the signs of both a and b to positive is further generated, and when one of said integers a and b is negative, an object code for converting the negative sign of the integers to positive, and for adding a negative sign to a remainder calculation result is further generated.

12. The microprocessor evaluation system according to the claim 9 , wherein said microprocessor is an evaluation microprocessor.

13. A system for executing an object code converted from a source program having an integer remainder operation, said system having:

a compiler having program code, which, for a source program including an integer remainder calculation q=int(a mod b)(int( ) being a function which discards figures below decimal point in parentheses) for determining a reminder when integer a, which is expressed in N bits, is divided by integer constant b inside a repetitive loop statement, causes a computer to execute a first process, for generating, outside of said loop statement, an object code which calculates mb=int(m÷b) (where m=2 N ) and stores the mb in a first register, and a second process for generating, inside said loop statement, an object code, which calculates qx=int(a×mb÷m), calculates rx=a−qx×b, set a remainder r to r=rx when rx<b, and set the remainder r to r=rx−b when rx>=b; and

a microprocessor having an arithmetic circuit, which comprises said first register, a multiplier, an adder-subtractor and a divider, and which executes the object code generated by the compiler.

14. The system according to the claim 13 , wherein the object code for calculating qx=int(a×mb÷m) in said second process of the compiler is to make, when the product value of a×mb is stored by double precision in a higher rank register and a lower rank register, the value registered in the higher rank register qx.

15. The system according to the claim 13 , wherein the integers a and b are signed integers, and, in said second process of the compiler, when both said integers a and b are negative, an object code for converting the signs of both a and b to positive is further generated, and when one of said integers a and b is negative, an object code for converting the negative sign of the integers to positive, and for adding a negative sign to a remainder calculation result is further generated.

16. The microprocessor evaluation system according to the claim 13 , wherein said microprocessor is an evaluation microprocessor.

17. A compiler for converting a source program having an integer division to a microprocessor-executable object code, said compiler having a program code, which, for a source program including an integer division calculation q=int(a÷b)(int( ) being a function which discards figures below decimal point in parentheses) for dividing integer a, which is expressed in N bits, by integer constant b, causes a computer to execute:

a first process for calculating mb=int(m÷b) (where m=2 N); and

a second process for generating an object code, which stores the mb in a first register inside said microprocessor, calculates qx=int(a×mb+m), calculates rx=a−qx×b, set a quotient q to q=qx when rx<b, and set the quotient q to q=qx+1 when rx>=b.

18. A compiler for converting a source program having an integer division to a microprocessor-executable object code, said compiler having a program code, which, for a source program including an integer division calculation q=int(a÷b)(int( ) being a function which discards figures below decimal point in parentheses) for dividing integer a, which is expressed in N bits, by integer constant b inside a repetitive loop statement, causes a computer to execute:

a first process, which generates, outside said loop statement, an object code for calculating mb=int(m÷b) (where m=2 N ) and for storing the mb in a first register; and

a second process, which generates, inside said loop statement, an object code for calculating qx=int(a×mb÷m), calculating rx=a−qx×b, setting a quotient q to q=qx when rx<b, and setting the quotient q to q=qx+1 when rx>=b.

19. A compiler for converting a source program having an integer remainder calculation to a microprocessor-executable object code, said compiler having a program code, which, for a source program including an integer remainder calculation q=int(a mod b)(int( ) being a function which discards figures below decimal point in parentheses) for determining a reminder when integer a, which is expressed in N bits, is divided by integer constant b, causes a computer to execute:

a first process for calculating mb=int(m÷b) (where m=2 N ); and

a second process for generating an object code, which stores the mb in a first register, calculates qx=int(a×mb÷m), calculates rx=a−qx×b, set a remainder r to r=rx when rx<b, and set the remainder r to r=rx−b when rx>=b.

20. A compiler for converting a source program having an integer remainder calculation to a microprocessor-executable object code, said compiler having a program code, which, for a source program including an integer remainder calculation q=int(a mod b)(int( ) being a function which discards figures below decimal point in parentheses) for determining a reminder when integer a, which is expressed in N bits, is divided by integer constant b inside a repetitive loop statement, causes a computer to execute:

a first process, which generates, outside said loop statement, an object code for calculating mb=int(m÷b) (where m=2 N ) and for storing the mb in a first register; and

a second process, which generates, inside said loop statement, an object code for calculating qx=int(a×mb÷m), calculating rx=a−qx−b, setting a remainder r to r=rx when rx<b, and setting the remainder r to r=rx−b when rx>=b.

21. A microprocessor for executing an object code converted by a compiler from a source program having integer division, said microprocessor comprising:

a memory which, for a source program including an integer division calculation q=int(a÷b)(int( ) being a function which discards figures below decimal point in parentheses) for dividing integer a, which is expressed in N bits, by integer constant b, stores an object code for causing a computer to store mb=int(m÷b) (where m=2 N ) in a first register, calculate qx=int(a×mb÷m), calculate rx=a−qx×b, set a quotient q to q=qx when rx<b, and set the quotient q to q =qx+1 when rx>=b; and

an arithmetic circuit, which comprises said first register, a multiplier, and an adder-subtractor, and which executes said object code inside said memory.

22. A microprocessor for executing an object code converted by a compiler from a source program having an integer division, said microprocessor comprising:

a memory which stores, for a source program including an integer division calculation q=int(a÷b)(int( ) being a function which discards figures below decimal point in parentheses) for dividing integer a, which is expressed in N bits, by integer constant b inside a repetitive loop statement, an object code which is embedded outside said loop statement, causes a computer to calculate mb=int(m÷b) (where m=2 N ), and store the mb in a first register, and an object code, which is embedded inside said loop statement, and which causes a computer to calculate qx=int(a×mb÷m), calculate rx=a−qx×b, set a quotient q to q=qx when rx<b, and set the quotient q to q=qx+1 when rx>=b; and

an arithmetic circuit, which comprises said first register, a multiplier, an adder-subtractor and a divider, and which executes said object codes inside said memory.

23. A microprocessor for executing an object code converted by a compiler from a source program having an integer remainder calculation, said microprocessor comprising:

a memory which stores, for a source program including an integer remainder calculation q=int(a mod b)(int( ) being a function which discards figures below decimal point in parentheses) for determining a reminder when integer a, which is expressed in N bits, is divided by integer constant b, an object code for causing a computer to store mb=int(m÷b) (where m=2 N ) in a first register, calculate qx=int(a×mb÷m), calculate rx=a−qx×b, set a remainder r to r=rx when rx<b, and set the remainder r to r=rx−b when rx>=b; and

an arithmetic circuit, which comprises said first register, a multiplier, and an adder-subtractor, and which executes said object code inside said memory.

24. A microprocessor for executing an object code converted by a compiler from a source program having an integer remainder calculation, said microprocessor comprising:

a memory which stores, for a source program including an integer remainder calculation q=int(a mod b)(int( ) being a function which discards figures below decimal point in parentheses) for determining a reminder when integer a, which is expressed in N bits, is divided by integer constant b inside a repetitive loop statement, an object code which is embedded outside said loop statement, causes a computer to calculate mb=int(m÷b) (where m=2 N ), and store the mb in a first register, and an object code which is embedded inside said loop statement, and which causes a computer to calculate qx=int(a×mb ÷m), calculate rx=a÷qx×b, set a remainder r to r=rx when rx<b, and set the remainder r to r=rx−b when rx>=b; and

an arithmetic circuit, which comprises said first register, a multiplier, an adder-subtractor and a divider, and which executes said object codes inside said memory.

25. A microprocessor system for executing an object code converted by a compiler from a source program having integer division, said microprocessor system comprising:

a memory which stores, for a source program including an integer division calculation q=int(a÷b)(int( ) being a function which discards figures below decimal point in parentheses) for dividing integer a, which is expressed in N bits, by integer constant b, an object code causing a computer to store mb=int(m÷b) (where m=2 N ) in a first register, calculate qx=int(a×mb÷m), calculate rx=a−qx×b, set a quotient q to q=qx when rx<b, and set the quotient q to q=qx+1 when rx>=b; and

a microprocessor having an arithmetic circuit which comprises said first register, a multiplier, and an adder-subtractor, and which executes said object code inside said memory.

26. A microprocessor system for executing an object code converted by a compiler from a source program having an integer division, said microprocessor system comprising:

a memory which stores, for a source program including an integer division calculation q=int(a÷b)(int( ) being a function which discards figures below decimal point in parentheses) for dividing integer a, which is expressed in N bits, by integer constant b inside a repetitive loop statement, an object code which is embedded outside said loop statement, causes a computer to calculate mb=int(m÷b) (where m=2 N ), and store the mb in a first register, and an object code which is embedded inside said loop statement, and which causes a computer to calculate qx=int(a×mb÷m), calculate rx=a−qx×b, set a quotient q to q=qx when rx<b, and sets the quotient q to q=qx+1 when rx>=b; and

a microprocessor having an arithmetic circuit which comprises said first register, a multiplier, an adder-subtractor and a divider, and which executes said object codes inside said memory.

27. A microprocessor system for executing an object code converted by a compiler from a source program having an integer remainder calculation, said microprocessor system comprising:

a memory which stores, for a source program including an integer remainder calculation q=int(a mod b)(int( ) being a function which discards figures below decimal point in parentheses) for determining a reminder when integer a, which is expressed in N bits, is divided by integer constant b, an object code for causing a computer to store mb=int(m÷b) (where m=2 N ) in a first register, calculate qx=int(a×mb÷m), calculate rx=a−qx×b, set a remainder r to r=rx when rx<b, and set the remainder r to r=rx−b when rx>=b; and

a microprocessor having an arithmetic circuit which comprises said first register, a multiplier, and an adder-subtractor, and which executes said object code inside said memory.

28. A microprocessor system for executing an object code converted by a compiler from a source program having an integer remainder calculation, said microprocessor system having:

a memory which stores, for a source program including an integer remainder calculation q=int(a mod b)(int( ) being a function which discards figures below decimal point in parentheses) for determining a reminder when integer a, which is expressed in N bits, is divided by integer constant b inside a repetitive loop statement, an object code which is embedded outside said loop statement, causes a computer to calculate mb=int(m÷b) (where m=2 N ), and store the mb in a first register, and an object code which is embedded inside said loop statement, and which causes a computer to calculate qx=int(a×mb÷m), calculate rx=a−qx×b, set a remainder r to r=rx when rx<b, and set the remainder r to r=rx−b when rx>=b; and

a microprocessor having an arithmetic circuit, which comprises said first register, a multiplier, an adder-subtractor and a divider, and which executes said object codes inside said memory.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 27, 2015
From: FUJITSU SEMICONDUCTOR LIMITED
To: SOCIONEXT INC.
Reel/Frame 035507/0923 →