Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:13:29

0001 
0002 /*---------------------------------------------------------------*/
0003 /*--- begin                                   libvex_emnote.h ---*/
0004 /*---------------------------------------------------------------*/
0005 
0006 /*
0007    This file is part of Valgrind, a dynamic binary instrumentation
0008    framework.
0009 
0010    Copyright (C) 2004-2017 OpenWorks LLP
0011       info@open-works.net
0012 
0013    This program is free software; you can redistribute it and/or
0014    modify it under the terms of the GNU General Public License as
0015    published by the Free Software Foundation; either version 2 of the
0016    License, or (at your option) any later version.
0017 
0018    This program is distributed in the hope that it will be useful, but
0019    WITHOUT ANY WARRANTY; without even the implied warranty of
0020    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0021    General Public License for more details.
0022 
0023    You should have received a copy of the GNU General Public License
0024    along with this program; if not, see <http://www.gnu.org/licenses/>.
0025 
0026    The GNU General Public License is contained in the file COPYING.
0027 
0028    Neither the names of the U.S. Department of Energy nor the
0029    University of California nor the names of its contributors may be
0030    used to endorse or promote products derived from this software
0031    without prior written permission.
0032 */
0033 
0034 #ifndef __LIBVEX_EMNOTE_H
0035 #define __LIBVEX_EMNOTE_H
0036 
0037 #include "libvex_basictypes.h"
0038 
0039 /* VEX can sometimes generate code which returns to the dispatcher
0040    with the guest state pointer set to VEX_TRC_JMP_EMWARN or 
0041    VEX_TRC_JMP_EMFAIL.  This means that VEX is trying to tell Valgrind
0042    something noteworthy about emulation progress. For example, that Valgrind
0043    is doing imprecise emulation in some sense.  The guest's pseudo-register
0044    "guest_EMNOTE" will hold a value of type VexEmNote, which describes
0045    the nature of the warning.  Currently the limitations that are
0046    warned about apply primarily to floating point support.
0047 
0048    All guest states must have a 32-bit (UInt) guest_EMNOTE pseudo-
0049    register, that emulation warnings can be written in to.
0050 
0051    Note that guest_EMNOTE only carries a valid value at the jump
0052    marked as VEX_TRC_JMP_EMWARN / VEX_TRC_JMP_EMFAIL.  You can't assume
0053    it will continue to carry a valid value from any amount of time after
0054    the jump.
0055 */
0056 
0057 typedef
0058    enum {
0059       /* no note indicated */
0060       EmNote_NONE=0,
0061 
0062       /* unmasking x87 FP exceptions is not supported */
0063       EmWarn_X86_x87exns,
0064 
0065       /* change of x87 FP precision away from 64-bit (mantissa) */
0066       EmWarn_X86_x87precision,
0067 
0068       /* unmasking SSE FP exceptions is not supported */
0069       EmWarn_X86_sseExns,
0070       
0071       /* setting mxcsr.fz is not supported */
0072       EmWarn_X86_fz,
0073       
0074       /* setting mxcsr.daz is not supported */
0075       EmWarn_X86_daz,
0076 
0077       /* settings to %eflags.ac (alignment check) are noted but ignored */
0078       EmWarn_X86_acFlag,
0079       
0080       /* unmasking PPC32/64 FP exceptions is not supported */
0081       EmWarn_PPCexns,
0082 
0083       /* overflow/underflow of the PPC64 _REDIR stack (ppc64 only) */
0084       EmWarn_PPC64_redir_overflow,
0085       EmWarn_PPC64_redir_underflow,
0086 
0087       /* insn specifies a rounding mode other than "according to FPC"
0088          which requires the floating point extension facility. But that
0089          facility is not available on this host */
0090       EmWarn_S390X_fpext_rounding,
0091 
0092       /* insn (e.g. srnmb) specifies an invalid rounding mode */
0093       EmWarn_S390X_invalid_rounding,
0094 
0095       /* stfle insn is not supported on this host */
0096       EmFail_S390X_stfle,
0097 
0098       /* stckf insn is not supported on this host */
0099       EmFail_S390X_stckf,
0100 
0101       /* ecag insn is not supported on this host */
0102       EmFail_S390X_ecag,
0103 
0104       /* pfpo insn is not supported on this host */
0105       EmFail_S390X_pfpo,
0106 
0107       /* DFP insns are not supported on this host */
0108       EmFail_S390X_DFP_insn,
0109 
0110       /* insn needs floating point extension facility which is not
0111          available on this host */
0112       EmFail_S390X_fpext,
0113 
0114       /* GPR 0 contains invalid rounding mode for PFPO instruction */
0115       EmFail_S390X_invalid_PFPO_rounding_mode,
0116 
0117       /* The function code specified in GPR 0 executed by PFPO
0118          instruction is invalid */
0119       EmFail_S390X_invalid_PFPO_function,
0120 
0121       /* some insn needs vector facility which is not available on this host */
0122       EmFail_S390X_vx,
0123 
0124       /* ppno insn is not supported on this host */
0125       EmFail_S390X_ppno,
0126 
0127       /* insn needs vector-enhancements facility which is not available on this
0128          host */
0129       EmFail_S390X_vxe,
0130 
0131       EmNote_NUMBER
0132    }
0133    VexEmNote;
0134 
0135 
0136 /* Produces a short string describing the warning. */
0137 extern const HChar* LibVEX_EmNote_string ( VexEmNote );
0138 
0139 
0140 #endif /* ndef __LIBVEX_EMNOTE_H */
0141 
0142 /*---------------------------------------------------------------*/
0143 /*---                                         libvex_emnote.h ---*/
0144 /*---------------------------------------------------------------*/