Bug 439685 compiler warning in callgrind/main.c
[valgrind.git] / VEX / priv / s390_disasm.h
blobeec41f8ac55f43de88283d22189640ecad8105f1
1 /* -*- mode: C; c-basic-offset: 3; -*- */
3 /*---------------------------------------------------------------*/
4 /*--- begin s390_disasm.h ---*/
5 /*---------------------------------------------------------------*/
7 /*
8 This file is part of Valgrind, a dynamic binary instrumentation
9 framework.
11 Copyright IBM Corp. 2010-2017
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
18 This program is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, see <http://www.gnu.org/licenses/>.
26 The GNU General Public License is contained in the file COPYING.
29 #ifndef __VEX_S390_DISASM_H
30 #define __VEX_S390_DISASM_H
32 #include "libvex_basictypes.h"
34 /* Macros to encode a command for s390_disasm. */
35 #undef P
36 #define P(a) (S390_ARG_##a)
37 #undef ENC1
38 #define ENC1(a) ((P(DONE) << 4) | P(a))
39 #undef ENC2
40 #define ENC2(a,b) ((P(DONE) << 8) | (P(b) << 4) | P(a))
41 #undef ENC3
42 #define ENC3(a,b,c) ((P(DONE) << 12) | (P(c) << 8) | (P(b) << 4) | P(a))
43 #undef ENC4
44 #define ENC4(a,b,c,d) ((P(DONE) << 16) | (P(d) << 12) | (P(c) << 8) | \
45 (P(b) << 4) | P(a))
46 #undef ENC5
47 #define ENC5(a,b,c,d,e) ((P(DONE) << 20) | (P(e) << 16) | (P(d) << 12) | \
48 (P(c) << 8) | (P(b) << 4) | P(a))
49 #undef ENC6
50 #define ENC6(a,b,c,d,e,f) ((P(DONE) << 24) | (P(f) << 20) | (P(e) << 16) | \
51 (P(d) << 12) | (P(c) << 8) | (P(b) << 4) | P(a))
52 #undef ENC7
53 #define ENC7(a,b,c,d,e,f,g) ((P(DONE) << 28) | (P(g) << 24) | (P(f) << 20) | \
54 (P(e) << 16) | (P(d) << 12) | (P(c) << 8) | \
55 (P(b) << 4) | P(a))
57 /* The different kinds of operands in an asm insn */
58 enum {
59 S390_ARG_DONE = 0,
60 S390_ARG_GPR = 1,
61 S390_ARG_FPR = 2,
62 S390_ARG_AR = 3,
63 S390_ARG_INT = 4,
64 S390_ARG_UINT = 5,
65 S390_ARG_PCREL = 6,
66 S390_ARG_SDXB = 7,
67 S390_ARG_UDXB = 8,
68 S390_ARG_UDLB = 9,
69 S390_ARG_CABM = 10,
70 S390_ARG_MNM = 11,
71 S390_ARG_XMNM = 12,
72 S390_ARG_VR = 13,
73 S390_ARG_UDVB = 14,
76 /* The different kinds of extended mnemonics */
77 enum {
78 S390_XMNM_CAB = 0,
79 S390_XMNM_BCR = 1,
80 S390_XMNM_BC = 2,
81 S390_XMNM_BRC = 3,
82 S390_XMNM_BRCL = 4,
83 S390_XMNM_LOCR = 5,
84 S390_XMNM_LOCGR = 6,
85 S390_XMNM_LOC = 7,
86 S390_XMNM_LOCG = 8,
87 S390_XMNM_STOC = 9,
88 S390_XMNM_STOCG = 10,
89 S390_XMNM_STOCFH = 11,
90 S390_XMNM_LOCFH = 12,
91 S390_XMNM_LOCFHR = 13,
92 S390_XMNM_LOCHI = 14,
93 S390_XMNM_LOCGHI = 15,
94 S390_XMNM_LOCHHI = 16,
95 S390_XMNM_BIC = 17
98 void s390_disasm(UInt command, ...);
100 /*---------------------------------------------------------------*/
101 /*--- end s390_disasm.h ---*/
102 /*---------------------------------------------------------------*/
104 #endif /* __VEX_S390_DISASM_H */