1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/xre/nsSigHandlers.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__i386) || defined(__amd64__) 1.10 + 1.11 +/* 1.12 + * x87 FPU Control Word: 1.13 + * 1.14 + * 0 -> IM Invalid Operation 1.15 + * 1 -> DM Denormalized Operand 1.16 + * 2 -> ZM Zero Divide 1.17 + * 3 -> OM Overflow 1.18 + * 4 -> UM Underflow 1.19 + * 5 -> PM Precision 1.20 + */ 1.21 +#define FPU_EXCEPTION_MASK 0x3f 1.22 + 1.23 +/* 1.24 + * x86 FPU Status Word: 1.25 + * 1.26 + * 0..5 -> Exception flags (see x86 FPU Control Word) 1.27 + * 6 -> SF Stack Fault 1.28 + * 7 -> ES Error Summary Status 1.29 + */ 1.30 +#define FPU_STATUS_FLAGS 0xff 1.31 + 1.32 +/* 1.33 + * MXCSR Control and Status Register: 1.34 + * 1.35 + * 0..5 -> Exception flags (see x86 FPU Control Word) 1.36 + * 6 -> DAZ Denormals Are Zero 1.37 + * 7..12 -> Exception mask (see x86 FPU Control Word) 1.38 + */ 1.39 +#define SSE_STATUS_FLAGS FPU_EXCEPTION_MASK 1.40 +#define SSE_EXCEPTION_MASK (FPU_EXCEPTION_MASK << 7) 1.41 + 1.42 +#endif