delorie.com/djgpp/doc/libc/libc_536.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

load_npx

Syntax

 
#include <debug/dbgcom.h>

extern NPX npx;
void load_npx (void);

Description

This function restores the state of the x87 numeric processor from the data saved in the external variable npx. This variable is a structure defined as follows in the header `debug/dbgcom.h':

 
typedef struct {
  unsigned short sig0;
  unsigned short sig1;
  unsigned short sig2;
  unsigned short sig3;
  unsigned short exponent:15;
  unsigned short sign:1;
} NPXREG;

typedef struct {
  unsigned long control;
  unsigned long status;
  unsigned long tag;
  unsigned long eip;
  unsigned long cs;
  unsigned long dataptr;
  unsigned long datasel;
  NPXREG reg[8];
  long double st[8];
  char st_valid[8];
  long double mmx[8];
  char in_mmx_mode;
  char top;
} NPX;

load_npx should be called immediately after run_child (see section run_child) is called to begin or resume the debugged program, and provided that a call to save_npx was issued before run_child was called. See section save_npx.

Portability

ANSI/ISO C No
POSIX No

Example

 
 save_npx ();
 run_child ();
 load_npx ();


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004