Debian Codegraph @

arch/SystemZ/SystemZInstPrinter.c

raw symbols SCIP
1 //===-- SystemZInstPrinter.cpp - Convert SystemZ MCInst to assembly syntax --------===//cxx . . $ `<file>/arch/SystemZ/SystemZInstPrinter.c`/
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This class prints an SystemZ MCInst to a .s file.
11 //
12 //===----------------------------------------------------------------------===//
13
14 /* Capstone Disassembly Engine */
15 /* By Nguyen Anh Quynh <[email protected]>, 2013-2015 */
16
17 #ifdef CAPSTONE_HAS_SYSZcxx . . $ `<built-in>:419:9`!
18
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include <capstone/platform.h>cxx . . $ `<file>/include/capstone/platform.h`/
23
24 #include "SystemZInstPrinter.h"cxx . . $ `<file>/arch/SystemZ/SystemZInstPrinter.h`/
25 #include "../../MCInst.h"cxx . . $ `<file>/MCInst.h`/
26 #include "../../utils.h"cxx . . $ `<file>/utils.h`/
27 #include "../../SStream.h"cxx . . $ `<file>/SStream.h`/
28 #include "../../MCRegisterInfo.h"cxx . . $ `<file>/MCRegisterInfo.h`/
29 #include "../../MathExtras.h"cxx . . $ `<file>/MathExtras.h`/
30 #include "SystemZMapping.h"cxx . . $ `<file>/arch/SystemZ/SystemZMapping.h`/
31
32 static const char *getRegisterNamecxx . . $ getRegisterName(81a3ae90da26a711).(unsigned RegNo);
33
34 void SystemZ_post_printercxx . . $ SystemZ_post_printer(1e4eab0813f35322).(cshcxx . . $ csh# ud, cs_insncxx . . $ cs_insn# *insn, char *insn_asm, MCInstcxx . . $ MCInst# *mci)
35 {
36 /*
37 if (((cs_struct *)ud)->detail != CS_OPT_ON)
38 return;
39 */
40 }
41
42 static void printAddresscxx . . $ printAddress(13e66ea5455b1fd7).(MCInstcxx . . $ MCInst# *MI, unsigned Base, int64_tcxx . . $ int64_t# Disp, unsigned Index, SStreamcxx . . $ SStream# *O)
43 {
44 printInt64cxx . . $ printInt64(d5b67dadd92627cf).(O, Disp);
45
46 if (Base) {
47 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, "(");
48 if (Index)
49 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%%%s, ", getRegisterNamecxx . . $ getRegisterName(81a3ae90da26a711).(Index));
50 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%%%s)", getRegisterNamecxx . . $ getRegisterName(81a3ae90da26a711).(Base));
51
52 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
53 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_MEMcxx . . $ SYSZ_OP_MEM.;
54 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..basecxx . . $ sysz_op_mem#base. = (uint8_tcxx . . $ uint8_t#)SystemZ_map_registercxx . . $ SystemZ_map_register(3d471db7475e2fd4).(Base);
55 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..indexcxx . . $ sysz_op_mem#index. = (uint8_tcxx . . $ uint8_t#)SystemZ_map_registercxx . . $ SystemZ_map_register(3d471db7475e2fd4).(Index);
56 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..dispcxx . . $ sysz_op_mem#disp. = Disp;
57 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
58 }
59 } else if (!Index) {
60 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
61 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
62 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = Disp;
63 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
64 }
65 } else {
66 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "(%%%s)", getRegisterNamecxx . . $ getRegisterName(81a3ae90da26a711).(Index));
67 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
68 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_MEMcxx . . $ SYSZ_OP_MEM.;
69 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..basecxx . . $ sysz_op_mem#base. = (uint8_tcxx . . $ uint8_t#)SystemZ_map_registercxx . . $ SystemZ_map_register(3d471db7475e2fd4).(Base);
70 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..indexcxx . . $ sysz_op_mem#index. = (uint8_tcxx . . $ uint8_t#)SystemZ_map_registercxx . . $ SystemZ_map_register(3d471db7475e2fd4).(Index);
71 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..dispcxx . . $ sysz_op_mem#disp. = Disp;
72 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
73 }
74 }
75 }
76
77 static void _printOperandcxx . . $ _printOperand(38fa567fd85e5fad).(MCInstcxx . . $ MCInst# *MI, MCOperandcxx . . $ MCOperand# *MO, SStreamcxx . . $ SStream# *O)
78 {
79 if (MCOperand_isRegcxx . . $ MCOperand_isReg(8be14e8515538be0).(MO)) {
80 unsigned reg;
81
82 reg = MCOperand_getRegcxx . . $ MCOperand_getReg(2f0d38ead81b409a).(MO);
83 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%%%s", getRegisterNamecxx . . $ getRegisterName(81a3ae90da26a711).(reg));
84 reg = SystemZ_map_registercxx . . $ SystemZ_map_register(3d471db7475e2fd4).(reg);
85
86 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
87 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_REGcxx . . $ SYSZ_OP_REG.;
88 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].regcxx . . $ cs_sysz_op#$anonymous_type_0#reg. = reg;
89 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
90 }
91 } else if (MCOperand_isImmcxx . . $ MCOperand_isImm(8be14e8515538be0).(MO)) {
92 int64_tcxx . . $ int64_t# Imm = MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MO);
93
94 printInt64cxx . . $ printInt64(d5b67dadd92627cf).(O, Imm);
95
96 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
97 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
98 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = Imm;
99 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
100 }
101 }
102 }
103
104 static void printU1ImmOperandcxx . . $ printU1ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
105 {
106 int64_tcxx . . $ int64_t# Value = MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
107 // assert(isUInt<1>(Value) && "Invalid u1imm argument");
108 printInt64cxx . . $ printInt64(d5b67dadd92627cf).(O, Value);
109
110 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
111 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
112 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = Value;
113 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
114 }
115 }
116
117 static void printU2ImmOperandcxx . . $ printU2ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
118 {
119 int64_tcxx . . $ int64_t# Value = MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
120 // assert(isUInt<2>(Value) && "Invalid u2imm argument");
121 printInt64cxx . . $ printInt64(d5b67dadd92627cf).(O, Value);
122
123 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
124 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
125 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = Value;
126 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
127 }
128 }
129
130 static void printU3ImmOperandcxx . . $ printU3ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
131 {
132 int64_tcxx . . $ int64_t# Value = MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
133 // assert(isUInt<3>(Value) && "Invalid u4imm argument");
134 printInt64cxx . . $ printInt64(d5b67dadd92627cf).(O, Value);
135
136 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
137 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
138 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = Value;
139 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
140 }
141 }
142
143 static void printU4ImmOperandcxx . . $ printU4ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
144 {
145 int64_tcxx . . $ int64_t# Value = MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
146 // assert(isUInt<4>(Value) && "Invalid u4imm argument");
147 printInt64cxx . . $ printInt64(d5b67dadd92627cf).(O, Value);
148
149 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
150 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
151 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = Value;
152 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
153 }
154 }
155
156 static void printU6ImmOperandcxx . . $ printU6ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
157 {
158 uint32_tcxx . . $ uint32_t# Value = (uint32_tcxx . . $ uint32_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
159 // assert(isUInt<6>(Value) && "Invalid u6imm argument");
160
161 printUInt32cxx . . $ printUInt32(2cfdcacebbcb5657).(O, Value);
162
163 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
164 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
165 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = (int64_tcxx . . $ int64_t#)Value;
166 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
167 }
168 }
169
170 static void printS8ImmOperandcxx . . $ printS8ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
171 {
172 int8_tcxx . . $ int8_t# Value = (int8_tcxx . . $ int8_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
173 // assert(isInt<8>(Value) && "Invalid s8imm argument");
174
175 if (Value >= 0) {
176 if (Value > HEX_THRESHOLDcxx . . $ `utils.h:17:9`!)
177 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "0x%x", Value);
178 else
179 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%u", Value);
180 } else {
181 if (Value < -HEX_THRESHOLDcxx . . $ `utils.h:17:9`!)
182 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "-0x%x", -Value);
183 else
184 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "-%u", -Value);
185 }
186
187 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
188 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
189 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = (int64_tcxx . . $ int64_t#)Value;
190 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
191 }
192 }
193
194 static void printU8ImmOperandcxx . . $ printU8ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
195 {
196 uint8_tcxx . . $ uint8_t# Value = (uint8_tcxx . . $ uint8_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
197 // assert(isUInt<8>(Value) && "Invalid u8imm argument");
198
199 if (Value > HEX_THRESHOLDcxx . . $ `utils.h:17:9`!)
200 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "0x%x", Value);
201 else
202 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%u", Value);
203
204 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
205 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
206 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = (int64_tcxx . . $ int64_t#)Value;
207 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
208 }
209 }
210
211 static void printU12ImmOperandcxx . . $ printU12ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
212 {
213 int64_tcxx . . $ int64_t# Value = MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
214 // assert(isUInt<12>(Value) && "Invalid u12imm argument");
215 printInt64cxx . . $ printInt64(d5b67dadd92627cf).(O, Value);
216
217 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
218 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
219 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = Value;
220 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
221 }
222 }
223
224 static void printS16ImmOperandcxx . . $ printS16ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
225 {
226 int16_tcxx . . $ int16_t# Value = (int16_tcxx . . $ int16_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
227 // assert(isInt<16>(Value) && "Invalid s16imm argument");
228
229 if (Value >= 0) {
230 if (Value > HEX_THRESHOLDcxx . . $ `utils.h:17:9`!)
231 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "0x%x", Value);
232 else
233 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%u", Value);
234 } else {
235 if (Value < -HEX_THRESHOLDcxx . . $ `utils.h:17:9`!)
236 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "-0x%x", -Value);
237 else
238 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "-%u", -Value);
239 }
240
241 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
242 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
243 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = (int64_tcxx . . $ int64_t#)Value;
244 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
245 }
246 }
247
248 static void printU16ImmOperandcxx . . $ printU16ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
249 {
250 uint16_tcxx . . $ uint16_t# Value = (uint16_tcxx . . $ uint16_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
251 // assert(isUInt<16>(Value) && "Invalid u16imm argument");
252
253 if (Value > HEX_THRESHOLDcxx . . $ `utils.h:17:9`!)
254 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "0x%x", Value);
255 else
256 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%u", Value);
257
258 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
259 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
260 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = (int64_tcxx . . $ int64_t#)Value;
261 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
262 }
263 }
264
265 static void printS32ImmOperandcxx . . $ printS32ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
266 {
267 int32_tcxx . . $ int32_t# Value = (int32_tcxx . . $ int32_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
268 // assert(isInt<32>(Value) && "Invalid s32imm argument");
269
270 printInt32cxx . . $ printInt32(42251ac09f06cabf).(O, Value);
271
272 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
273 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
274 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = (int64_tcxx . . $ int64_t#)Value;
275 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
276 }
277 }
278
279 static void printU32ImmOperandcxx . . $ printU32ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
280 {
281 uint32_tcxx . . $ uint32_t# Value = (uint32_tcxx . . $ uint32_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
282 // assert(isUInt<32>(Value) && "Invalid u32imm argument");
283
284 printUInt32cxx . . $ printUInt32(2cfdcacebbcb5657).(O, Value);
285
286 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
287 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
288 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = (int64_tcxx . . $ int64_t#)Value;
289 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
290 }
291 }
292
293 static void printU48ImmOperandcxx . . $ printU48ImmOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
294 {
295 int64_tcxx . . $ int64_t# Value = MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
296 // assert(isUInt<48>(Value) && "Invalid u48imm argument");
297 printInt64cxx . . $ printInt64(d5b67dadd92627cf).(O, Value);
298
299 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
300 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
301 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = Value;
302 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
303 }
304 }
305
306 static void printPCRelOperandcxx . . $ printPCRelOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
307 {
308 MCOperandcxx . . $ MCOperand# *MO = MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum);
309
310 if (MCOperand_isImmcxx . . $ MCOperand_isImm(8be14e8515538be0).(MO)) {
311 int64_tcxx . . $ int64_t# imm = (int64_tcxx . . $ int64_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MO);
312
313 printInt64cxx . . $ printInt64(d5b67dadd92627cf).(O, imm);
314
315 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
316 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_IMMcxx . . $ SYSZ_OP_IMM.;
317 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].immcxx . . $ cs_sysz_op#$anonymous_type_0#imm. = imm;
318 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
319 }
320 }
321 }
322
323 static void printPCRelTLSOperandcxx . . $ printPCRelTLSOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
324 {
325 // Output the PC-relative operand.
326 printPCRelOperandcxx . . $ printPCRelOperand(3697f441d84167e5).(MI, OpNum, O);
327 }
328
329 static void printOperandcxx . . $ printOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
330 {
331 _printOperandcxx . . $ _printOperand(38fa567fd85e5fad).(MI, MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum), O);
332 }
333
334 static void printBDAddrOperandcxx . . $ printBDAddrOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
335 {
336 printAddresscxx . . $ printAddress(13e66ea5455b1fd7).(MI, MCOperand_getRegcxx . . $ MCOperand_getReg(2f0d38ead81b409a).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum)),
337 MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum + 1)), 0, O);
338 }
339
340 static void printBDXAddrOperandcxx . . $ printBDXAddrOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
341 {
342 printAddresscxx . . $ printAddress(13e66ea5455b1fd7).(MI, MCOperand_getRegcxx . . $ MCOperand_getReg(2f0d38ead81b409a).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum)),
343 MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum + 1)),
344 MCOperand_getRegcxx . . $ MCOperand_getReg(2f0d38ead81b409a).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum + 2)), O);
345 }
346
347 static void printBDLAddrOperandcxx . . $ printBDLAddrOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
348 {
349 unsigned Base = MCOperand_getRegcxx . . $ MCOperand_getReg(2f0d38ead81b409a).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
350 uint64_tcxx . . $ uint64_t# Disp = (uint64_tcxx . . $ uint64_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum + 1));
351 uint64_tcxx . . $ uint64_t# Length = (uint64_tcxx . . $ uint64_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum + 2));
352
353 if (Disp > HEX_THRESHOLDcxx . . $ `utils.h:17:9`!)
354 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "0x%"PRIx64cxx . . $ `<external>/15933738808807975373/inttypes.h:126:10`!, Disp);
355 else
356 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%"PRIu64cxx . . $ `<external>/15933738808807975373/inttypes.h:110:10`!, Disp);
357
358 if (Length > HEX_THRESHOLDcxx . . $ `utils.h:17:9`!)
359 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "(0x%"PRIx64cxx . . $ `<external>/15933738808807975373/inttypes.h:126:10`!, Length);
360 else
361 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "(%"PRIu64cxx . . $ `<external>/15933738808807975373/inttypes.h:110:10`!, Length);
362
363 if (Base)
364 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, ", %%%s", getRegisterNamecxx . . $ getRegisterName(81a3ae90da26a711).(Base));
365 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, ")");
366
367 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
368 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_MEMcxx . . $ SYSZ_OP_MEM.;
369 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..basecxx . . $ sysz_op_mem#base. = (uint8_tcxx . . $ uint8_t#)SystemZ_map_registercxx . . $ SystemZ_map_register(3d471db7475e2fd4).(Base);
370 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..lengthcxx . . $ sysz_op_mem#length. = Length;
371 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..dispcxx . . $ sysz_op_mem#disp. = (int64_tcxx . . $ int64_t#)Disp;
372 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
373 }
374 }
375
376 static void printBDRAddrOperandcxx . . $ printBDRAddrOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
377 {
378 unsigned Base = MCOperand_getRegcxx . . $ MCOperand_getReg(2f0d38ead81b409a).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
379 uint64_tcxx . . $ uint64_t# Disp = (uint64_tcxx . . $ uint64_t#)MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum + 1));
380 uint64_tcxx . . $ uint64_t# Length = MCOperand_getRegcxx . . $ MCOperand_getReg(2f0d38ead81b409a).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum + 2));
381
382 if (Disp > HEX_THRESHOLDcxx . . $ `utils.h:17:9`!)
383 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "0x%"PRIx64cxx . . $ `<external>/15933738808807975373/inttypes.h:126:10`!, Disp);
384 else
385 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%"PRIu64cxx . . $ `<external>/15933738808807975373/inttypes.h:110:10`!, Disp);
386
387 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, "(");
388 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%%%s", getRegisterNamecxx . . $ getRegisterName(81a3ae90da26a711).(Length));
389
390 if (Base)
391 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, ", %%%s", getRegisterNamecxx . . $ getRegisterName(81a3ae90da26a711).(Base));
392 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, ")");
393
394 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.) {
395 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].typecxx . . $ cs_sysz_op#type. = SYSZ_OP_MEMcxx . . $ SYSZ_OP_MEM.;
396 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..basecxx . . $ sysz_op_mem#base. = (uint8_tcxx . . $ uint8_t#)SystemZ_map_registercxx . . $ SystemZ_map_register(3d471db7475e2fd4).(Base);
397 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..lengthcxx . . $ sysz_op_mem#length. = (uint8_tcxx . . $ uint8_t#)SystemZ_map_registercxx . . $ SystemZ_map_register(3d471db7475e2fd4).(Length);
398 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..operandscxx . . $ cs_sysz#operands.[MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.].memcxx . . $ cs_sysz_op#$anonymous_type_0#mem..dispcxx . . $ sysz_op_mem#disp. = (int64_tcxx . . $ int64_t#)Disp;
399 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..op_countcxx . . $ cs_sysz#op_count.++;
400 }
401 }
402
403 static void printBDVAddrOperandcxx . . $ printBDVAddrOperand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
404 {
405 printAddresscxx . . $ printAddress(13e66ea5455b1fd7).(MI, MCOperand_getRegcxx . . $ MCOperand_getReg(2f0d38ead81b409a).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum)),
406 MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum + 1)),
407 MCOperand_getRegcxx . . $ MCOperand_getReg(2f0d38ead81b409a).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum + 2)), O);
408 }
409
410 static void printCond4Operandcxx . . $ printCond4Operand(3697f441d84167e5).(MCInstcxx . . $ MCInst# *MI, int OpNum, SStreamcxx . . $ SStream# *O)
411 {
412 static const char *const CondNames[] = {
413 "o", "h", "nle", "l", "nhe", "lh", "ne",
414 "e", "nlh", "he", "nl", "le", "nh", "no"
415 };
416
417 uint64_tcxx . . $ uint64_t# Imm = MCOperand_getImmcxx . . $ MCOperand_getImm(e2e9552a97d88948).(MCInst_getOperandcxx . . $ MCInst_getOperand(4687f87e75986a5b).(MI, OpNum));
418 // assert(Imm > 0 && Imm < 15 && "Invalid condition");
419 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, CondNames[Imm - 1]);
420
421 if (MI->cshcxx . . $ MCInst#csh.->detailcxx . . $ cs_struct#detail.)
422 MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.->syszcxx . . $ cs_detail#$anonymous_type_0#sysz..cccxx . . $ cs_sysz#cc. = (sysz_cccxx . . $ sysz_cc#)Imm;
423 }
424
425 #define PRINT_ALIAS_INSTRcxx . . $ `arch/SystemZ/SystemZInstPrinter.c:425:9`!
426 #include "SystemZGenAsmWriter.inc"cxx . . $ `<file>/arch/SystemZ/SystemZGenAsmWriter.inc`/
427
428 void SystemZ_printInstcxx . . $ SystemZ_printInst(6238f66e5ea10f57).(MCInstcxx . . $ MCInst# *MI, SStreamcxx . . $ SStream# *O, void *Info)
429 {
430 printInstructioncxx . . $ printInstruction(d9e99caf10670d9f).(MI, O, Info);
431 }
432
433 #endif