2004-06-18 18:11:11 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
2009-10-15 00:45:29 +04:00
|
|
|
// $Id: control_w.h,v 1.12 2009-10-14 20:45:29 sshwarts Exp $
|
2005-03-21 00:19:38 +03:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
2004-06-18 18:11:11 +04:00
|
|
|
//
|
2009-10-15 00:45:29 +04:00
|
|
|
// Copyright (c) 2003-2009 Stanislav Shwartsman
|
2007-03-24 00:27:13 +03:00
|
|
|
// Written by Stanislav Shwartsman [sshwarts at sourceforge net]
|
2004-06-18 18:11:11 +04:00
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
2009-02-08 20:29:34 +03:00
|
|
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2004-06-18 18:11:11 +04:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef _CONTROL_W_H_
|
|
|
|
#define _CONTROL_W_H_
|
|
|
|
|
|
|
|
/* ************ */
|
|
|
|
/* Control Word */
|
|
|
|
/* ************ */
|
|
|
|
|
2008-05-06 01:23:33 +04:00
|
|
|
#define FPU_CW_Reserved_Bits (0xe0c0) /* reserved bits */
|
|
|
|
|
|
|
|
#define FPU_CW_Inf (0x1000) /* infinity control, legacy */
|
|
|
|
|
2004-06-18 18:11:11 +04:00
|
|
|
#define FPU_CW_RC (0x0C00) /* rounding control */
|
|
|
|
#define FPU_CW_PC (0x0300) /* precision control */
|
|
|
|
|
|
|
|
#define FPU_RC_RND (0x0000) /* rounding control */
|
|
|
|
#define FPU_RC_DOWN (0x0400)
|
|
|
|
#define FPU_RC_UP (0x0800)
|
|
|
|
#define FPU_RC_CHOP (0x0C00)
|
|
|
|
|
|
|
|
#define FPU_CW_Precision (0x0020) /* loss of precision mask */
|
|
|
|
#define FPU_CW_Underflow (0x0010) /* underflow mask */
|
|
|
|
#define FPU_CW_Overflow (0x0008) /* overflow mask */
|
|
|
|
#define FPU_CW_Zero_Div (0x0004) /* divide by zero mask */
|
|
|
|
#define FPU_CW_Denormal (0x0002) /* denormalized operand mask */
|
|
|
|
#define FPU_CW_Invalid (0x0001) /* invalid operation mask */
|
|
|
|
|
|
|
|
#define FPU_CW_Exceptions_Mask (0x003f) /* all masks */
|
|
|
|
|
|
|
|
/* Precision control bits affect only the following:
|
2001-04-10 05:04:59 +04:00
|
|
|
ADD, SUB(R), MUL, DIV(R), and SQRT */
|
2004-06-18 18:11:11 +04:00
|
|
|
#define FPU_PR_32_BITS (0x000)
|
|
|
|
#define FPU_PR_RESERVED_BITS (0x100)
|
|
|
|
#define FPU_PR_64_BITS (0x200)
|
|
|
|
#define FPU_PR_80_BITS (0x300)
|
|
|
|
|
|
|
|
#endif
|