|
1 /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__i386) || defined(__amd64__) |
|
7 |
|
8 /* |
|
9 * x87 FPU Control Word: |
|
10 * |
|
11 * 0 -> IM Invalid Operation |
|
12 * 1 -> DM Denormalized Operand |
|
13 * 2 -> ZM Zero Divide |
|
14 * 3 -> OM Overflow |
|
15 * 4 -> UM Underflow |
|
16 * 5 -> PM Precision |
|
17 */ |
|
18 #define FPU_EXCEPTION_MASK 0x3f |
|
19 |
|
20 /* |
|
21 * x86 FPU Status Word: |
|
22 * |
|
23 * 0..5 -> Exception flags (see x86 FPU Control Word) |
|
24 * 6 -> SF Stack Fault |
|
25 * 7 -> ES Error Summary Status |
|
26 */ |
|
27 #define FPU_STATUS_FLAGS 0xff |
|
28 |
|
29 /* |
|
30 * MXCSR Control and Status Register: |
|
31 * |
|
32 * 0..5 -> Exception flags (see x86 FPU Control Word) |
|
33 * 6 -> DAZ Denormals Are Zero |
|
34 * 7..12 -> Exception mask (see x86 FPU Control Word) |
|
35 */ |
|
36 #define SSE_STATUS_FLAGS FPU_EXCEPTION_MASK |
|
37 #define SSE_EXCEPTION_MASK (FPU_EXCEPTION_MASK << 7) |
|
38 |
|
39 #endif |