* ppc-opc.c (powerpc_opcodes) <"lswx">: Use RAX for the second and
[binutils-gdb.git] / gdb / common / i386-xstate.h
blob56a4d8fb6bdd5d319c03b04c2f78dadc570e21db
1 /* Common code for i386 XSAVE extended state.
3 Copyright (C) 2010-2012 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #ifndef I386_XSTATE_H
21 #define I386_XSTATE_H 1
23 /* The extended state feature bits. */
24 #define I386_XSTATE_X87 (1ULL << 0)
25 #define I386_XSTATE_SSE (1ULL << 1)
26 #define I386_XSTATE_AVX (1ULL << 2)
28 /* Supported mask and size of the extended state. */
29 #define I386_XSTATE_X87_MASK I386_XSTATE_X87
30 #define I386_XSTATE_SSE_MASK (I386_XSTATE_X87 | I386_XSTATE_SSE)
31 #define I386_XSTATE_AVX_MASK (I386_XSTATE_SSE_MASK | I386_XSTATE_AVX)
33 #define I386_XSTATE_SSE_SIZE 576
34 #define I386_XSTATE_AVX_SIZE 832
35 #define I386_XSTATE_MAX_SIZE 832
37 /* Get I386 XSAVE extended state size. */
38 #define I386_XSTATE_SIZE(XCR0) \
39 (((XCR0) & I386_XSTATE_AVX) != 0 \
40 ? I386_XSTATE_AVX_SIZE : I386_XSTATE_SSE_SIZE)
42 #endif /* I386_XSTATE_H */