osom_encoders_x86_64/encoders/pop.rs
1//! This module contains the encoders for the `pop` 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/// Pop 64-bit value from the stack into register or memory.
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_rm64(rm64: GPROrMemory) -> EncodedX86_64Instruction {
19 unsafe { crate::partial_encoders::m::encode_gpr_or_memory([0x8F], 0x00, rm64, false, false) }
20}
21
22/// Pop 64-bit value from the stack into register.
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_reg64(reg64: GPR) -> EncodedX86_64Instruction {
30 unsafe { crate::partial_encoders::o::encode([0x58], reg64) }
31}