Jump to content

FPREG

From EDM2
Revision as of 16:42, 30 October 2011 by Martini (talk | contribs)

FPREG

Coprocessor stack register element.

Type

ULONG  losig
ULONG  hisig
USHORT signexp

C Declaration Method

typedef struct

Fields

losig   Low 32-bits of the significand.
        The low 32-bits of the number's significant digits are held in the
        lower part of the significand field.

hisig   High 32-bits of the significand.
        The high 32-bits of the number's significant digits are held in the
        higher part of the significand field.

signexp Sign and exponent.
        The exponent field (bits 64-78) locates the binary point within the
        significand field (bits 0-63).
        The 1-bit sign field (bit 79) indicates whether the number is positive 
        or negative 
 

Comment

A floating point register is 80 bits wide and consists of three fields. The
following graphic shows the layout of the floating point register: 


  79  78         64 63                                     0
  ┌───┬────────────┬───────────────────────────────────────┐
  │   │            │             Significand               │
  └─┬─┴──────┬─────┴───────────────────────────────────────┘
    │        │
    │        Exponent
   Sign


Back to OS/2 API