Skip to main content

osom_encoders_x86_64/encoders/
jcc.rs

1//! This module contains the encoders for the `jcc` instruction group.
2#![allow(unused_imports)]
3
4// ** This file is automatically generated from x86.yaml schema. Do not modify! **
5
6use crate::models::{
7    EncodedX86_64Instruction, GPR, GPROrMemory, Immediate8, Immediate16, Immediate32, Immediate64, Memory, Offset,
8    Scale, Size,
9};
10
11/// Conditional short jump to RIP-relative address. Condition: Above (in unsigned sense). Takes 2 bytes.
12///
13/// # Safety
14///
15/// It is the caller's responsibility to ensure that the operands are valid.
16/// Otherwise the behavior is undefined.
17#[inline]
18pub const unsafe fn encode_a_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
19    unsafe { crate::partial_encoders::i::encode_imm8([0x77], imm8) }
20}
21
22/// Conditional long jump to RIP-relative address. Condition: Above (in unsigned sense). Takes 6 bytes.
23///
24/// # Safety
25///
26/// It is the caller's responsibility to ensure that the operands are valid.
27/// Otherwise the behavior is undefined.
28#[inline]
29pub const unsafe fn encode_a_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
30    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x87], imm32) }
31}
32
33/// Conditional short jump to RIP-relative address. Condition: Above Or Equal (in unsigned sense). Takes 2 bytes.
34///
35/// # Safety
36///
37/// It is the caller's responsibility to ensure that the operands are valid.
38/// Otherwise the behavior is undefined.
39#[inline]
40pub const unsafe fn encode_ae_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
41    unsafe { crate::partial_encoders::i::encode_imm8([0x73], imm8) }
42}
43
44/// Conditional long jump to RIP-relative address. Condition: Above Or Equal (in unsigned sense). Takes 6 bytes.
45///
46/// # Safety
47///
48/// It is the caller's responsibility to ensure that the operands are valid.
49/// Otherwise the behavior is undefined.
50#[inline]
51pub const unsafe fn encode_ae_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
52    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x83], imm32) }
53}
54
55/// Conditional short jump to RIP-relative address. Condition: Below (in unsigned sense). Takes 2 bytes.
56///
57/// # Safety
58///
59/// It is the caller's responsibility to ensure that the operands are valid.
60/// Otherwise the behavior is undefined.
61#[inline]
62pub const unsafe fn encode_b_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
63    unsafe { crate::partial_encoders::i::encode_imm8([0x72], imm8) }
64}
65
66/// Conditional long jump to RIP-relative address. Condition: Below (in unsigned sense). Takes 6 bytes.
67///
68/// # Safety
69///
70/// It is the caller's responsibility to ensure that the operands are valid.
71/// Otherwise the behavior is undefined.
72#[inline]
73pub const unsafe fn encode_b_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
74    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x82], imm32) }
75}
76
77/// Conditional short jump to RIP-relative address. Condition: Below Or Equal (in unsigned sense). Takes 2 bytes.
78///
79/// # Safety
80///
81/// It is the caller's responsibility to ensure that the operands are valid.
82/// Otherwise the behavior is undefined.
83#[inline]
84pub const unsafe fn encode_be_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
85    unsafe { crate::partial_encoders::i::encode_imm8([0x76], imm8) }
86}
87
88/// Conditional long jump to RIP-relative address. Condition: Below Or Equal (in unsigned sense). Takes 6 bytes.
89///
90/// # Safety
91///
92/// It is the caller's responsibility to ensure that the operands are valid.
93/// Otherwise the behavior is undefined.
94#[inline]
95pub const unsafe fn encode_be_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
96    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x86], imm32) }
97}
98
99/// Conditional short jump to RIP-relative address. Condition: Equal. Takes 2 bytes.
100///
101/// # Safety
102///
103/// It is the caller's responsibility to ensure that the operands are valid.
104/// Otherwise the behavior is undefined.
105#[inline]
106pub const unsafe fn encode_e_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
107    unsafe { crate::partial_encoders::i::encode_imm8([0x74], imm8) }
108}
109
110/// Conditional long jump to RIP-relative address. Condition: Equal. Takes 6 bytes.
111///
112/// # Safety
113///
114/// It is the caller's responsibility to ensure that the operands are valid.
115/// Otherwise the behavior is undefined.
116#[inline]
117pub const unsafe fn encode_e_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
118    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x84], imm32) }
119}
120
121/// Conditional short jump to RIP-relative address. Condition: Greater (in signed sense). Takes 2 bytes.
122///
123/// # Safety
124///
125/// It is the caller's responsibility to ensure that the operands are valid.
126/// Otherwise the behavior is undefined.
127#[inline]
128pub const unsafe fn encode_g_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
129    unsafe { crate::partial_encoders::i::encode_imm8([0x7F], imm8) }
130}
131
132/// Conditional long jump to RIP-relative address. Condition: Greater (in signed sense). Takes 6 bytes.
133///
134/// # Safety
135///
136/// It is the caller's responsibility to ensure that the operands are valid.
137/// Otherwise the behavior is undefined.
138#[inline]
139pub const unsafe fn encode_g_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
140    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x8F], imm32) }
141}
142
143/// Conditional short jump to RIP-relative address. Condition: Greater Or Equal (in signed sense). Takes 2 bytes.
144///
145/// # Safety
146///
147/// It is the caller's responsibility to ensure that the operands are valid.
148/// Otherwise the behavior is undefined.
149#[inline]
150pub const unsafe fn encode_ge_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
151    unsafe { crate::partial_encoders::i::encode_imm8([0x7D], imm8) }
152}
153
154/// Conditional long jump to RIP-relative address. Condition: Greater Or Equal (in signed sense). Takes 6 bytes.
155///
156/// # Safety
157///
158/// It is the caller's responsibility to ensure that the operands are valid.
159/// Otherwise the behavior is undefined.
160#[inline]
161pub const unsafe fn encode_ge_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
162    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x8D], imm32) }
163}
164
165/// Conditional short jump to RIP-relative address. Condition: Less (in signed sense). Takes 2 bytes.
166///
167/// # Safety
168///
169/// It is the caller's responsibility to ensure that the operands are valid.
170/// Otherwise the behavior is undefined.
171#[inline]
172pub const unsafe fn encode_l_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
173    unsafe { crate::partial_encoders::i::encode_imm8([0x7C], imm8) }
174}
175
176/// Conditional long jump to RIP-relative address. Condition: Less (in signed sense). Takes 6 bytes.
177///
178/// # Safety
179///
180/// It is the caller's responsibility to ensure that the operands are valid.
181/// Otherwise the behavior is undefined.
182#[inline]
183pub const unsafe fn encode_l_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
184    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x8C], imm32) }
185}
186
187/// Conditional short jump to RIP-relative address. Condition: Less Or Equal (in signed sense). Takes 2 bytes.
188///
189/// # Safety
190///
191/// It is the caller's responsibility to ensure that the operands are valid.
192/// Otherwise the behavior is undefined.
193#[inline]
194pub const unsafe fn encode_le_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
195    unsafe { crate::partial_encoders::i::encode_imm8([0x7E], imm8) }
196}
197
198/// Conditional long jump to RIP-relative address. Condition: Less Or Equal (in signed sense). Takes 6 bytes.
199///
200/// # Safety
201///
202/// It is the caller's responsibility to ensure that the operands are valid.
203/// Otherwise the behavior is undefined.
204#[inline]
205pub const unsafe fn encode_le_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
206    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x8E], imm32) }
207}
208
209/// Conditional short jump to RIP-relative address. Condition: Not Equal. Takes 2 bytes.
210///
211/// # Safety
212///
213/// It is the caller's responsibility to ensure that the operands are valid.
214/// Otherwise the behavior is undefined.
215#[inline]
216pub const unsafe fn encode_ne_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
217    unsafe { crate::partial_encoders::i::encode_imm8([0x75], imm8) }
218}
219
220/// Conditional long jump to RIP-relative address. Condition: Not Equal. Takes 6 bytes.
221///
222/// # Safety
223///
224/// It is the caller's responsibility to ensure that the operands are valid.
225/// Otherwise the behavior is undefined.
226#[inline]
227pub const unsafe fn encode_ne_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
228    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x85], imm32) }
229}
230
231/// Conditional short jump to RIP-relative address. Condition: No Overflow. Takes 2 bytes.
232///
233/// # Safety
234///
235/// It is the caller's responsibility to ensure that the operands are valid.
236/// Otherwise the behavior is undefined.
237#[inline]
238pub const unsafe fn encode_no_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
239    unsafe { crate::partial_encoders::i::encode_imm8([0x71], imm8) }
240}
241
242/// Conditional long jump to RIP-relative address. Condition: No Overflow. Takes 6 bytes.
243///
244/// # Safety
245///
246/// It is the caller's responsibility to ensure that the operands are valid.
247/// Otherwise the behavior is undefined.
248#[inline]
249pub const unsafe fn encode_no_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
250    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x81], imm32) }
251}
252
253/// Conditional short jump to RIP-relative address. Condition: No Parity. Takes 2 bytes.
254///
255/// # Safety
256///
257/// It is the caller's responsibility to ensure that the operands are valid.
258/// Otherwise the behavior is undefined.
259#[inline]
260pub const unsafe fn encode_np_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
261    unsafe { crate::partial_encoders::i::encode_imm8([0x7B], imm8) }
262}
263
264/// Conditional long jump to RIP-relative address. Condition: No Parity. Takes 6 bytes.
265///
266/// # Safety
267///
268/// It is the caller's responsibility to ensure that the operands are valid.
269/// Otherwise the behavior is undefined.
270#[inline]
271pub const unsafe fn encode_np_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
272    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x8B], imm32) }
273}
274
275/// Conditional short jump to RIP-relative address. Condition: No Sign. Takes 2 bytes.
276///
277/// # Safety
278///
279/// It is the caller's responsibility to ensure that the operands are valid.
280/// Otherwise the behavior is undefined.
281#[inline]
282pub const unsafe fn encode_ns_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
283    unsafe { crate::partial_encoders::i::encode_imm8([0x79], imm8) }
284}
285
286/// Conditional long jump to RIP-relative address. Condition: No Sign. Takes 6 bytes.
287///
288/// # Safety
289///
290/// It is the caller's responsibility to ensure that the operands are valid.
291/// Otherwise the behavior is undefined.
292#[inline]
293pub const unsafe fn encode_ns_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
294    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x89], imm32) }
295}
296
297/// Conditional short jump to RIP-relative address. Condition: Overflow. Takes 2 bytes.
298///
299/// # Safety
300///
301/// It is the caller's responsibility to ensure that the operands are valid.
302/// Otherwise the behavior is undefined.
303#[inline]
304pub const unsafe fn encode_o_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
305    unsafe { crate::partial_encoders::i::encode_imm8([0x70], imm8) }
306}
307
308/// Conditional long jump to RIP-relative address. Condition: Overflow. Takes 6 bytes.
309///
310/// # Safety
311///
312/// It is the caller's responsibility to ensure that the operands are valid.
313/// Otherwise the behavior is undefined.
314#[inline]
315pub const unsafe fn encode_o_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
316    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x80], imm32) }
317}
318
319/// Conditional short jump to RIP-relative address. Condition: Parity. Takes 2 bytes.
320///
321/// # Safety
322///
323/// It is the caller's responsibility to ensure that the operands are valid.
324/// Otherwise the behavior is undefined.
325#[inline]
326pub const unsafe fn encode_p_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
327    unsafe { crate::partial_encoders::i::encode_imm8([0x7A], imm8) }
328}
329
330/// Conditional long jump to RIP-relative address. Condition: Parity. Takes 6 bytes.
331///
332/// # Safety
333///
334/// It is the caller's responsibility to ensure that the operands are valid.
335/// Otherwise the behavior is undefined.
336#[inline]
337pub const unsafe fn encode_p_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
338    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x8A], imm32) }
339}
340
341/// Conditional short jump to RIP-relative address. Condition: Parity Even. Takes 2 bytes.
342///
343/// # Safety
344///
345/// It is the caller's responsibility to ensure that the operands are valid.
346/// Otherwise the behavior is undefined.
347#[inline]
348pub const unsafe fn encode_pe_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
349    unsafe { crate::partial_encoders::i::encode_imm8([0x7A], imm8) }
350}
351
352/// Conditional long jump to RIP-relative address. Condition: Parity Even. Takes 6 bytes.
353///
354/// # Safety
355///
356/// It is the caller's responsibility to ensure that the operands are valid.
357/// Otherwise the behavior is undefined.
358#[inline]
359pub const unsafe fn encode_pe_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
360    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x8A], imm32) }
361}
362
363/// Conditional short jump to RIP-relative address. Condition: Parity Odd. Takes 2 bytes.
364///
365/// # Safety
366///
367/// It is the caller's responsibility to ensure that the operands are valid.
368/// Otherwise the behavior is undefined.
369#[inline]
370pub const unsafe fn encode_po_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
371    unsafe { crate::partial_encoders::i::encode_imm8([0x7B], imm8) }
372}
373
374/// Conditional long jump to RIP-relative address. Condition: Parity Odd. Takes 6 bytes.
375///
376/// # Safety
377///
378/// It is the caller's responsibility to ensure that the operands are valid.
379/// Otherwise the behavior is undefined.
380#[inline]
381pub const unsafe fn encode_po_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
382    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x8B], imm32) }
383}
384
385/// Conditional short jump to RIP-relative address. Condition: Sign. Takes 2 bytes.
386///
387/// # Safety
388///
389/// It is the caller's responsibility to ensure that the operands are valid.
390/// Otherwise the behavior is undefined.
391#[inline]
392pub const unsafe fn encode_s_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
393    unsafe { crate::partial_encoders::i::encode_imm8([0x78], imm8) }
394}
395
396/// Conditional long jump to RIP-relative address. Condition: Sign. Takes 6 bytes.
397///
398/// # Safety
399///
400/// It is the caller's responsibility to ensure that the operands are valid.
401/// Otherwise the behavior is undefined.
402#[inline]
403pub const unsafe fn encode_s_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
404    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x88], imm32) }
405}
406
407/// Conditional short jump to RIP-relative address. Condition: Carry. Takes 2 bytes.
408///
409/// # Safety
410///
411/// It is the caller's responsibility to ensure that the operands are valid.
412/// Otherwise the behavior is undefined.
413#[inline]
414pub const unsafe fn encode_c_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
415    unsafe { crate::partial_encoders::i::encode_imm8([0x72], imm8) }
416}
417
418/// Conditional long jump to RIP-relative address. Condition: Carry. Takes 6 bytes.
419///
420/// # Safety
421///
422/// It is the caller's responsibility to ensure that the operands are valid.
423/// Otherwise the behavior is undefined.
424#[inline]
425pub const unsafe fn encode_c_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
426    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x82], imm32) }
427}
428
429/// Conditional short jump to RIP-relative address. Condition: Not Carry. Takes 2 bytes.
430///
431/// # Safety
432///
433/// It is the caller's responsibility to ensure that the operands are valid.
434/// Otherwise the behavior is undefined.
435#[inline]
436pub const unsafe fn encode_nc_imm8(imm8: Immediate8) -> EncodedX86_64Instruction {
437    unsafe { crate::partial_encoders::i::encode_imm8([0x73], imm8) }
438}
439
440/// Conditional long jump to RIP-relative address. Condition: Not Carry. Takes 6 bytes.
441///
442/// # Safety
443///
444/// It is the caller's responsibility to ensure that the operands are valid.
445/// Otherwise the behavior is undefined.
446#[inline]
447pub const unsafe fn encode_nc_imm32(imm32: Immediate32) -> EncodedX86_64Instruction {
448    unsafe { crate::partial_encoders::i::encode_imm32([0x0F, 0x83], imm32) }
449}