Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../proc/self/root/usr/include
File: fpu_control.h
/* FPU control word bits. x86 version.
[0] Fix | Delete
Copyright (C) 1993-2018 Free Software Foundation, Inc.
[1] Fix | Delete
This file is part of the GNU C Library.
[2] Fix | Delete
Contributed by Olaf Flebbe.
[3] Fix | Delete
[4] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[5] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[6] Fix | Delete
License as published by the Free Software Foundation; either
[7] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[8] Fix | Delete
[9] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[10] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[11] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[12] Fix | Delete
Lesser General Public License for more details.
[13] Fix | Delete
[14] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[15] Fix | Delete
License along with the GNU C Library; if not, see
[16] Fix | Delete
<http://www.gnu.org/licenses/>. */
[17] Fix | Delete
[18] Fix | Delete
#ifndef _FPU_CONTROL_H
[19] Fix | Delete
#define _FPU_CONTROL_H 1
[20] Fix | Delete
[21] Fix | Delete
/* Note that this file sets on x86-64 only the x87 FPU, it does not
[22] Fix | Delete
touch the SSE unit. */
[23] Fix | Delete
[24] Fix | Delete
/* Here is the dirty part. Set up your 387 through the control word
[25] Fix | Delete
* (cw) register.
[26] Fix | Delete
*
[27] Fix | Delete
* 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0
[28] Fix | Delete
* | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM
[29] Fix | Delete
*
[30] Fix | Delete
* IM: Invalid operation mask
[31] Fix | Delete
* DM: Denormalized operand mask
[32] Fix | Delete
* ZM: Zero-divide mask
[33] Fix | Delete
* OM: Overflow mask
[34] Fix | Delete
* UM: Underflow mask
[35] Fix | Delete
* PM: Precision (inexact result) mask
[36] Fix | Delete
*
[37] Fix | Delete
* Mask bit is 1 means no interrupt.
[38] Fix | Delete
*
[39] Fix | Delete
* PC: Precision control
[40] Fix | Delete
* 11 - round to extended precision
[41] Fix | Delete
* 10 - round to double precision
[42] Fix | Delete
* 00 - round to single precision
[43] Fix | Delete
*
[44] Fix | Delete
* RC: Rounding control
[45] Fix | Delete
* 00 - rounding to nearest
[46] Fix | Delete
* 01 - rounding down (toward - infinity)
[47] Fix | Delete
* 10 - rounding up (toward + infinity)
[48] Fix | Delete
* 11 - rounding toward zero
[49] Fix | Delete
*
[50] Fix | Delete
* IC: Infinity control
[51] Fix | Delete
* That is for 8087 and 80287 only.
[52] Fix | Delete
*
[53] Fix | Delete
* The hardware default is 0x037f which we use.
[54] Fix | Delete
*/
[55] Fix | Delete
[56] Fix | Delete
#include <features.h>
[57] Fix | Delete
[58] Fix | Delete
/* masking of interrupts */
[59] Fix | Delete
#define _FPU_MASK_IM 0x01
[60] Fix | Delete
#define _FPU_MASK_DM 0x02
[61] Fix | Delete
#define _FPU_MASK_ZM 0x04
[62] Fix | Delete
#define _FPU_MASK_OM 0x08
[63] Fix | Delete
#define _FPU_MASK_UM 0x10
[64] Fix | Delete
#define _FPU_MASK_PM 0x20
[65] Fix | Delete
[66] Fix | Delete
/* precision control */
[67] Fix | Delete
#define _FPU_EXTENDED 0x300 /* libm requires double extended precision. */
[68] Fix | Delete
#define _FPU_DOUBLE 0x200
[69] Fix | Delete
#define _FPU_SINGLE 0x0
[70] Fix | Delete
[71] Fix | Delete
/* rounding control */
[72] Fix | Delete
#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
[73] Fix | Delete
#define _FPU_RC_DOWN 0x400
[74] Fix | Delete
#define _FPU_RC_UP 0x800
[75] Fix | Delete
#define _FPU_RC_ZERO 0xC00
[76] Fix | Delete
[77] Fix | Delete
#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */
[78] Fix | Delete
[79] Fix | Delete
[80] Fix | Delete
/* The fdlibm code requires strict IEEE double precision arithmetic,
[81] Fix | Delete
and no interrupts for exceptions, rounding to nearest. */
[82] Fix | Delete
[83] Fix | Delete
#define _FPU_DEFAULT 0x037f
[84] Fix | Delete
[85] Fix | Delete
/* IEEE: same as above. */
[86] Fix | Delete
#define _FPU_IEEE 0x037f
[87] Fix | Delete
[88] Fix | Delete
/* Type of the control word. */
[89] Fix | Delete
typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
[90] Fix | Delete
[91] Fix | Delete
/* Macros for accessing the hardware control word. "*&" is used to
[92] Fix | Delete
work around a bug in older versions of GCC. __volatile__ is used
[93] Fix | Delete
to support combination of writing the control register and reading
[94] Fix | Delete
it back. Without __volatile__, the old value may be used for reading
[95] Fix | Delete
back under compiler optimization.
[96] Fix | Delete
[97] Fix | Delete
Note that the use of these macros is not sufficient anymore with
[98] Fix | Delete
recent hardware nor on x86-64. Some floating point operations are
[99] Fix | Delete
executed in the SSE/SSE2 engines which have their own control and
[100] Fix | Delete
status register. */
[101] Fix | Delete
#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
[102] Fix | Delete
#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
[103] Fix | Delete
[104] Fix | Delete
/* Default control word set at startup. */
[105] Fix | Delete
extern fpu_control_t __fpu_control;
[106] Fix | Delete
[107] Fix | Delete
#endif /* fpu_control.h */
[108] Fix | Delete
[109] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function