Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-11 08:41:35

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 3 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       /* Various BFP insns have an M4 field containing the
0093          IEEE-inexact-exception (XxC) control bit. That bit cannot me modelled
0094          in VEX and is expected to be zero. */
0095       EmWarn_S390X_XxC_not_zero,
0096 
0097       /* Various DFP insns have an M4 field containing the
0098          IEEE-invalid-operation (XiC) control bit. That bit cannot me modelled
0099          in VEX and is expected to be zero. */
0100       EmWarn_S390X_XiC_not_zero,
0101 
0102       /* stfle insn is not supported on this host */
0103       EmFail_S390X_stfle,
0104 
0105       /* stckf insn is not supported on this host */
0106       EmFail_S390X_stckf,
0107 
0108       /* ecag insn is not supported on this host */
0109       EmFail_S390X_ecag,
0110 
0111       /* pfpo insn is not supported on this host */
0112       EmFail_S390X_pfpo,
0113 
0114       /* DFP insns are not supported on this host */
0115       EmFail_S390X_DFP_insn,
0116 
0117       /* insn needs floating point extension facility which is not
0118          available on this host */
0119       EmFail_S390X_fpext,
0120 
0121       /* GPR 0 contains invalid rounding mode for PFPO instruction */
0122       EmFail_S390X_invalid_PFPO_rounding_mode,
0123 
0124       /* The function code specified in GPR 0 executed by PFPO
0125          instruction is invalid */
0126       EmFail_S390X_invalid_PFPO_function,
0127 
0128       /* some insn needs vector facility which is not available on this host */
0129       EmFail_S390X_vx,
0130 
0131       /* prno insn is not supported on this host */
0132       EmFail_S390X_prno,
0133 
0134       /* insn needs vector-enhancements facility 1 which is not available on
0135          this host */
0136       EmFail_S390X_vxe,
0137 
0138       /* insn needs deflate-conversion facility which is not available on
0139          this host */
0140       EmFail_S390X_dflt,
0141 
0142       /* insn needs neural-network-processing-assist facility which is not
0143          available on this host */
0144       EmFail_S390X_nnpa,
0145 
0146       /* insn needs vector-enhancements facility 2 which is not available on
0147          this host */
0148       EmFail_S390X_vxe2,
0149 
0150       /* insn needs vector-packed-decimal facility which is not available on
0151          this host */
0152       EmFail_S390X_vxd,
0153 
0154       /* insn needs message-security assist which is not available on
0155          this host */
0156       EmFail_S390X_msa,
0157 
0158       /* insn needs message-security-assist extension 4 which is not available
0159          on this host */
0160       EmFail_S390X_msa4,
0161 
0162       /* insn needs message-security-assist extension 8 which is not available
0163          on this host */
0164       EmFail_S390X_msa8,
0165 
0166       /* insn needs message-security-assist extension 9 which is not available
0167          on this host */
0168       EmFail_S390X_msa9,
0169 
0170       EmNote_NUMBER
0171    }
0172    VexEmNote;
0173 
0174 
0175 /* Produces a short string describing the warning. */
0176 extern const HChar* LibVEX_EmNote_string ( VexEmNote );
0177 
0178 
0179 #endif /* ndef __LIBVEX_EMNOTE_H */
0180 
0181 /*---------------------------------------------------------------*/
0182 /*---                                         libvex_emnote.h ---*/
0183 /*---------------------------------------------------------------*/