fcml  1.2.2
fcml_common.h
Go to the documentation of this file.
1 /*
2  * FCML - Free Code Manipulation Library.
3  * Copyright (C) 2010-2020 Slawomir Wojtasiak
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
26 #ifndef FCML_INT_COMMON_H_
27 #define FCML_INT_COMMON_H_
28 
29 #include "fcml_lib_export.h"
30 
31 #include "fcml_types.h"
32 #include "fcml_instructions.h"
33 
35 #define FCML_OPERANDS_COUNT 5
36 
37 #define FCML_INSTRUCTION_SIZE 15
38 
39 #define FCML_OPCODES_NUM 3
40 
48 #define FCML_PREFIX_LOCK 0x0001
49 
50 #define FCML_PREFIX_REPNE 0x0002
51 
52 #define FCML_PREFIX_REPNZ FCML_PREFIX_REPNE
53 
54 #define FCML_PREFIX_REP 0x0004
55 
56 #define FCML_PREFIX_REPE FCML_PREFIX_REP
57 
58 #define FCML_PREFIX_REPZ FCML_PREFIX_REP
59 
60 #define FCML_PREFIX_XACQUIRE 0x0008
61 
62 #define FCML_PREFIX_XRELEASE 0x0010
63 
64 #define FCML_PREFIX_BRANCH_HINT 0x0020
65 
66 #define FCML_PREFIX_NOBRANCH_HINT 0x0040
67 
73 typedef enum fcml_en_operating_mode {
82 
83 /* Simple types. */
84 
86 typedef fcml_uint16_t fcml_hints;
87 
91 typedef fcml_uint16_t fcml_prefixes;
92 
96 typedef fcml_int64_t fcml_ip;
97 
98 /* Register numbers.*/
99 
106 #define FCML_REG_AL 0
107 #define FCML_REG_AX 0
108 #define FCML_REG_EAX 0
109 #define FCML_REG_RAX 0
110 #define FCML_REG_MM0 0
111 #define FCML_REG_XMM0 0
112 #define FCML_REG_YMM0 0
113 #define FCML_REG_ZMM0 0
114 
115 #define FCML_REG_CL 1
116 #define FCML_REG_CX 1
117 #define FCML_REG_ECX 1
118 #define FCML_REG_RCX 1
119 #define FCML_REG_MM1 1
120 #define FCML_REG_XMM1 1
121 #define FCML_REG_YMM1 1
122 #define FCML_REG_ZMM1 1
123 
124 #define FCML_REG_DL 2
125 #define FCML_REG_DX 2
126 #define FCML_REG_EDX 2
127 #define FCML_REG_RDX 2
128 #define FCML_REG_MM2 2
129 #define FCML_REG_XMM2 2
130 #define FCML_REG_YMM2 2
131 #define FCML_REG_ZMM2 2
132 
133 #define FCML_REG_BL 3
134 #define FCML_REG_BX 3
135 #define FCML_REG_EBX 3
136 #define FCML_REG_RBX 3
137 #define FCML_REG_MM3 3
138 #define FCML_REG_XMM3 3
139 #define FCML_REG_YMM3 3
140 #define FCML_REG_ZMM3 3
141 
142 #define FCML_REG_AH 4
143 #define FCML_REG_SP 4
144 #define FCML_REG_SPL 4
145 #define FCML_REG_ESP 4
146 #define FCML_REG_RSP 4
147 #define FCML_REG_MM4 4
148 #define FCML_REG_XMM4 4
149 #define FCML_REG_YMM4 4
150 #define FCML_REG_ZMM4 4
151 
152 #define FCML_REG_CH 5
153 #define FCML_REG_BP 5
154 #define FCML_REG_BPL 5
155 #define FCML_REG_EBP 5
156 #define FCML_REG_RBP 5
157 #define FCML_REG_MM5 5
158 #define FCML_REG_XMM5 5
159 #define FCML_REG_YMM5 5
160 #define FCML_REG_ZMM5 5
161 
162 #define FCML_REG_DH 6
163 #define FCML_REG_SI 6
164 #define FCML_REG_SIL 6
165 #define FCML_REG_ESI 6
166 #define FCML_REG_RSI 6
167 #define FCML_REG_MM6 6
168 #define FCML_REG_XMM6 6
169 #define FCML_REG_YMM6 6
170 #define FCML_REG_ZMM6 6
171 
172 #define FCML_REG_BH 7
173 #define FCML_REG_DI 7
174 #define FCML_REG_DIL 7
175 #define FCML_REG_EDI 7
176 #define FCML_REG_RDI 7
177 #define FCML_REG_MM7 7
178 #define FCML_REG_XMM7 7
179 #define FCML_REG_YMM7 7
180 #define FCML_REG_ZMM7 7
181 
182 #define FCML_REG_R8L 8
183 #define FCML_REG_R8W 8
184 #define FCML_REG_R8D 8
185 #define FCML_REG_R8 8
186 #define FCML_REG_XMM8 8
187 #define FCML_REG_YMM8 8
188 #define FCML_REG_ZMM8 8
189 
190 #define FCML_REG_R9L 9
191 #define FCML_REG_R9W 9
192 #define FCML_REG_R9D 9
193 #define FCML_REG_R9 9
194 #define FCML_REG_XMM9 9
195 #define FCML_REG_YMM9 9
196 #define FCML_REG_ZMM9 9
197 
198 #define FCML_REG_R10L 10
199 #define FCML_REG_R10W 10
200 #define FCML_REG_R10D 10
201 #define FCML_REG_R10 10
202 #define FCML_REG_XMM10 10
203 #define FCML_REG_YMM10 10
204 #define FCML_REG_ZMM10 10
205 
206 #define FCML_REG_R11L 11
207 #define FCML_REG_R11W 11
208 #define FCML_REG_R11D 11
209 #define FCML_REG_R11 11
210 #define FCML_REG_XMM11 11
211 #define FCML_REG_YMM11 11
212 #define FCML_REG_ZMM11 11
213 
214 #define FCML_REG_R12L 12
215 #define FCML_REG_R12W 12
216 #define FCML_REG_R12D 12
217 #define FCML_REG_R12 12
218 #define FCML_REG_XMM12 12
219 #define FCML_REG_YMM12 12
220 #define FCML_REG_ZMM12 12
221 
222 #define FCML_REG_R13L 13
223 #define FCML_REG_R13W 13
224 #define FCML_REG_R13D 13
225 #define FCML_REG_R13 13
226 #define FCML_REG_XMM13 13
227 #define FCML_REG_YMM13 13
228 #define FCML_REG_ZMM13 13
229 
230 #define FCML_REG_R14L 14
231 #define FCML_REG_R14W 14
232 #define FCML_REG_R14D 14
233 #define FCML_REG_R14 14
234 #define FCML_REG_XMM14 14
235 #define FCML_REG_YMM14 14
236 #define FCML_REG_ZMM14 14
237 
238 #define FCML_REG_R15L 15
239 #define FCML_REG_R15W 15
240 #define FCML_REG_R15D 15
241 #define FCML_REG_R15 15
242 #define FCML_REG_XMM15 15
243 #define FCML_REG_YMM15 15
244 #define FCML_REG_ZMM15 15
245 
246 #define FCML_REG_XMM16 16
247 #define FCML_REG_YMM16 16
248 #define FCML_REG_ZMM16 16
249 
250 #define FCML_REG_XMM17 17
251 #define FCML_REG_YMM17 17
252 #define FCML_REG_ZMM17 17
253 
254 #define FCML_REG_XMM18 18
255 #define FCML_REG_YMM18 18
256 #define FCML_REG_ZMM18 18
257 
258 #define FCML_REG_XMM19 19
259 #define FCML_REG_YMM19 19
260 #define FCML_REG_ZMM19 19
261 
262 #define FCML_REG_XMM20 20
263 #define FCML_REG_YMM20 20
264 #define FCML_REG_ZMM20 20
265 
266 #define FCML_REG_XMM21 21
267 #define FCML_REG_YMM21 21
268 #define FCML_REG_ZMM21 21
269 
270 #define FCML_REG_XMM22 22
271 #define FCML_REG_YMM22 22
272 #define FCML_REG_ZMM22 22
273 
274 #define FCML_REG_XMM23 23
275 #define FCML_REG_YMM23 23
276 #define FCML_REG_ZMM23 23
277 
278 #define FCML_REG_XMM24 24
279 #define FCML_REG_YMM24 24
280 #define FCML_REG_ZMM24 24
281 
282 #define FCML_REG_XMM25 25
283 #define FCML_REG_YMM25 25
284 #define FCML_REG_ZMM25 25
285 
286 #define FCML_REG_XMM26 26
287 #define FCML_REG_YMM26 26
288 #define FCML_REG_ZMM26 26
289 
290 #define FCML_REG_XMM27 27
291 #define FCML_REG_YMM27 27
292 #define FCML_REG_ZMM27 27
293 
294 #define FCML_REG_XMM28 28
295 #define FCML_REG_YMM28 28
296 #define FCML_REG_ZMM28 28
297 
298 #define FCML_REG_XMM29 29
299 #define FCML_REG_YMM29 29
300 #define FCML_REG_ZMM29 29
301 
302 #define FCML_REG_XMM30 30
303 #define FCML_REG_YMM30 30
304 #define FCML_REG_ZMM30 30
305 
306 #define FCML_REG_XMM31 31
307 #define FCML_REG_YMM31 31
308 #define FCML_REG_ZMM31 31
309 
310 /* Segment registers. */
311 
312 #define FCML_REG_ES 0
313 #define FCML_REG_CS 1
314 #define FCML_REG_SS 2
315 #define FCML_REG_DS 3
316 #define FCML_REG_FS 4
317 #define FCML_REG_GS 5
318 
319 /* FPU registers */
320 
321 #define FCML_REG_ST0 0
322 #define FCML_REG_ST1 1
323 #define FCML_REG_ST2 2
324 #define FCML_REG_ST3 3
325 #define FCML_REG_ST4 4
326 #define FCML_REG_ST5 5
327 #define FCML_REG_ST6 6
328 #define FCML_REG_ST7 7
329 
330 /* Control registers. */
331 
332 #define FCML_REG_CR0 0
333 #define FCML_REG_CR2 2
334 #define FCML_REG_CR3 3
335 #define FCML_REG_CR4 4
336 #define FCML_REG_CR8 8
337 
338 /* Debug register. */
339 
340 #define FCML_REG_DR0 0
341 #define FCML_REG_DR1 1
342 #define FCML_REG_DR2 2
343 #define FCML_REG_DR3 3
344 #define FCML_REG_DR4 4
345 #define FCML_REG_DR5 5
346 #define FCML_REG_DR6 6
347 #define FCML_REG_DR7 7
348 
349 /* Opmask registers. */
350 
351 #define FCML_REG_K0 0
352 #define FCML_REG_K1 1
353 #define FCML_REG_K2 2
354 #define FCML_REG_K3 3
355 #define FCML_REG_K4 4
356 #define FCML_REG_K5 5
357 #define FCML_REG_K6 6
358 #define FCML_REG_K7 7
359 
367 #define FCML_DS_UNDEF 0
368 #define FCML_DS_8 8
369 #define FCML_DS_16 16
370 #define FCML_DS_32 32
371 #define FCML_DS_64 64
372 #define FCML_DS_128 128
373 #define FCML_DS_256 256
374 #define FCML_DS_512 512
375 
378 /* Size operators. */
379 
380 #define FCML_OS_UNDEFINED 0
381 #define FCML_OS_BYTE 8
382 #define FCML_OS_WORD 16
383 #define FCML_OS_DWORD 32
384 #define FCML_OS_FWORD 48
385 #define FCML_OS_QWORD 64
386 #define FCML_OS_MWORD 64
387 #define FCML_OS_TBYTE 80
388 #define FCML_OS_OWORD 128
389 #define FCML_OS_XWORD 128
390 #define FCML_OS_YWORD 256
391 #define FCML_OS_ZWORD 512
392 
393 /* SIMD tuple types. */
394 
395 /* Instructions affected by embedded broadcast */
396 #define FCML_TT_NONE 0
397 #define FCML_TT_FV 1
398 #define FCML_TT_HV 2
399 
400 /* Instructions not affected by embedded broadcast */
401 #define FCML_TT_FVM 3 /* Full Mem */
402 #define FCML_TT_T1S 4
403 #define FCML_TT_T1F 5
404 #define FCML_TT_T2 6
405 #define FCML_TT_T4 7
406 #define FCML_TT_T8 8
407 #define FCML_TT_HVM 9
408 #define FCML_TT_QVM 10
409 #define FCML_TT_OVM 11
410 #define FCML_TT_M128 12
411 #define FCML_TT_DUP 13
412 #define FCML_TT_T1x4 14 /* Tuple1_4X */
413 
414 /* Embedded rounding mode. */
415 
416 #define FCML_ER_RN_SAE 0
417 #define FCML_ER_RD_SAE 1
418 #define FCML_ER_RU_SAE 2
419 #define FCML_ER_RZ_SAE 3
420 
426 typedef enum fcml_en_register {
446 
450 typedef struct fcml_st_register {
454  fcml_usize size;
456  fcml_uint8_t reg;
458  fcml_bool x64_exp;
460 
461 /*********************************
462  * Conditions.
463  *********************************/
464 
466 #define FCML_NUMBER_OF_CONDITIONS 8
467 
491 
495 typedef struct fcml_st_condition {
496  /* Condition type.*/
497  fcml_en_condition_type condition_type;
498  /* True if condition should be negated.*/
499  fcml_bool is_negation;
501 
502 /*********************************
503  * Size attributes flags.
504  *********************************/
505 
513 /* Addressing mode is not set, so the caller does not care about it - any
514  * addressing mode is allowed. */
515 #define FCML_EN_ASF_ANY 0x00
516 #define FCML_EN_ASF_16 0x01
517 #define FCML_EN_ASF_32 0x02
518 #define FCML_EN_ASF_64 0x04
519 /* All addressing modes are allowed, but in this particular case it's explicitly stated.
520  * Effectively it's the same option as FCML_EN_ASF_ANY. */
521 #define FCML_EN_ASF_ALL FCML_EN_ASF_16 | FCML_EN_ASF_32 | FCML_EN_ASF_64
522 
530  fcml_bool is_set;
532  fcml_flags flags;
534 
535 /*********************************
536  * Operands.
537  *********************************/
538 
542 typedef enum fcml_en_access_mode {
546  FCML_AM_READ = 0x01,
552 
556 typedef struct fcml_st_far_pointer {
558  fcml_uint16_t segment;
560  fcml_usize offset_size;
562  fcml_int16_t offset16;
564  fcml_int32_t offset32;
566 
567 /********************************************/
569 /********************************************/
570 
576 typedef enum fcml_en_address_form {
585 
589 typedef struct fcml_st_offset {
591  fcml_usize size;
593  fcml_bool is_signed;
595  fcml_int16_t off16;
597  fcml_int32_t off32;
599  fcml_int64_t off64;
601 
611  fcml_uint8_t scale_factor;
615 
619 typedef struct fcml_st_segment_selector {
625  fcml_bool is_default_reg;
627 
631 typedef struct fcml_st_address {
633  fcml_usize size_operator;
645 
650  FCML_ERC_RNE, FCML_ERC_RD, FCML_ERC_RU, FCML_ERC_RZ
652 
661  fcml_bool z;
667  fcml_bool sae;
669 
673 typedef enum fcml_en_operand_type {
690 
695 typedef enum fcml_en_operand_hints {
731 
735 typedef struct fcml_st_operand {
751 
752 /*********************************
753  * Instruction definition.
754  *********************************/
755 
777 
783 typedef struct fcml_st_instruction {
791  fcml_char *mnemonic;
793  fcml_bool is_conditional;
800  fcml_int operands_count;
802 
803 /*********************************
804  * Instruction definition.
805  *********************************/
806 
810 typedef struct fcml_st_instruction_code {
812  fcml_uint8_t *code;
814  fcml_usize code_length;
816 
817 /****************************
818  * Instruction entry point.
819  ****************************/
820 
824 typedef struct fcml_st_entry_point {
835 
836 #endif /* FCML_INT_COMMON_H_ */
fcml_char * mnemonic
Dialect-dependent instruction mnemonic.
Definition: fcml_common.h:791
struct fcml_st_operand_decorators fcml_st_operand_decorators
Container for operand decorators.
fcml_ip ip
Instruction pointer EIP/RIP.
Definition: fcml_common.h:833
Operand is set by instruction.
Definition: fcml_common.h:548
Describes segment register.
Definition: fcml_common.h:619
fcml_bool is_set
True if mask is set.
Definition: fcml_common.h:530
Operand is read but can be also set.
Definition: fcml_common.h:550
fcml_usize operand_size_attribute
Default operand size attribute (See 'D' flag of segment descriptor.)
Definition: fcml_common.h:830
Defines instruction's condition.
Definition: fcml_common.h:495
Effective address combined from address components like base register, index registers, factor, displacement etc...
Definition: fcml_common.h:583
fcml_uint16_t segment
16-bit Code segment.
Definition: fcml_common.h:558
fcml_int16_t offset16
16-bit offset.
Definition: fcml_common.h:562
fcml_en_register
Register type.
Definition: fcml_common.h:426
struct fcml_st_entry_point fcml_st_entry_point
Describes address of an instruction code.
Container for operand decorators.
Definition: fcml_common.h:657
fcml_st_integer immediate
Immediate value operand.
Definition: fcml_common.h:741
fcml_st_operand_decorators decorators
Operand decorators.
Definition: fcml_common.h:749
6 Less than
Definition: fcml_common.h:487
fcml_bool x64_exp
In case of SPL,BPL,SIL,DIL GPR registers has to be set to true.
Definition: fcml_common.h:458
Control register.
Definition: fcml_common.h:438
Segment register.
Definition: fcml_common.h:436
Operand mask register.
Definition: fcml_common.h:444
fcml_st_register operand_mask_reg
The 64-bit k registers are: k0 through k7.
Definition: fcml_common.h:663
fcml_st_segment_selector segment_selector
Segment register.
Definition: fcml_common.h:639
fcml_en_operand_type
Supported operand types.
Definition: fcml_common.h:673
Relative address.
Definition: fcml_common.h:710
fcml_uint16_t fcml_hints
Type used for storing instruction and operand hint masks.
Definition: fcml_common.h:86
Definition: fcml_types.h:217
fcml_usize size
Offset size 16,32 or 64 bits.
Definition: fcml_common.h:591
General purpose register.
Definition: fcml_common.h:430
5 Parity
Definition: fcml_common.h:485
fcml_en_address_form
Memory addressing using ModR/M field.
Definition: fcml_common.h:576
fcml_en_operating_mode
Supported processor operating modes.
Definition: fcml_common.h:73
struct fcml_st_nullable_size_flags fcml_st_nullable_size_flags
Nullable wrapper for mask of size flags.
fcml_en_access_mode
Operand access mode.
Definition: fcml_common.h:542
Hints instruction to use FAR pointer to address the memory.
Definition: fcml_common.h:766
Instruction pointer register.
Definition: fcml_common.h:442
fcml_uint8_t * code
Pointer to the instruction code.
Definition: fcml_common.h:812
fcml_uint8_t reg
Register itself as a positive integer.
Definition: fcml_common.h:456
enum fcml_en_address_form fcml_en_effective_address_form
Memory addressing using ModR/M field.
fcml_st_integer displacement
Displacement value.
Definition: fcml_common.h:613
0 Overflow
Definition: fcml_common.h:475
Encode ModR/M with optional SIB byte if possible.
Definition: fcml_common.h:729
Generic instruction model.
Definition: fcml_common.h:783
fcml_int32_t offset32
32-bit offset.
Definition: fcml_common.h:564
fcml_bool is_default_reg
Set to true if given segment register is a default one in given context.
Definition: fcml_common.h:625
Handles Win32 DLL symbols importing/exporting.
Offset should be encoded as relative address.
Definition: fcml_common.h:725
#define FCML_OPERANDS_COUNT
Maximal number of the instruction operands.
Definition: fcml_common.h:35
This hint is used only by assembler in order to force it to generate three byte VEX/XOP prefix even i...
Definition: fcml_common.h:771
Offset should be encoded as absolute address.
Definition: fcml_common.h:721
Structure describes x86_64 register.
Definition: fcml_common.h:450
Hints instruction to use DIRECT memory addressing.
Definition: fcml_common.h:775
fcml_bool sae
Indicates support for SAE (Suppress All Exceptions).
Definition: fcml_common.h:667
struct fcml_st_register fcml_st_register
Structure describes x86_64 register.
3 Below or equal
Definition: fcml_common.h:481
fcml_en_condition_type
Condition type.
Definition: fcml_common.h:473
fcml_st_register reg
Register operand.
Definition: fcml_common.h:747
fcml_en_operating_mode op_mode
Processor operating mode 16/32/64-bit.
Definition: fcml_common.h:826
Operand not used.
Definition: fcml_common.h:675
FPU register.
Definition: fcml_common.h:434
struct fcml_st_offset fcml_st_offset
Absolute offset.
Processor register.
Definition: fcml_common.h:683
fcml_prefixes prefixes
Describes explicit instruction prefixes.
Definition: fcml_common.h:786
Nullable wrapper for mask of size flags.
Definition: fcml_common.h:528
fcml_st_register base
GPR base register.
Definition: fcml_common.h:607
struct fcml_st_instruction fcml_st_instruction
Generic instruction model.
fcml_usize address_size_attribute
Default address size attribute (See 'D' flag of segment descriptor.)
Definition: fcml_common.h:828
fcml_int64_t fcml_ip
General instruction pointer holder.
Definition: fcml_common.h:96
Debug register.
Definition: fcml_common.h:440
Protected/Compatibility mode when 'D' segment descriptor flag is set to 1.
Definition: fcml_common.h:78
Immediate integer value.
Definition: fcml_common.h:677
fcml_hints hints
Holds instruction level hints.
Definition: fcml_common.h:788
Absolute offset (address).
Definition: fcml_common.h:580
fcml_hints hints
Optional operand level hints.
Definition: fcml_common.h:739
SIMD operand.
Definition: fcml_common.h:705
fcml_int operands_count
Number of operands defined for instruction.
Definition: fcml_common.h:800
fcml_st_address address
Effective address or absolute offset.
Definition: fcml_common.h:745
Operand is read by instruction.
Definition: fcml_common.h:546
fcml_flags flags
Mask of supported size values.
Definition: fcml_common.h:532
fcml_bool z
Zeroing masking.
Definition: fcml_common.h:661
Undefined.
Definition: fcml_common.h:699
Undefined register type.
Definition: fcml_common.h:428
fcml_st_effective_address effective_address
Memory address for FCML_AF_COMBINED form.
Definition: fcml_common.h:641
fcml_uint8_t scale_factor
Scale factor 1,2,4 or 8.
Definition: fcml_common.h:611
fcml_st_far_pointer far_pointer
Far pointer operand.
Definition: fcml_common.h:743
Default value set if memory addressing hasn't been configured.
Definition: fcml_common.h:578
fcml_int16_t off16
Place for 16-bit absolute offset.
Definition: fcml_common.h:595
fcml_en_embeeded_rounding_control
Rounding mode.
Definition: fcml_common.h:649
Hints instruction to use INDIRECT pointer to address the memory.
Definition: fcml_common.h:773
struct fcml_st_operand fcml_st_operand
Instruction operand.
7 Less than or equal to
Definition: fcml_common.h:489
Undefined mode.
Definition: fcml_common.h:544
SIMD (SSE, MMX) register.
Definition: fcml_common.h:432
fcml_en_instruction_hints
Instruction level hints.
Definition: fcml_common.h:762
Definition: fcml_types.h:257
Direct far pointer.
Definition: fcml_common.h:679
Real-addressing mode, virtual 8086 mode.
Definition: fcml_common.h:75
Hints instruction to use NEAR pointer to address the memory.
Definition: fcml_common.h:768
Not an operand in a strict sense, only a container for attributes.
Definition: fcml_common.h:688
struct fcml_st_address fcml_st_address
Generic memory addressing operator.
Instruction operand.
Definition: fcml_common.h:735
fcml_usize offset_size
Size of the offset.
Definition: fcml_common.h:560
Instruction codes and addressing modes/instruction forms.
fcml_st_register segment_selector
Used segment register.
Definition: fcml_common.h:621
fcml_bool is_signed
True if offset should be treated as signed value.
Definition: fcml_common.h:593
fcml_usize size
Register size in bits.
Definition: fcml_common.h:454
fcml_bool is_conditional
True for conditional instructions.
Definition: fcml_common.h:793
No hints defined.
Definition: fcml_common.h:764
Representation of far pointer operand.
Definition: fcml_common.h:556
Effective address.
Definition: fcml_common.h:605
fcml_st_register index
GPR index register.
Definition: fcml_common.h:609
fcml_usize code_length
Instruction code length.
Definition: fcml_common.h:814
Describes address of an instruction code.
Definition: fcml_common.h:824
4 Sign
Definition: fcml_common.h:483
fcml_uint16_t fcml_prefixes
Type for explicit instruction prefixes bit mask.
Definition: fcml_common.h:91
Memory address.
Definition: fcml_common.h:681
Generic memory addressing operator.
Definition: fcml_common.h:631
struct fcml_st_segment_selector fcml_st_segment_selector
Describes segment register.
struct fcml_st_instruction_code fcml_st_instruction_code
An encoded instruction.
fcml_usize size_operator
Size of data accessed in memory.
Definition: fcml_common.h:633
fcml_nuint8_t bcast
Broadcasting: 2, 4, 8, 16, 32, 64.
Definition: fcml_common.h:659
Absolute offset.
Definition: fcml_common.h:589
fcml_nuint8_t er
Embedded rounding control.
Definition: fcml_common.h:665
An encoded instruction.
Definition: fcml_common.h:810
fcml_en_register type
Register type.
Definition: fcml_common.h:452
fcml_st_condition condition
Describes condition used by assembled/disassembled conditional instruction.
Definition: fcml_common.h:796
fcml_en_operand_type type
Operand type.
Definition: fcml_common.h:737
struct fcml_st_condition fcml_st_condition
Defines instruction's condition.
fcml_int32_t off32
Place for 32-bit absolute offset.
Definition: fcml_common.h:597
Types declarations.
fcml_en_operand_hints
Operand hints.
Definition: fcml_common.h:695
2 Equal
Definition: fcml_common.h:479
struct fcml_st_effective_address fcml_st_effective_address
Effective address.
fcml_en_effective_address_form address_form
Memory addressing format: absolute offset/effective address.
Definition: fcml_common.h:637
1 Below
Definition: fcml_common.h:477
struct fcml_st_far_pointer fcml_st_far_pointer
Representation of far pointer operand.
fcml_st_offset offset
Memory address for FCML_AF_OFFSET form.
Definition: fcml_common.h:643
Pseudo opcode.
Definition: fcml_common.h:717
64-bit mode.
Definition: fcml_common.h:80
fcml_int64_t off64
Place for 64-bit absolute offset.
Definition: fcml_common.h:599