Methods and apparatus for compiling instructions for a data processor
First Claim
1. A method of register allocation for use by a pipelined digital processor having a mixed-length instruction set architecture, the method executed by the processor and comprising:
- storing data in a register from a first set of registers, the first set of registers associated with a first instruction set of a first length;
evaluating, using graph theory, whether spilling of the register from the first set of registers to a second set of registers is required, the second set of registers associated with a second instruction set of a second length; and
responsive to evaluating that spilling is required, reassigning the data in the register from the first set of registers to a register from the second set of registers.
2 Assignments
0 Petitions
Accused Products
Abstract
Methods and apparatus optimized for compiling instructions in a data processor are disclosed. In one aspect, a method of address calculation is disclosed, comprising operating a compiler to generate at least one instruction; canonicalizing the address calculation in a plurality of different approaches: in one exemplary embodiment, the first approach comprises canonicalizing the “regular” 32-bit instruction addressing modes, and the second for the “compressed” 16-bit instruction addressing modes. In another aspect, a plurality of functions (up to and including all available functions) are called indirectly to allow addresses to be placed in a constant pool. Improved methods for instruction selection, register allocation and spilling, and instruction compression are provided. An improved SoC integrated circuit device having an optimized 32-bit/16-bit processor core implementing at least one of the foregoing improvements is also disclosed.
125 Citations
20 Claims
-
1. A method of register allocation for use by a pipelined digital processor having a mixed-length instruction set architecture, the method executed by the processor and comprising:
-
storing data in a register from a first set of registers, the first set of registers associated with a first instruction set of a first length; evaluating, using graph theory, whether spilling of the register from the first set of registers to a second set of registers is required, the second set of registers associated with a second instruction set of a second length; and responsive to evaluating that spilling is required, reassigning the data in the register from the first set of registers to a register from the second set of registers. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A digital processor having a mixed-length instruction set architecture, the processor comprising:
-
a first set of registers associated with a first instruction set of a first length; and a second set of registers associated with a second instruction set of a second length; wherein data stored in a register from the first set of registers is reassigned to a register from the second set of registers responsive to evaluating that spilling is required. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification