Method for saving register space in a conventional...

Electrical computers and digital data processing systems: input/ – Input/output data processing – Data transfer specifying

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C709S241000, C709S241000, C709S241000, C709S241000, C709S241000, C709S241000

Reexamination Certificate

active

06772240

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The invention relates to a method for saving register space, particularly to a method for saving register space in a conventional high-level function call process, which increases the utility of registers when a function call is coded by a high-level compiler, thus increasing the function call efficiency of a software program.
2. Description of Related Art
In a conventional high-level function call, parameters are methodically stored in specific registers in order to pass them to a callee, or methodically stored in a memory stack in order to pass them to the callee. To increase the cited performance, a high-level compiler commonly stores all or partial parameters in registers for passing to the callee, thus speeding call process.
Existing processors generally have multiple 32-bit registers. However, data types for operations are different in high-level languages. For example, data types exist comprising 8, 16 and 32 bits. One manner for increasing utility is to split a single register to several parts like an upper and lower word in some registers. For example, registers R
0
-R
7
in a Register File respectively have 32 bits, in which R
0
L representing lower 16 bits and R
0
H representing upper 16 bits can be operated separately. Thus, a high-level compiler generally selects R
0
for 32-bit data and R
0
L or R
0
H for 16-bit data. However, if the 32-bit data is stored in two registers such as R
0
H and R
1
L, the compiler cannot access both at a time and proceeds further in operation.
FIG. 1
is a schematic diagram of a conventional parameter placement for pass. As shown in
FIG. 1
, a conventional high-level compiler methodically places parameters Arg
1
, Arg
2
, and Arg
3
in registers when compiling program codes for a function call so that a waste of register space occurs. For example, data types for parameters Arg
1
, Arg
2
and Arg
3
respectively are 16, 32 and 16 bits. The 16-, 32- and 16-bit data are methodically stored in first, second and third 32-bit registers R
0
, R
1
and R
2
. As such, a total of 32 bits (R
0
H and R
2
H) are wasted. However, this problem will continue because the high-level compiler has to obey the predetermined rules to compile function calls to ensure exact coding between a callee and callee program.
SUMMARY OF THE INVENTION
Accordingly, an object of the invention is to provide a method for saving register space in a conventional high-level function call process, which increases the utility of registers when a function call is coded by a high-level compiler, thus increasing the function call efficiency of a software program.
The invention provides a method for saving register space in a conventional high-level function call process, which can place parameters from either of two ends of a sequence of registers for parameter pass, based on data length, thereby reducing register waste. The method includes methodically arranging a sequence of registers for parameter pass, sequentially naming every k bits in the sequence from left to right as a first group, sequentially naming every k/2 bits in the sequence from right to left as a second group, and sequentially placing input parameters with a width exceeding k/2 in the first group from left to right or conversely with a width less than or equal to k/2 in the second group from right to left.


REFERENCES:
patent: 4351024 (1982-09-01), Bradley et al.
patent: 4819155 (1989-04-01), Wulf et al.
patent: 5220669 (1993-06-01), Baum et al.
patent: 5487158 (1996-01-01), Amelina et al.
patent: 5659751 (1997-08-01), Heninger
patent: 5701489 (1997-12-01), Bates et al.
patent: 6029207 (2000-02-01), Heninger
patent: 6070010 (2000-05-01), Keenleyside et al.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method for saving register space in a conventional... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method for saving register space in a conventional..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method for saving register space in a conventional... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3286854

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.