摘要 |
A computer program contains an "isize" directive, in the body of the program or as a field in the program header, indicative of the required bit size I for integers used by that program. A processor can perform integer operations on integers having up to a particular number N of bits as "elementary" operations, and on integers having a larger number of bits as "complex" operations. The processor is programmed to determine from I and N whether to perform integer operations required by the program as elementary operations or complex operations. If an isize directive is not included, a default value of, say, 32 is assumed. Without the isize directive, complex operations would be performed by all processors having a natural word length of less than 32 bits. However, if a programmer requires a bit size of only, say, 16 bits, this can be specified in the isize directive, and as a result processors having a natural word length of between 16 and 31 bits would also be able to perform integer operations required by that program as elementary operations. The isize directive may be global, or on a per routine, per integer, or per expression basis.
|