www.delorie.com/djgpp/doc/libc/libc_668.html   search  
libc.a reference

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

save_npx

Syntax

 
#include <debug/dbgcom.h>

extern NPX npx;
void save_npx (void);

Description

This function saves the state of the x87 numeric processor 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;

save_npx should be called immediately before run_child (see section run_child) is called to begin or resume the debugged program.

To restore the x87 state when control is returned to the debugger, call load_npx, see load_npx.

Portability

ANSI/ISO C No
POSIX No

Example

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


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004