GDB (API)
/home/stan/gdb/src/gdb/common/i386-xstate.h
Go to the documentation of this file.
00001 /* Common code for i386 XSAVE extended state.
00002 
00003    Copyright (C) 2010-2013 Free Software Foundation, Inc.
00004 
00005    This file is part of GDB.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 3 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00019 
00020 #ifndef I386_XSTATE_H
00021 #define I386_XSTATE_H 1
00022 
00023 /* The extended state feature bits.  */
00024 #define I386_XSTATE_X87         (1ULL << 0)
00025 #define I386_XSTATE_SSE         (1ULL << 1)
00026 #define I386_XSTATE_AVX         (1ULL << 2)
00027 
00028 /* Supported mask and size of the extended state.  */
00029 #define I386_XSTATE_X87_MASK    I386_XSTATE_X87
00030 #define I386_XSTATE_SSE_MASK    (I386_XSTATE_X87 | I386_XSTATE_SSE)
00031 #define I386_XSTATE_AVX_MASK    (I386_XSTATE_SSE_MASK | I386_XSTATE_AVX)
00032 
00033 #define I386_XSTATE_SSE_SIZE    576
00034 #define I386_XSTATE_AVX_SIZE    832
00035 #define I386_XSTATE_MAX_SIZE    832
00036 
00037 /* Get I386 XSAVE extended state size.  */
00038 #define I386_XSTATE_SIZE(XCR0)  \
00039   (((XCR0) & I386_XSTATE_AVX) != 0 \
00040    ? I386_XSTATE_AVX_SIZE : I386_XSTATE_SSE_SIZE)
00041 
00042 #endif /* I386_XSTATE_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines