Browse Prior Art Database

Method to Convert Integer Data into Floating Point Data

IP.com Disclosure Number: IPCOM000112281D
Original Publication Date: 1994-Apr-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 54K

Publishing Venue

IBM

Related People

Karim, FO: AUTHOR [+4]

Abstract

It is sometimes necessary for a floating point processor to use the same data which is being used by a fixed point processor. Before this integer data can be used by the floating point processor, the data must be altered and loaded into a register file the floating point processor can access.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 53% of the total text.

Method to Convert Integer Data into Floating Point Data

      It is sometimes necessary for a floating point processor to use
the same data which is being used by a fixed point processor.  Before
this integer data can be used by the floating point processor, the
data must be altered and loaded into a register file the floating
point processor can access.

      The method of converting integer data into a floating point
format used in the implementation of the RS/6000* is shown below:

   Cycle      Instruction

  -------    ---------------------------------------------

     1        cau     R0, 0x4330 (load hex constant 4330 into GPR)

     2        xoriu   R3, 0x8000 (invert the sign bit)

     3        st      R0, WA     (store the constant to memory)

     4        st      R3, WA   (store R3 to the adjacent memory
                                    location)

     5        lfd     F0, WA     (load both words into the FPR)

              lfd  F1, 0x43300000 80000000 (load predefined constant)

      A new method is devised to improve performance when it is
necessary to convert integer data into a format the floating point
processor can understand.  Two new instructions are invented; they
are Convert to Sign-Magnitude (csmag) and Load Floating Point
Unnormal (lfun).  Csmag takes the absolute value of the integer and
replaces the high...