Methods and apparatus for handling and storing bi-endian...

Electrical computers: arithmetic processing and calculating – Electrical digital calculating computer – Particular function performed

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C712S222000

Reexamination Certificate

active

06212539

ABSTRACT:

FIELD OF THE INVENTION
This invention relates to the architecture of a floating-point unit in a computer and, more particularly, to methods and apparatus for handling and storing bi-endian words in a floating-point processor.
BACKGROUND OF THE INVENTION
Floating-point units for performing floating arithmetic in a computer typically include a floating-point computation unit, a set of floating-point registers for holding operands, intermediate results and the like, and a floating-point status register. The floating-point computation unit is typically pipelined so that different operations of different floating-point calculations may be performed simultaneously. The floating-point status register includes control information, such as precision control and rounding control, that controls the floating-point calculation. In addition, the floating-point status register includes flag information, such as overflow and zero divide flags which record exceptions that occurred during a floating-point calculation.
Floating-point units are typically configured for compliance with ANSI/IEEE floating-point standard no. 754-1985. This standard specifies floating-point data types, various arithmetic and other operations, and handling of exceptions. It is desirable to provide a floating-point unit which meets the IEEE floating-point standard in all respects and which has additional features that overcome drawbacks in the prior art and thereby enhance performance.
The conventional floating-point status register is a hardware register that contains control information and flag information as described above. The control information is set by software, and the flag information is set in response to execution of a floating-point calculation. Conventionally, the control information is modified by copying the contents of the floating-point status register to a general purpose register, modifying the contents of the general purpose register and then writing the contents of the general purpose register back to the floating-point status register. The flag information in the floating-point status register may be cleared in a similar manner. Thus, the operations of updating control information and clearing flag information are relatively time-consuming. Furthermore, when the control information in the floating-point status register is updated, it is necessary to flush the pipelined floating-point computation unit, thereby aborting partially completed calculations and degrading performance. Because of these drawbacks, frequent updating of the floating-point status register is typically avoided.
The execution of speculative operations is a known technique for enhancing processor performance. In order to maximize utilization of a processor, instructions that appear later in a program may be scheduled for execution in parallel with earlier instructions, if the operands necessary for execution are available. Because branch instructions are usually present in the program, it may not be possible to determine in advance whether an instruction will require execution. However, if resources of the processor are otherwise idle, the performance of the processor may be improved by executing instructions speculatively, even though execution of those instructions may later be determined to be unnecessary. Execution of an instruction that follows a branch instruction before execution of the branch instruction is known as speculative execution. If the program ultimately requires execution of the instruction that was executed speculatively, an improvement in performance is obtained. If execution of the speculative instruction is not required, the result is discarded.
The floating-point status register contains flag information in the form of flag bits, or simply “flags”. The flags record exceptions that occur during execution of a floating-point calculation. Exceptions may also create interruptions. In the case of speculative execution, it is undesirable to report an exception immediately because the result of the speculative execution may later be discarded. Nonetheless, floating-point units typically handle flags for speculative operations in the same manner as nonspeculative operations.
One of the exceptions that is recorded in the flag information is an overflow exception, where the exponent in the result of the calculation is outside a specified range. The range may be established by the memory format used to store floating-point numbers or by the user of the result. However, the floating-point unit may have the capability of handling floating-point numbers which are outside the range that causes the reporting of an overflow exception. This may give rise to the reporting of overflow exceptions unnecessarily. For example, floating-point calculations typically involve several operations. In certain calculations, the result of an intermediate operation may produce an overflow exception, even though the final result would not produce an overflow exception if the calculation was permitted to continue. It is desirable to avoid reporting exceptions unnecessarily, since execution may be delayed or terminated.
Another aspect of handling floating numbers during floating-point calculations relates to “big endian” and “little endian” formats. In big endian format, a data word is stored in memory with its most significant byte corresponding to the most significant byte of the memory word. In little endian format, a data word is stored in memory with its least significant byte corresponding to the most significant byte of the memory word. A processor may be required to handle both formats efficiently.
It is desirable to provide floating-point architectures which alleviate or eliminate one or more of the above-described drawbacks.
SUMMARY OF THE INVENTION
According to a first aspect of the invention, a method is provided for handling and storing floating-point numbers in a computer comprising a floating-point computation unit, a memory and floating-point registers. Floating-point numbers are held in the floating-point registers in a register format wherein each of the floating-point numbers includes a sign, an exponent and a significand. Each of the floating-point numbers in the register format has more bytes than a word in the memory. In response to a first state of an endian control bit, a floating-point number is stored in first and second consecutive memory words in big endian format such that the sign and the exponent are entirely contained in the first memory word and the significand is entirely contained in the second memory word. In response to a second state of the endian control bit, a floating-point number is stored in the first and second consecutive memory words in little endian format such that the significand is entirely contained in the first memory word, and the sign and the exponent are entirely contained in the second memory word. The floating-point numbers are preferably stored without conversion from the register format.
The step of storing a floating-point number in big endian format may include storing zeros in the most significant byte locations of the memory word containing the exponent and the sign. The step of storing a floating-point number in little endian format may include storing zeros in the least significant byte locations of the memory word containing the exponent and the sign.
According to another aspect of the invention, apparatus is provided for handling and storing floating-point numbers. The apparatus comprises a computer including a floating-point computation unit, a memory and floating-point registers. The apparatus further comprises means for holding floating-point numbers in the floating-point registers in a register format wherein each of the floating-point numbers includes a sign, an exponent and a significand. Each of the floating-point numbers in the register format has more bytes than a word in the memory. The apparatus may further comprise means responsive to a first state of an endian control bit for storing a floating-point number in first and second consecutive memory words in big e

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

Methods and apparatus for handling and storing bi-endian... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Methods and apparatus for handling and storing bi-endian..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Methods and apparatus for handling and storing bi-endian... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2546527

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