/* 1.94.0-nightly */
/* qemu git hash: fb94451f06d3fdee7c4dce23817b8bf358ac8c28 */
/* automatically generated by rust-bindgen 0.72.1 */
use libc::siginfo_t;
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage }
}
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
fn extract_bit(byte: u8, index: usize) -> bool {
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
Self::extract_bit(byte, index)
}
#[inline]
pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
let byte = unsafe {
*(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize)
};
Self::extract_bit(byte, index)
}
#[inline]
fn change_bit(byte: u8, index: usize, val: bool) -> u8 {
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val { byte | mask } else { byte & !mask }
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
*byte = Self::change_bit(*byte, index, val);
}
#[inline]
pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
let byte = unsafe {
(core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize)
};
unsafe { *byte = Self::change_bit(*byte, index, val) };
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
let mut val = 0;
for i in 0..(bit_width as usize) {
if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
#[inline]
pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
}
}
}
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub const fn new() -> Self {
__IncompleteArrayField(::std::marker::PhantomData, [])
}
#[inline]
pub fn as_ptr(&self) -> *const T {
self as *const _ as *const T
}
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
self as *mut _ as *mut T
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::std::slice::from_raw_parts(self.as_ptr(), len)
}
#[inline]
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
}
}
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
pub type __clock_t = ::std::os::raw::c_long;
pub type off_t = __off64_t;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct __sigset_t {
pub __val: [::std::os::raw::c_ulong; 16usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __sigset_t"][::std::mem::size_of::<__sigset_t>() - 128usize];
["Alignment of __sigset_t"][::std::mem::align_of::<__sigset_t>() - 8usize];
["Offset of field: __sigset_t::__val"][::std::mem::offset_of!(__sigset_t, __val) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union __atomic_wide_counter {
pub __value64: ::std::os::raw::c_ulonglong,
pub __value32: __atomic_wide_counter__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct __atomic_wide_counter__bindgen_ty_1 {
pub __low: ::std::os::raw::c_uint,
pub __high: ::std::os::raw::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __atomic_wide_counter__bindgen_ty_1"]
[::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>() - 8usize];
["Alignment of __atomic_wide_counter__bindgen_ty_1"]
[::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>() - 4usize];
["Offset of field: __atomic_wide_counter__bindgen_ty_1::__low"]
[::std::mem::offset_of!(__atomic_wide_counter__bindgen_ty_1, __low) - 0usize];
["Offset of field: __atomic_wide_counter__bindgen_ty_1::__high"]
[::std::mem::offset_of!(__atomic_wide_counter__bindgen_ty_1, __high) - 4usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __atomic_wide_counter"][::std::mem::size_of::<__atomic_wide_counter>() - 8usize];
["Alignment of __atomic_wide_counter"]
[::std::mem::align_of::<__atomic_wide_counter>() - 8usize];
["Offset of field: __atomic_wide_counter::__value64"]
[::std::mem::offset_of!(__atomic_wide_counter, __value64) - 0usize];
["Offset of field: __atomic_wide_counter::__value32"]
[::std::mem::offset_of!(__atomic_wide_counter, __value32) - 0usize];
};
impl Default for __atomic_wide_counter {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for __atomic_wide_counter {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "__atomic_wide_counter {{ union }}")
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_list {
pub __prev: *mut __pthread_internal_list,
pub __next: *mut __pthread_internal_list,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __pthread_internal_list"][::std::mem::size_of::<__pthread_internal_list>() - 16usize];
["Alignment of __pthread_internal_list"]
[::std::mem::align_of::<__pthread_internal_list>() - 8usize];
["Offset of field: __pthread_internal_list::__prev"]
[::std::mem::offset_of!(__pthread_internal_list, __prev) - 0usize];
["Offset of field: __pthread_internal_list::__next"]
[::std::mem::offset_of!(__pthread_internal_list, __next) - 8usize];
};
impl Default for __pthread_internal_list {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type __pthread_list_t = __pthread_internal_list;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_mutex_s {
pub __lock: ::std::os::raw::c_int,
pub __count: ::std::os::raw::c_uint,
pub __owner: ::std::os::raw::c_int,
pub __nusers: ::std::os::raw::c_uint,
pub __kind: ::std::os::raw::c_int,
pub __spins: ::std::os::raw::c_short,
pub __elision: ::std::os::raw::c_short,
pub __list: __pthread_list_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __pthread_mutex_s"][::std::mem::size_of::<__pthread_mutex_s>() - 40usize];
["Alignment of __pthread_mutex_s"][::std::mem::align_of::<__pthread_mutex_s>() - 8usize];
["Offset of field: __pthread_mutex_s::__lock"]
[::std::mem::offset_of!(__pthread_mutex_s, __lock) - 0usize];
["Offset of field: __pthread_mutex_s::__count"]
[::std::mem::offset_of!(__pthread_mutex_s, __count) - 4usize];
["Offset of field: __pthread_mutex_s::__owner"]
[::std::mem::offset_of!(__pthread_mutex_s, __owner) - 8usize];
["Offset of field: __pthread_mutex_s::__nusers"]
[::std::mem::offset_of!(__pthread_mutex_s, __nusers) - 12usize];
["Offset of field: __pthread_mutex_s::__kind"]
[::std::mem::offset_of!(__pthread_mutex_s, __kind) - 16usize];
["Offset of field: __pthread_mutex_s::__spins"]
[::std::mem::offset_of!(__pthread_mutex_s, __spins) - 20usize];
["Offset of field: __pthread_mutex_s::__elision"]
[::std::mem::offset_of!(__pthread_mutex_s, __elision) - 22usize];
["Offset of field: __pthread_mutex_s::__list"]
[::std::mem::offset_of!(__pthread_mutex_s, __list) - 24usize];
};
impl Default for __pthread_mutex_s {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __pthread_cond_s {
pub __wseq: __atomic_wide_counter,
pub __g1_start: __atomic_wide_counter,
pub __g_size: [::std::os::raw::c_uint; 2usize],
pub __g1_orig_size: ::std::os::raw::c_uint,
pub __wrefs: ::std::os::raw::c_uint,
pub __g_signals: [::std::os::raw::c_uint; 2usize],
pub __unused_initialized_1: ::std::os::raw::c_uint,
pub __unused_initialized_2: ::std::os::raw::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __pthread_cond_s"][::std::mem::size_of::<__pthread_cond_s>() - 48usize];
["Alignment of __pthread_cond_s"][::std::mem::align_of::<__pthread_cond_s>() - 8usize];
["Offset of field: __pthread_cond_s::__wseq"]
[::std::mem::offset_of!(__pthread_cond_s, __wseq) - 0usize];
["Offset of field: __pthread_cond_s::__g1_start"]
[::std::mem::offset_of!(__pthread_cond_s, __g1_start) - 8usize];
["Offset of field: __pthread_cond_s::__g_size"]
[::std::mem::offset_of!(__pthread_cond_s, __g_size) - 16usize];
["Offset of field: __pthread_cond_s::__g1_orig_size"]
[::std::mem::offset_of!(__pthread_cond_s, __g1_orig_size) - 24usize];
["Offset of field: __pthread_cond_s::__wrefs"]
[::std::mem::offset_of!(__pthread_cond_s, __wrefs) - 28usize];
["Offset of field: __pthread_cond_s::__g_signals"]
[::std::mem::offset_of!(__pthread_cond_s, __g_signals) - 32usize];
["Offset of field: __pthread_cond_s::__unused_initialized_1"]
[::std::mem::offset_of!(__pthread_cond_s, __unused_initialized_1) - 40usize];
["Offset of field: __pthread_cond_s::__unused_initialized_2"]
[::std::mem::offset_of!(__pthread_cond_s, __unused_initialized_2) - 44usize];
};
impl Default for __pthread_cond_s {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for __pthread_cond_s {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"__pthread_cond_s {{ __wseq: {:?}, __g1_start: {:?}, __g_size: {:?}, __g1_orig_size: {:?}, __wrefs: {:?}, __g_signals: {:?}, __unused_initialized_1: {:?}, __unused_initialized_2: {:?} }}",
self.__wseq,
self.__g1_start,
self.__g_size,
self.__g1_orig_size,
self.__wrefs,
self.__g_signals,
self.__unused_initialized_1,
self.__unused_initialized_2
)
}
}
pub type pthread_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutex_t {
pub __data: __pthread_mutex_s,
pub __size: [::std::os::raw::c_char; 40usize],
pub __align: ::std::os::raw::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of pthread_mutex_t"][::std::mem::size_of::<pthread_mutex_t>() - 40usize];
["Alignment of pthread_mutex_t"][::std::mem::align_of::<pthread_mutex_t>() - 8usize];
["Offset of field: pthread_mutex_t::__data"]
[::std::mem::offset_of!(pthread_mutex_t, __data) - 0usize];
["Offset of field: pthread_mutex_t::__size"]
[::std::mem::offset_of!(pthread_mutex_t, __size) - 0usize];
["Offset of field: pthread_mutex_t::__align"]
[::std::mem::offset_of!(pthread_mutex_t, __align) - 0usize];
};
impl Default for pthread_mutex_t {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for pthread_mutex_t {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "pthread_mutex_t {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_cond_t {
pub __data: __pthread_cond_s,
pub __size: [::std::os::raw::c_char; 48usize],
pub __align: ::std::os::raw::c_longlong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of pthread_cond_t"][::std::mem::size_of::<pthread_cond_t>() - 48usize];
["Alignment of pthread_cond_t"][::std::mem::align_of::<pthread_cond_t>() - 8usize];
["Offset of field: pthread_cond_t::__data"]
[::std::mem::offset_of!(pthread_cond_t, __data) - 0usize];
["Offset of field: pthread_cond_t::__size"]
[::std::mem::offset_of!(pthread_cond_t, __size) - 0usize];
["Offset of field: pthread_cond_t::__align"]
[::std::mem::offset_of!(pthread_cond_t, __align) - 0usize];
};
impl Default for pthread_cond_t {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for pthread_cond_t {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "pthread_cond_t {{ union }}")
}
}
pub type FILE = _IO_FILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_marker {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_codecvt {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_wide_data {
_unused: [u8; 0],
}
pub type _IO_lock_t = ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_FILE {
pub _flags: ::std::os::raw::c_int,
pub _IO_read_ptr: *mut ::std::os::raw::c_char,
pub _IO_read_end: *mut ::std::os::raw::c_char,
pub _IO_read_base: *mut ::std::os::raw::c_char,
pub _IO_write_base: *mut ::std::os::raw::c_char,
pub _IO_write_ptr: *mut ::std::os::raw::c_char,
pub _IO_write_end: *mut ::std::os::raw::c_char,
pub _IO_buf_base: *mut ::std::os::raw::c_char,
pub _IO_buf_end: *mut ::std::os::raw::c_char,
pub _IO_save_base: *mut ::std::os::raw::c_char,
pub _IO_backup_base: *mut ::std::os::raw::c_char,
pub _IO_save_end: *mut ::std::os::raw::c_char,
pub _markers: *mut _IO_marker,
pub _chain: *mut _IO_FILE,
pub _fileno: ::std::os::raw::c_int,
pub _bitfield_align_1: [u32; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
pub _short_backupbuf: [::std::os::raw::c_char; 1usize],
pub _old_offset: __off_t,
pub _cur_column: ::std::os::raw::c_ushort,
pub _vtable_offset: ::std::os::raw::c_schar,
pub _shortbuf: [::std::os::raw::c_char; 1usize],
pub _lock: *mut _IO_lock_t,
pub _offset: __off64_t,
pub _codecvt: *mut _IO_codecvt,
pub _wide_data: *mut _IO_wide_data,
pub _freeres_list: *mut _IO_FILE,
pub _freeres_buf: *mut ::std::os::raw::c_void,
pub _prevchain: *mut *mut _IO_FILE,
pub _mode: ::std::os::raw::c_int,
pub _unused3: ::std::os::raw::c_int,
pub _total_written: __uint64_t,
pub _unused2: [::std::os::raw::c_char; 8usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _IO_FILE"][::std::mem::size_of::<_IO_FILE>() - 216usize];
["Alignment of _IO_FILE"][::std::mem::align_of::<_IO_FILE>() - 8usize];
["Offset of field: _IO_FILE::_flags"][::std::mem::offset_of!(_IO_FILE, _flags) - 0usize];
["Offset of field: _IO_FILE::_IO_read_ptr"]
[::std::mem::offset_of!(_IO_FILE, _IO_read_ptr) - 8usize];
["Offset of field: _IO_FILE::_IO_read_end"]
[::std::mem::offset_of!(_IO_FILE, _IO_read_end) - 16usize];
["Offset of field: _IO_FILE::_IO_read_base"]
[::std::mem::offset_of!(_IO_FILE, _IO_read_base) - 24usize];
["Offset of field: _IO_FILE::_IO_write_base"]
[::std::mem::offset_of!(_IO_FILE, _IO_write_base) - 32usize];
["Offset of field: _IO_FILE::_IO_write_ptr"]
[::std::mem::offset_of!(_IO_FILE, _IO_write_ptr) - 40usize];
["Offset of field: _IO_FILE::_IO_write_end"]
[::std::mem::offset_of!(_IO_FILE, _IO_write_end) - 48usize];
["Offset of field: _IO_FILE::_IO_buf_base"]
[::std::mem::offset_of!(_IO_FILE, _IO_buf_base) - 56usize];
["Offset of field: _IO_FILE::_IO_buf_end"]
[::std::mem::offset_of!(_IO_FILE, _IO_buf_end) - 64usize];
["Offset of field: _IO_FILE::_IO_save_base"]
[::std::mem::offset_of!(_IO_FILE, _IO_save_base) - 72usize];
["Offset of field: _IO_FILE::_IO_backup_base"]
[::std::mem::offset_of!(_IO_FILE, _IO_backup_base) - 80usize];
["Offset of field: _IO_FILE::_IO_save_end"]
[::std::mem::offset_of!(_IO_FILE, _IO_save_end) - 88usize];
["Offset of field: _IO_FILE::_markers"][::std::mem::offset_of!(_IO_FILE, _markers) - 96usize];
["Offset of field: _IO_FILE::_chain"][::std::mem::offset_of!(_IO_FILE, _chain) - 104usize];
["Offset of field: _IO_FILE::_fileno"][::std::mem::offset_of!(_IO_FILE, _fileno) - 112usize];
["Offset of field: _IO_FILE::_short_backupbuf"]
[::std::mem::offset_of!(_IO_FILE, _short_backupbuf) - 119usize];
["Offset of field: _IO_FILE::_old_offset"]
[::std::mem::offset_of!(_IO_FILE, _old_offset) - 120usize];
["Offset of field: _IO_FILE::_cur_column"]
[::std::mem::offset_of!(_IO_FILE, _cur_column) - 128usize];
["Offset of field: _IO_FILE::_vtable_offset"]
[::std::mem::offset_of!(_IO_FILE, _vtable_offset) - 130usize];
["Offset of field: _IO_FILE::_shortbuf"]
[::std::mem::offset_of!(_IO_FILE, _shortbuf) - 131usize];
["Offset of field: _IO_FILE::_lock"][::std::mem::offset_of!(_IO_FILE, _lock) - 136usize];
["Offset of field: _IO_FILE::_offset"][::std::mem::offset_of!(_IO_FILE, _offset) - 144usize];
["Offset of field: _IO_FILE::_codecvt"][::std::mem::offset_of!(_IO_FILE, _codecvt) - 152usize];
["Offset of field: _IO_FILE::_wide_data"]
[::std::mem::offset_of!(_IO_FILE, _wide_data) - 160usize];
["Offset of field: _IO_FILE::_freeres_list"]
[::std::mem::offset_of!(_IO_FILE, _freeres_list) - 168usize];
["Offset of field: _IO_FILE::_freeres_buf"]
[::std::mem::offset_of!(_IO_FILE, _freeres_buf) - 176usize];
["Offset of field: _IO_FILE::_prevchain"]
[::std::mem::offset_of!(_IO_FILE, _prevchain) - 184usize];
["Offset of field: _IO_FILE::_mode"][::std::mem::offset_of!(_IO_FILE, _mode) - 192usize];
["Offset of field: _IO_FILE::_unused3"][::std::mem::offset_of!(_IO_FILE, _unused3) - 196usize];
["Offset of field: _IO_FILE::_total_written"]
[::std::mem::offset_of!(_IO_FILE, _total_written) - 200usize];
["Offset of field: _IO_FILE::_unused2"][::std::mem::offset_of!(_IO_FILE, _unused2) - 208usize];
};
impl Default for _IO_FILE {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl _IO_FILE {
#[inline]
pub fn _flags2(&self) -> ::std::os::raw::c_int {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) }
}
#[inline]
pub fn set__flags2(&mut self, val: ::std::os::raw::c_int) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 24u8, val as u64)
}
}
#[inline]
pub unsafe fn _flags2_raw(this: *const Self) -> ::std::os::raw::c_int {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
0usize,
24u8,
) as u32)
}
}
#[inline]
pub unsafe fn set__flags2_raw(this: *mut Self, val: ::std::os::raw::c_int) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
0usize,
24u8,
val as u64,
)
}
}
#[inline]
pub fn new_bitfield_1(_flags2: ::std::os::raw::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 24u8, {
let _flags2: u32 = unsafe { ::std::mem::transmute(_flags2) };
_flags2 as u64
});
__bindgen_bitfield_unit
}
}
pub type __jmp_buf = [::std::os::raw::c_long; 8usize];
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct __jmp_buf_tag {
pub __jmpbuf: __jmp_buf,
pub __mask_was_saved: ::std::os::raw::c_int,
pub __saved_mask: __sigset_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of __jmp_buf_tag"][::std::mem::size_of::<__jmp_buf_tag>() - 200usize];
["Alignment of __jmp_buf_tag"][::std::mem::align_of::<__jmp_buf_tag>() - 8usize];
["Offset of field: __jmp_buf_tag::__jmpbuf"]
[::std::mem::offset_of!(__jmp_buf_tag, __jmpbuf) - 0usize];
["Offset of field: __jmp_buf_tag::__mask_was_saved"]
[::std::mem::offset_of!(__jmp_buf_tag, __mask_was_saved) - 64usize];
["Offset of field: __jmp_buf_tag::__saved_mask"]
[::std::mem::offset_of!(__jmp_buf_tag, __saved_mask) - 72usize];
};
pub type sigjmp_buf = [__jmp_buf_tag; 1usize];
#[repr(C)]
#[derive(Copy, Clone)]
pub union sigval {
pub sival_int: ::std::os::raw::c_int,
pub sival_ptr: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of sigval"][::std::mem::size_of::<sigval>() - 8usize];
["Alignment of sigval"][::std::mem::align_of::<sigval>() - 8usize];
["Offset of field: sigval::sival_int"][::std::mem::offset_of!(sigval, sival_int) - 0usize];
["Offset of field: sigval::sival_ptr"][::std::mem::offset_of!(sigval, sival_ptr) - 0usize];
};
impl Default for sigval {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for sigval {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "sigval {{ union }}")
}
}
pub type __sigval_t = sigval;
#[repr(C)]
#[derive(Copy, Clone)]
pub union siginfo_t__bindgen_ty_1 {
pub _pad: [::std::os::raw::c_int; 28usize],
pub _kill: siginfo_t__bindgen_ty_1__bindgen_ty_1,
pub _timer: siginfo_t__bindgen_ty_1__bindgen_ty_2,
pub _rt: siginfo_t__bindgen_ty_1__bindgen_ty_3,
pub _sigchld: siginfo_t__bindgen_ty_1__bindgen_ty_4,
pub _sigfault: siginfo_t__bindgen_ty_1__bindgen_ty_5,
pub _sigpoll: siginfo_t__bindgen_ty_1__bindgen_ty_6,
pub _sigsys: siginfo_t__bindgen_ty_1__bindgen_ty_7,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct siginfo_t__bindgen_ty_1__bindgen_ty_1 {
pub si_pid: __pid_t,
pub si_uid: __uid_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of siginfo_t__bindgen_ty_1__bindgen_ty_1"]
[::std::mem::size_of::<siginfo_t__bindgen_ty_1__bindgen_ty_1>() - 8usize];
["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_1"]
[::std::mem::align_of::<siginfo_t__bindgen_ty_1__bindgen_ty_1>() - 4usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_1::si_pid"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_1, si_pid) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_1::si_uid"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_1, si_uid) - 4usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct siginfo_t__bindgen_ty_1__bindgen_ty_2 {
pub si_tid: ::std::os::raw::c_int,
pub si_overrun: ::std::os::raw::c_int,
pub si_sigval: __sigval_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of siginfo_t__bindgen_ty_1__bindgen_ty_2"]
[::std::mem::size_of::<siginfo_t__bindgen_ty_1__bindgen_ty_2>() - 16usize];
["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_2"]
[::std::mem::align_of::<siginfo_t__bindgen_ty_1__bindgen_ty_2>() - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_2::si_tid"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_2, si_tid) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_2::si_overrun"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_2, si_overrun) - 4usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_2::si_sigval"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_2, si_sigval) - 8usize];
};
impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_2 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"siginfo_t__bindgen_ty_1__bindgen_ty_2 {{ si_tid: {:?}, si_overrun: {:?}, si_sigval: {:?} }}",
self.si_tid, self.si_overrun, self.si_sigval
)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct siginfo_t__bindgen_ty_1__bindgen_ty_3 {
pub si_pid: __pid_t,
pub si_uid: __uid_t,
pub si_sigval: __sigval_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of siginfo_t__bindgen_ty_1__bindgen_ty_3"]
[::std::mem::size_of::<siginfo_t__bindgen_ty_1__bindgen_ty_3>() - 16usize];
["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_3"]
[::std::mem::align_of::<siginfo_t__bindgen_ty_1__bindgen_ty_3>() - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_3::si_pid"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_3, si_pid) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_3::si_uid"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_3, si_uid) - 4usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_3::si_sigval"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_3, si_sigval) - 8usize];
};
impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_3 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_3 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"siginfo_t__bindgen_ty_1__bindgen_ty_3 {{ si_pid: {:?}, si_uid: {:?}, si_sigval: {:?} }}",
self.si_pid, self.si_uid, self.si_sigval
)
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct siginfo_t__bindgen_ty_1__bindgen_ty_4 {
pub si_pid: __pid_t,
pub si_uid: __uid_t,
pub si_status: ::std::os::raw::c_int,
pub si_utime: __clock_t,
pub si_stime: __clock_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of siginfo_t__bindgen_ty_1__bindgen_ty_4"]
[::std::mem::size_of::<siginfo_t__bindgen_ty_1__bindgen_ty_4>() - 32usize];
["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_4"]
[::std::mem::align_of::<siginfo_t__bindgen_ty_1__bindgen_ty_4>() - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_4::si_pid"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_4, si_pid) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_4::si_uid"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_4, si_uid) - 4usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_4::si_status"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_4, si_status) - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_4::si_utime"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_4, si_utime) - 16usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_4::si_stime"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_4, si_stime) - 24usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct siginfo_t__bindgen_ty_1__bindgen_ty_5 {
pub si_addr: *mut ::std::os::raw::c_void,
pub si_addr_lsb: ::std::os::raw::c_short,
pub _bounds: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 {
pub _addr_bnd: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1,
pub _pkey: __uint32_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 {
pub _lower: *mut ::std::os::raw::c_void,
pub _upper: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"]
[::std::mem::size_of::<siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(
) - 16usize];
["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"]
[::std::mem::align_of::<siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(
) - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_lower"]
[::std::mem::offset_of!(
siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1,
_lower
) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_upper"]
[::std::mem::offset_of!(
siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1,
_upper
) - 8usize];
};
impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1"]
[::std::mem::size_of::<siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1>() - 16usize];
["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1"]
[::std::mem::align_of::<siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1>() - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1::_addr_bnd"][::std::mem::offset_of!(
siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1,
_addr_bnd
) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1::_pkey"][::std::mem::offset_of!(
siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1,
_pkey
) - 0usize];
};
impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 {{ union }}"
)
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of siginfo_t__bindgen_ty_1__bindgen_ty_5"]
[::std::mem::size_of::<siginfo_t__bindgen_ty_1__bindgen_ty_5>() - 32usize];
["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_5"]
[::std::mem::align_of::<siginfo_t__bindgen_ty_1__bindgen_ty_5>() - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5::si_addr"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_5, si_addr) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5::si_addr_lsb"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_5, si_addr_lsb) - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5::_bounds"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_5, _bounds) - 16usize];
};
impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_5 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_5 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"siginfo_t__bindgen_ty_1__bindgen_ty_5 {{ si_addr: {:?}, si_addr_lsb: {:?}, _bounds: {:?} }}",
self.si_addr, self.si_addr_lsb, self._bounds
)
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct siginfo_t__bindgen_ty_1__bindgen_ty_6 {
pub si_band: ::std::os::raw::c_long,
pub si_fd: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of siginfo_t__bindgen_ty_1__bindgen_ty_6"]
[::std::mem::size_of::<siginfo_t__bindgen_ty_1__bindgen_ty_6>() - 16usize];
["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_6"]
[::std::mem::align_of::<siginfo_t__bindgen_ty_1__bindgen_ty_6>() - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_6::si_band"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_6, si_band) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_6::si_fd"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_6, si_fd) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct siginfo_t__bindgen_ty_1__bindgen_ty_7 {
pub _call_addr: *mut ::std::os::raw::c_void,
pub _syscall: ::std::os::raw::c_int,
pub _arch: ::std::os::raw::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of siginfo_t__bindgen_ty_1__bindgen_ty_7"]
[::std::mem::size_of::<siginfo_t__bindgen_ty_1__bindgen_ty_7>() - 16usize];
["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_7"]
[::std::mem::align_of::<siginfo_t__bindgen_ty_1__bindgen_ty_7>() - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_7::_call_addr"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_7, _call_addr) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_7::_syscall"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_7, _syscall) - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_7::_arch"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_7, _arch) - 12usize];
};
impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_7 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of siginfo_t__bindgen_ty_1"]
[::std::mem::size_of::<siginfo_t__bindgen_ty_1>() - 112usize];
["Alignment of siginfo_t__bindgen_ty_1"]
[::std::mem::align_of::<siginfo_t__bindgen_ty_1>() - 8usize];
["Offset of field: siginfo_t__bindgen_ty_1::_pad"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1, _pad) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1::_kill"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1, _kill) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1::_timer"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1, _timer) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1::_rt"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1, _rt) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1::_sigchld"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1, _sigchld) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1::_sigfault"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1, _sigfault) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1::_sigpoll"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1, _sigpoll) - 0usize];
["Offset of field: siginfo_t__bindgen_ty_1::_sigsys"]
[::std::mem::offset_of!(siginfo_t__bindgen_ty_1, _sigsys) - 0usize];
};
impl Default for siginfo_t__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "siginfo_t__bindgen_ty_1 {{ union }}")
}
}
pub type guint8 = ::std::os::raw::c_uchar;
pub type gchar = ::std::os::raw::c_char;
pub type guint = ::std::os::raw::c_uint;
pub type gpointer = *mut ::std::os::raw::c_void;
pub type GArray = _GArray;
pub type GByteArray = _GByteArray;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GArray {
pub data: *mut gchar,
pub len: guint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _GArray"][::std::mem::size_of::<_GArray>() - 16usize];
["Alignment of _GArray"][::std::mem::align_of::<_GArray>() - 8usize];
["Offset of field: _GArray::data"][::std::mem::offset_of!(_GArray, data) - 0usize];
["Offset of field: _GArray::len"][::std::mem::offset_of!(_GArray, len) - 8usize];
};
impl Default for _GArray {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GByteArray {
pub data: *mut guint8,
pub len: guint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _GByteArray"][::std::mem::size_of::<_GByteArray>() - 16usize];
["Alignment of _GByteArray"][::std::mem::align_of::<_GByteArray>() - 8usize];
["Offset of field: _GByteArray::data"][::std::mem::offset_of!(_GByteArray, data) - 0usize];
["Offset of field: _GByteArray::len"][::std::mem::offset_of!(_GByteArray, len) - 8usize];
};
impl Default for _GByteArray {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GHashTable {
_unused: [u8; 0],
}
pub type GHashTable = _GHashTable;
pub type GSList = _GSList;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GSList {
pub data: gpointer,
pub next: *mut GSList,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _GSList"][::std::mem::size_of::<_GSList>() - 16usize];
["Alignment of _GSList"][::std::mem::align_of::<_GSList>() - 8usize];
["Offset of field: _GSList::data"][::std::mem::offset_of!(_GSList, data) - 0usize];
["Offset of field: _GSList::next"][::std::mem::offset_of!(_GSList, next) - 8usize];
};
impl Default for _GSList {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct AccelCPUState {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct AddressSpace {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Clock {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Error {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MemoryRegion {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct QObject {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RAMBlock {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Visitor {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct VMChangeStateEntry {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct VMStateDescription {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IRQState {
_unused: [u8; 0],
}
pub type qemu_irq = *mut IRQState;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct QEnumLookup {
pub array: *const *const ::std::os::raw::c_char,
pub features: *const u64,
pub size: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of QEnumLookup"][::std::mem::size_of::<QEnumLookup>() - 24usize];
["Alignment of QEnumLookup"][::std::mem::align_of::<QEnumLookup>() - 8usize];
["Offset of field: QEnumLookup::array"][::std::mem::offset_of!(QEnumLookup, array) - 0usize];
["Offset of field: QEnumLookup::features"]
[::std::mem::offset_of!(QEnumLookup, features) - 8usize];
["Offset of field: QEnumLookup::size"][::std::mem::offset_of!(QEnumLookup, size) - 16usize];
};
impl Default for QEnumLookup {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type target_long = i64;
pub type target_ulong = u64;
unsafe extern "C" {
#[link_name = "qemu_target_page_size__extern"]
pub fn qemu_target_page_size() -> usize;
}
unsafe extern "C" {
#[link_name = "qemu_target_page_mask__extern"]
pub fn qemu_target_page_mask() -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct QTailQLink {
pub tql_next: *mut ::std::os::raw::c_void,
pub tql_prev: *mut QTailQLink,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of QTailQLink"][::std::mem::size_of::<QTailQLink>() - 16usize];
["Alignment of QTailQLink"][::std::mem::align_of::<QTailQLink>() - 8usize];
["Offset of field: QTailQLink::tql_next"]
[::std::mem::offset_of!(QTailQLink, tql_next) - 0usize];
["Offset of field: QTailQLink::tql_prev"]
[::std::mem::offset_of!(QTailQLink, tql_prev) - 8usize];
};
impl Default for QTailQLink {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct QemuMutex {
pub lock: pthread_mutex_t,
pub initialized: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of QemuMutex"][::std::mem::size_of::<QemuMutex>() - 48usize];
["Alignment of QemuMutex"][::std::mem::align_of::<QemuMutex>() - 8usize];
["Offset of field: QemuMutex::lock"][::std::mem::offset_of!(QemuMutex, lock) - 0usize];
["Offset of field: QemuMutex::initialized"]
[::std::mem::offset_of!(QemuMutex, initialized) - 40usize];
};
impl Default for QemuMutex {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for QemuMutex {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"QemuMutex {{ lock: {:?}, initialized: {:?} }}",
self.lock, self.initialized
)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct QemuCond {
pub cond: pthread_cond_t,
pub initialized: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of QemuCond"][::std::mem::size_of::<QemuCond>() - 56usize];
["Alignment of QemuCond"][::std::mem::align_of::<QemuCond>() - 8usize];
["Offset of field: QemuCond::cond"][::std::mem::offset_of!(QemuCond, cond) - 0usize];
["Offset of field: QemuCond::initialized"]
[::std::mem::offset_of!(QemuCond, initialized) - 48usize];
};
impl Default for QemuCond {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for QemuCond {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"QemuCond {{ cond: {:?}, initialized: {:?} }}",
self.cond, self.initialized
)
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct QemuThread {
pub thread: pthread_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of QemuThread"][::std::mem::size_of::<QemuThread>() - 8usize];
["Alignment of QemuThread"][::std::mem::align_of::<QemuThread>() - 8usize];
["Offset of field: QemuThread::thread"][::std::mem::offset_of!(QemuThread, thread) - 0usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct QemuSpin {
pub value: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of QemuSpin"][::std::mem::size_of::<QemuSpin>() - 4usize];
["Alignment of QemuSpin"][::std::mem::align_of::<QemuSpin>() - 4usize];
["Offset of field: QemuSpin::value"][::std::mem::offset_of!(QemuSpin, value) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Notifier {
pub notify: ::std::option::Option<
unsafe extern "C" fn(notifier: *mut Notifier, data: *mut ::std::os::raw::c_void),
>,
pub node: Notifier__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Notifier__bindgen_ty_1 {
pub le_next: *mut Notifier,
pub le_prev: *mut *mut Notifier,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of Notifier__bindgen_ty_1"][::std::mem::size_of::<Notifier__bindgen_ty_1>() - 16usize];
["Alignment of Notifier__bindgen_ty_1"]
[::std::mem::align_of::<Notifier__bindgen_ty_1>() - 8usize];
["Offset of field: Notifier__bindgen_ty_1::le_next"]
[::std::mem::offset_of!(Notifier__bindgen_ty_1, le_next) - 0usize];
["Offset of field: Notifier__bindgen_ty_1::le_prev"]
[::std::mem::offset_of!(Notifier__bindgen_ty_1, le_prev) - 8usize];
};
impl Default for Notifier__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of Notifier"][::std::mem::size_of::<Notifier>() - 24usize];
["Alignment of Notifier"][::std::mem::align_of::<Notifier>() - 8usize];
["Offset of field: Notifier::notify"][::std::mem::offset_of!(Notifier, notify) - 0usize];
["Offset of field: Notifier::node"][::std::mem::offset_of!(Notifier, node) - 8usize];
};
impl Default for Notifier {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type RCUCBFunc = ::std::option::Option<unsafe extern "C" fn(head: *mut rcu_head)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rcu_head {
pub next: *mut rcu_head,
pub func: RCUCBFunc,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of rcu_head"][::std::mem::size_of::<rcu_head>() - 16usize];
["Alignment of rcu_head"][::std::mem::align_of::<rcu_head>() - 8usize];
["Offset of field: rcu_head::next"][::std::mem::offset_of!(rcu_head, next) - 0usize];
["Offset of field: rcu_head::func"][::std::mem::offset_of!(rcu_head, func) - 8usize];
};
impl Default for rcu_head {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TypeImpl {
_unused: [u8; 0],
}
pub type Type = *mut TypeImpl;
#[doc = " typedef ObjectPropertyAccessor:\n @obj: the object that owns the property\n @v: the visitor that contains the property data\n @name: the name of the property\n @opaque: the object property opaque\n @errp: a pointer to an Error that is filled if getting/setting fails.\n\n Called when trying to get/set a property."]
pub type ObjectPropertyAccessor = ::std::option::Option<
unsafe extern "C" fn(
obj: *mut Object,
v: *mut Visitor,
name: *const ::std::os::raw::c_char,
opaque: *mut ::std::os::raw::c_void,
errp: *mut *mut Error,
),
>;
#[doc = " typedef ObjectPropertyResolve:\n @obj: the object that owns the property\n @opaque: the opaque registered with the property\n @part: the name of the property\n\n Resolves the #Object corresponding to property @part.\n\n The returned object can also be used as a starting point\n to resolve a relative path starting with \"@part\".\n\n Returns: If @path is the path that led to @obj, the function\n returns the #Object corresponding to \"@path/@part\".\n If \"@path/@part\" is not a valid object path, it returns #NULL."]
pub type ObjectPropertyResolve = ::std::option::Option<
unsafe extern "C" fn(
obj: *mut Object,
opaque: *mut ::std::os::raw::c_void,
part: *const ::std::os::raw::c_char,
) -> *mut Object,
>;
#[doc = " typedef ObjectPropertyRelease:\n @obj: the object that owns the property\n @name: the name of the property\n @opaque: the opaque registered with the property\n\n Called when a property is removed from a object."]
pub type ObjectPropertyRelease = ::std::option::Option<
unsafe extern "C" fn(
obj: *mut Object,
name: *const ::std::os::raw::c_char,
opaque: *mut ::std::os::raw::c_void,
),
>;
#[doc = " typedef ObjectPropertyInit:\n @obj: the object that owns the property\n @prop: the property to set\n\n Called when a property is initialized."]
pub type ObjectPropertyInit =
::std::option::Option<unsafe extern "C" fn(obj: *mut Object, prop: *mut ObjectProperty)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ObjectProperty {
pub name: *mut ::std::os::raw::c_char,
pub type_: *mut ::std::os::raw::c_char,
pub description: *mut ::std::os::raw::c_char,
pub get: ObjectPropertyAccessor,
pub set: ObjectPropertyAccessor,
pub resolve: ObjectPropertyResolve,
pub release: ObjectPropertyRelease,
pub init: ObjectPropertyInit,
pub opaque: *mut ::std::os::raw::c_void,
pub defval: *mut QObject,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of ObjectProperty"][::std::mem::size_of::<ObjectProperty>() - 80usize];
["Alignment of ObjectProperty"][::std::mem::align_of::<ObjectProperty>() - 8usize];
["Offset of field: ObjectProperty::name"]
[::std::mem::offset_of!(ObjectProperty, name) - 0usize];
["Offset of field: ObjectProperty::type_"]
[::std::mem::offset_of!(ObjectProperty, type_) - 8usize];
["Offset of field: ObjectProperty::description"]
[::std::mem::offset_of!(ObjectProperty, description) - 16usize];
["Offset of field: ObjectProperty::get"][::std::mem::offset_of!(ObjectProperty, get) - 24usize];
["Offset of field: ObjectProperty::set"][::std::mem::offset_of!(ObjectProperty, set) - 32usize];
["Offset of field: ObjectProperty::resolve"]
[::std::mem::offset_of!(ObjectProperty, resolve) - 40usize];
["Offset of field: ObjectProperty::release"]
[::std::mem::offset_of!(ObjectProperty, release) - 48usize];
["Offset of field: ObjectProperty::init"]
[::std::mem::offset_of!(ObjectProperty, init) - 56usize];
["Offset of field: ObjectProperty::opaque"]
[::std::mem::offset_of!(ObjectProperty, opaque) - 64usize];
["Offset of field: ObjectProperty::defval"]
[::std::mem::offset_of!(ObjectProperty, defval) - 72usize];
};
impl Default for ObjectProperty {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[doc = " typedef ObjectUnparent:\n @obj: the object that is being removed from the composition tree\n\n Called when an object is being removed from the QOM composition tree.\n The function should remove any backlinks from children objects to @obj."]
pub type ObjectUnparent = ::std::option::Option<unsafe extern "C" fn(obj: *mut Object)>;
#[doc = " typedef ObjectFree:\n @obj: the object being freed\n\n Called when an object's last reference is removed."]
pub type ObjectFree = ::std::option::Option<unsafe extern "C" fn(obj: *mut ::std::os::raw::c_void)>;
#[doc = " struct ObjectClass:\n\n The base for all classes. The only thing that #ObjectClass contains is an\n integer type handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ObjectClass {
pub type_: Type,
pub interfaces: *mut GSList,
pub object_cast_cache: [*const ::std::os::raw::c_char; 4usize],
pub class_cast_cache: [*const ::std::os::raw::c_char; 4usize],
pub unparent: ObjectUnparent,
pub properties: *mut GHashTable,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of ObjectClass"][::std::mem::size_of::<ObjectClass>() - 96usize];
["Alignment of ObjectClass"][::std::mem::align_of::<ObjectClass>() - 8usize];
["Offset of field: ObjectClass::type_"][::std::mem::offset_of!(ObjectClass, type_) - 0usize];
["Offset of field: ObjectClass::interfaces"]
[::std::mem::offset_of!(ObjectClass, interfaces) - 8usize];
["Offset of field: ObjectClass::object_cast_cache"]
[::std::mem::offset_of!(ObjectClass, object_cast_cache) - 16usize];
["Offset of field: ObjectClass::class_cast_cache"]
[::std::mem::offset_of!(ObjectClass, class_cast_cache) - 48usize];
["Offset of field: ObjectClass::unparent"]
[::std::mem::offset_of!(ObjectClass, unparent) - 80usize];
["Offset of field: ObjectClass::properties"]
[::std::mem::offset_of!(ObjectClass, properties) - 88usize];
};
impl Default for ObjectClass {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[doc = " struct Object:\n\n The base for all objects. The first member of this object is a pointer to\n a #ObjectClass. Since C guarantees that the first member of a structure\n always begins at byte 0 of that structure, as long as any sub-object places\n its parent as the first member, we can cast directly to a #Object.\n\n As a result, #Object contains a reference to the objects type as its\n first member. This allows identification of the real type of the object at\n run time."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Object {
pub class: *mut ObjectClass,
pub free: ObjectFree,
pub properties: *mut GHashTable,
pub ref_: u32,
pub parent: *mut Object,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of Object"][::std::mem::size_of::<Object>() - 40usize];
["Alignment of Object"][::std::mem::align_of::<Object>() - 8usize];
["Offset of field: Object::class"][::std::mem::offset_of!(Object, class) - 0usize];
["Offset of field: Object::free"][::std::mem::offset_of!(Object, free) - 8usize];
["Offset of field: Object::properties"][::std::mem::offset_of!(Object, properties) - 16usize];
["Offset of field: Object::ref_"][::std::mem::offset_of!(Object, ref_) - 24usize];
["Offset of field: Object::parent"][::std::mem::offset_of!(Object, parent) - 32usize];
};
impl Default for Object {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HotplugHandler {
_unused: [u8; 0],
}
#[doc = " ResettableState:\n Structure holding reset related state. The fields should not be accessed\n directly; the definition is here to allow further inclusion into other\n objects.\n\n @count: Number of reset level the object is into. It is incremented when\n the reset operation starts and decremented when it finishes.\n @hold_phase_pending: flag which indicates that we need to invoke the 'hold'\n phase handler for this object.\n @exit_phase_in_progress: true if we are currently in the exit phase"]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ResettableState {
pub count: ::std::os::raw::c_uint,
pub hold_phase_pending: bool,
pub exit_phase_in_progress: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of ResettableState"][::std::mem::size_of::<ResettableState>() - 8usize];
["Alignment of ResettableState"][::std::mem::align_of::<ResettableState>() - 4usize];
["Offset of field: ResettableState::count"]
[::std::mem::offset_of!(ResettableState, count) - 0usize];
["Offset of field: ResettableState::hold_phase_pending"]
[::std::mem::offset_of!(ResettableState, hold_phase_pending) - 4usize];
["Offset of field: ResettableState::exit_phase_in_progress"]
[::std::mem::offset_of!(ResettableState, exit_phase_in_progress) - 5usize];
};
pub type DeviceRealize =
::std::option::Option<unsafe extern "C" fn(dev: *mut DeviceState, errp: *mut *mut Error)>;
pub type DeviceUnrealize = ::std::option::Option<unsafe extern "C" fn(dev: *mut DeviceState)>;
pub type DeviceReset = ::std::option::Option<unsafe extern "C" fn(dev: *mut DeviceState)>;
pub type DeviceSyncConfig = ::std::option::Option<
unsafe extern "C" fn(dev: *mut DeviceState, errp: *mut *mut Error) -> ::std::os::raw::c_int,
>;
#[doc = " struct DeviceClass - The base class for all devices.\n @props: Properties accessing state fields.\n @realize: Callback function invoked when the #DeviceState:realized\n property is changed to %true.\n @unrealize: Callback function invoked when the #DeviceState:realized\n property is changed to %false.\n @sync_config: Callback function invoked when QMP command device-sync-config\n is called. Should synchronize device configuration from host to guest part\n and notify the guest about the change.\n @hotpluggable: indicates if #DeviceClass is hotpluggable, available\n as readonly \"hotpluggable\" property of #DeviceState instance\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DeviceClass {
pub parent_class: ObjectClass,
#[doc = " @categories: device categories device belongs to"]
pub categories: [::std::os::raw::c_ulong; 1usize],
#[doc = " @fw_name: name used to identify device to firmware interfaces"]
pub fw_name: *const ::std::os::raw::c_char,
#[doc = " @desc: human readable description of device"]
pub desc: *const ::std::os::raw::c_char,
#[doc = " @props_: properties associated with device, should only be\n assigned by using device_class_set_props(). The underscore\n ensures a compile-time error if someone attempts to assign\n dc->props directly."]
pub props_: *const Property,
#[doc = " @props_count_: number of elements in @props_; should only be\n assigned by using device_class_set_props()."]
pub props_count_: u16,
#[doc = " @user_creatable: Can user instantiate with -device / device_add?\n\n All devices should support instantiation with device_add, and\n this flag should not exist. But we're not there, yet. Some\n devices fail to instantiate with cryptic error messages.\n Others instantiate, but don't work. Exposing users to such\n behavior would be cruel; clearing this flag will protect them.\n It should never be cleared without a comment explaining why it\n is cleared.\n\n TODO remove once we're there"]
pub user_creatable: bool,
pub hotpluggable: bool,
#[doc = " @legacy_reset: deprecated device reset method pointer\n\n Modern code should use the ResettableClass interface to\n implement a multi-phase reset.\n\n TODO: remove once every reset callback is unused"]
pub legacy_reset: DeviceReset,
pub realize: DeviceRealize,
pub unrealize: DeviceUnrealize,
pub sync_config: DeviceSyncConfig,
#[doc = " @vmsd: device state serialisation description for\n migration/save/restore"]
pub vmsd: *const VMStateDescription,
#[doc = " @bus_type: bus type\n private: to qdev / bus."]
pub bus_type: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of DeviceClass"][::std::mem::size_of::<DeviceClass>() - 184usize];
["Alignment of DeviceClass"][::std::mem::align_of::<DeviceClass>() - 8usize];
["Offset of field: DeviceClass::parent_class"]
[::std::mem::offset_of!(DeviceClass, parent_class) - 0usize];
["Offset of field: DeviceClass::categories"]
[::std::mem::offset_of!(DeviceClass, categories) - 96usize];
["Offset of field: DeviceClass::fw_name"]
[::std::mem::offset_of!(DeviceClass, fw_name) - 104usize];
["Offset of field: DeviceClass::desc"][::std::mem::offset_of!(DeviceClass, desc) - 112usize];
["Offset of field: DeviceClass::props_"]
[::std::mem::offset_of!(DeviceClass, props_) - 120usize];
["Offset of field: DeviceClass::props_count_"]
[::std::mem::offset_of!(DeviceClass, props_count_) - 128usize];
["Offset of field: DeviceClass::user_creatable"]
[::std::mem::offset_of!(DeviceClass, user_creatable) - 130usize];
["Offset of field: DeviceClass::hotpluggable"]
[::std::mem::offset_of!(DeviceClass, hotpluggable) - 131usize];
["Offset of field: DeviceClass::legacy_reset"]
[::std::mem::offset_of!(DeviceClass, legacy_reset) - 136usize];
["Offset of field: DeviceClass::realize"]
[::std::mem::offset_of!(DeviceClass, realize) - 144usize];
["Offset of field: DeviceClass::unrealize"]
[::std::mem::offset_of!(DeviceClass, unrealize) - 152usize];
["Offset of field: DeviceClass::sync_config"]
[::std::mem::offset_of!(DeviceClass, sync_config) - 160usize];
["Offset of field: DeviceClass::vmsd"][::std::mem::offset_of!(DeviceClass, vmsd) - 168usize];
["Offset of field: DeviceClass::bus_type"]
[::std::mem::offset_of!(DeviceClass, bus_type) - 176usize];
};
impl Default for DeviceClass {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NamedGPIOList {
pub name: *mut ::std::os::raw::c_char,
pub in_: *mut qemu_irq,
pub num_in: ::std::os::raw::c_int,
pub num_out: ::std::os::raw::c_int,
pub node: NamedGPIOList__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NamedGPIOList__bindgen_ty_1 {
pub le_next: *mut NamedGPIOList,
pub le_prev: *mut *mut NamedGPIOList,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of NamedGPIOList__bindgen_ty_1"]
[::std::mem::size_of::<NamedGPIOList__bindgen_ty_1>() - 16usize];
["Alignment of NamedGPIOList__bindgen_ty_1"]
[::std::mem::align_of::<NamedGPIOList__bindgen_ty_1>() - 8usize];
["Offset of field: NamedGPIOList__bindgen_ty_1::le_next"]
[::std::mem::offset_of!(NamedGPIOList__bindgen_ty_1, le_next) - 0usize];
["Offset of field: NamedGPIOList__bindgen_ty_1::le_prev"]
[::std::mem::offset_of!(NamedGPIOList__bindgen_ty_1, le_prev) - 8usize];
};
impl Default for NamedGPIOList__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of NamedGPIOList"][::std::mem::size_of::<NamedGPIOList>() - 40usize];
["Alignment of NamedGPIOList"][::std::mem::align_of::<NamedGPIOList>() - 8usize];
["Offset of field: NamedGPIOList::name"][::std::mem::offset_of!(NamedGPIOList, name) - 0usize];
["Offset of field: NamedGPIOList::in_"][::std::mem::offset_of!(NamedGPIOList, in_) - 8usize];
["Offset of field: NamedGPIOList::num_in"]
[::std::mem::offset_of!(NamedGPIOList, num_in) - 16usize];
["Offset of field: NamedGPIOList::num_out"]
[::std::mem::offset_of!(NamedGPIOList, num_out) - 20usize];
["Offset of field: NamedGPIOList::node"][::std::mem::offset_of!(NamedGPIOList, node) - 24usize];
};
impl Default for NamedGPIOList {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NamedClockList {
pub name: *mut ::std::os::raw::c_char,
pub clock: *mut Clock,
pub output: bool,
pub alias: bool,
pub node: NamedClockList__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NamedClockList__bindgen_ty_1 {
pub le_next: *mut NamedClockList,
pub le_prev: *mut *mut NamedClockList,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of NamedClockList__bindgen_ty_1"]
[::std::mem::size_of::<NamedClockList__bindgen_ty_1>() - 16usize];
["Alignment of NamedClockList__bindgen_ty_1"]
[::std::mem::align_of::<NamedClockList__bindgen_ty_1>() - 8usize];
["Offset of field: NamedClockList__bindgen_ty_1::le_next"]
[::std::mem::offset_of!(NamedClockList__bindgen_ty_1, le_next) - 0usize];
["Offset of field: NamedClockList__bindgen_ty_1::le_prev"]
[::std::mem::offset_of!(NamedClockList__bindgen_ty_1, le_prev) - 8usize];
};
impl Default for NamedClockList__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of NamedClockList"][::std::mem::size_of::<NamedClockList>() - 40usize];
["Alignment of NamedClockList"][::std::mem::align_of::<NamedClockList>() - 8usize];
["Offset of field: NamedClockList::name"]
[::std::mem::offset_of!(NamedClockList, name) - 0usize];
["Offset of field: NamedClockList::clock"]
[::std::mem::offset_of!(NamedClockList, clock) - 8usize];
["Offset of field: NamedClockList::output"]
[::std::mem::offset_of!(NamedClockList, output) - 16usize];
["Offset of field: NamedClockList::alias"]
[::std::mem::offset_of!(NamedClockList, alias) - 17usize];
["Offset of field: NamedClockList::node"]
[::std::mem::offset_of!(NamedClockList, node) - 24usize];
};
impl Default for NamedClockList {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MemReentrancyGuard {
pub engaged_in_io: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of MemReentrancyGuard"][::std::mem::size_of::<MemReentrancyGuard>() - 1usize];
["Alignment of MemReentrancyGuard"][::std::mem::align_of::<MemReentrancyGuard>() - 1usize];
["Offset of field: MemReentrancyGuard::engaged_in_io"]
[::std::mem::offset_of!(MemReentrancyGuard, engaged_in_io) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NamedGPIOListHead {
pub lh_first: *mut NamedGPIOList,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of NamedGPIOListHead"][::std::mem::size_of::<NamedGPIOListHead>() - 8usize];
["Alignment of NamedGPIOListHead"][::std::mem::align_of::<NamedGPIOListHead>() - 8usize];
["Offset of field: NamedGPIOListHead::lh_first"]
[::std::mem::offset_of!(NamedGPIOListHead, lh_first) - 0usize];
};
impl Default for NamedGPIOListHead {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NamedClockListHead {
pub lh_first: *mut NamedClockList,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of NamedClockListHead"][::std::mem::size_of::<NamedClockListHead>() - 8usize];
["Alignment of NamedClockListHead"][::std::mem::align_of::<NamedClockListHead>() - 8usize];
["Offset of field: NamedClockListHead::lh_first"]
[::std::mem::offset_of!(NamedClockListHead, lh_first) - 0usize];
};
impl Default for NamedClockListHead {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BusStateHead {
pub lh_first: *mut BusState,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BusStateHead"][::std::mem::size_of::<BusStateHead>() - 8usize];
["Alignment of BusStateHead"][::std::mem::align_of::<BusStateHead>() - 8usize];
["Offset of field: BusStateHead::lh_first"]
[::std::mem::offset_of!(BusStateHead, lh_first) - 0usize];
};
impl Default for BusStateHead {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[doc = " struct DeviceState - common device state, accessed with qdev helpers\n\n This structure should not be accessed directly. We declare it here\n so that it can be embedded in individual device state structures."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DeviceState {
pub parent_obj: Object,
#[doc = " @id: global device id"]
pub id: *mut ::std::os::raw::c_char,
#[doc = " @canonical_path: canonical path of realized device in the QOM tree"]
pub canonical_path: *mut ::std::os::raw::c_char,
#[doc = " @realized: has device been realized?"]
pub realized: bool,
#[doc = " @pending_deleted_event: track pending deletion events during unplug"]
pub pending_deleted_event: bool,
#[doc = " @pending_deleted_expires_ms: optional timeout for deletion events"]
pub pending_deleted_expires_ms: i64,
#[doc = " @hotplugged: was device added after PHASE_MACHINE_READY?"]
pub hotplugged: ::std::os::raw::c_int,
#[doc = " @allow_unplug_during_migration: can device be unplugged during migration"]
pub allow_unplug_during_migration: bool,
#[doc = " @parent_bus: bus this device belongs to"]
pub parent_bus: *mut BusState,
#[doc = " @gpios: QLIST of named GPIOs the device provides."]
pub gpios: NamedGPIOListHead,
#[doc = " @clocks: QLIST of named clocks the device provides."]
pub clocks: NamedClockListHead,
#[doc = " @child_bus: QLIST of child buses"]
pub child_bus: BusStateHead,
#[doc = " @num_child_bus: number of @child_bus entries"]
pub num_child_bus: ::std::os::raw::c_int,
#[doc = " @instance_id_alias: device alias for handling legacy migration setups"]
pub instance_id_alias: ::std::os::raw::c_int,
#[doc = " @alias_required_for_version: indicates @instance_id_alias is\n needed for migration"]
pub alias_required_for_version: ::std::os::raw::c_int,
#[doc = " @reset: ResettableState for the device; handled by Resettable interface."]
pub reset: ResettableState,
#[doc = " @unplug_blockers: list of reasons to block unplugging of device"]
pub unplug_blockers: *mut GSList,
#[doc = " @mem_reentrancy_guard: Is the device currently in mmio/pio/dma?\n\n Used to prevent re-entrancy confusing things."]
pub mem_reentrancy_guard: MemReentrancyGuard,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of DeviceState"][::std::mem::size_of::<DeviceState>() - 152usize];
["Alignment of DeviceState"][::std::mem::align_of::<DeviceState>() - 8usize];
["Offset of field: DeviceState::parent_obj"]
[::std::mem::offset_of!(DeviceState, parent_obj) - 0usize];
["Offset of field: DeviceState::id"][::std::mem::offset_of!(DeviceState, id) - 40usize];
["Offset of field: DeviceState::canonical_path"]
[::std::mem::offset_of!(DeviceState, canonical_path) - 48usize];
["Offset of field: DeviceState::realized"]
[::std::mem::offset_of!(DeviceState, realized) - 56usize];
["Offset of field: DeviceState::pending_deleted_event"]
[::std::mem::offset_of!(DeviceState, pending_deleted_event) - 57usize];
["Offset of field: DeviceState::pending_deleted_expires_ms"]
[::std::mem::offset_of!(DeviceState, pending_deleted_expires_ms) - 64usize];
["Offset of field: DeviceState::hotplugged"]
[::std::mem::offset_of!(DeviceState, hotplugged) - 72usize];
["Offset of field: DeviceState::allow_unplug_during_migration"]
[::std::mem::offset_of!(DeviceState, allow_unplug_during_migration) - 76usize];
["Offset of field: DeviceState::parent_bus"]
[::std::mem::offset_of!(DeviceState, parent_bus) - 80usize];
["Offset of field: DeviceState::gpios"][::std::mem::offset_of!(DeviceState, gpios) - 88usize];
["Offset of field: DeviceState::clocks"][::std::mem::offset_of!(DeviceState, clocks) - 96usize];
["Offset of field: DeviceState::child_bus"]
[::std::mem::offset_of!(DeviceState, child_bus) - 104usize];
["Offset of field: DeviceState::num_child_bus"]
[::std::mem::offset_of!(DeviceState, num_child_bus) - 112usize];
["Offset of field: DeviceState::instance_id_alias"]
[::std::mem::offset_of!(DeviceState, instance_id_alias) - 116usize];
["Offset of field: DeviceState::alias_required_for_version"]
[::std::mem::offset_of!(DeviceState, alias_required_for_version) - 120usize];
["Offset of field: DeviceState::reset"][::std::mem::offset_of!(DeviceState, reset) - 124usize];
["Offset of field: DeviceState::unplug_blockers"]
[::std::mem::offset_of!(DeviceState, unplug_blockers) - 136usize];
["Offset of field: DeviceState::mem_reentrancy_guard"]
[::std::mem::offset_of!(DeviceState, mem_reentrancy_guard) - 144usize];
};
impl Default for DeviceState {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct BusChild {
pub rcu: rcu_head,
pub child: *mut DeviceState,
pub index: ::std::os::raw::c_int,
pub sibling: BusChild__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union BusChild__bindgen_ty_1 {
pub tqe_next: *mut BusChild,
pub tqe_circ: QTailQLink,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BusChild__bindgen_ty_1"][::std::mem::size_of::<BusChild__bindgen_ty_1>() - 16usize];
["Alignment of BusChild__bindgen_ty_1"]
[::std::mem::align_of::<BusChild__bindgen_ty_1>() - 8usize];
["Offset of field: BusChild__bindgen_ty_1::tqe_next"]
[::std::mem::offset_of!(BusChild__bindgen_ty_1, tqe_next) - 0usize];
["Offset of field: BusChild__bindgen_ty_1::tqe_circ"]
[::std::mem::offset_of!(BusChild__bindgen_ty_1, tqe_circ) - 0usize];
};
impl Default for BusChild__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for BusChild__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "BusChild__bindgen_ty_1 {{ union }}")
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BusChild"][::std::mem::size_of::<BusChild>() - 48usize];
["Alignment of BusChild"][::std::mem::align_of::<BusChild>() - 8usize];
["Offset of field: BusChild::rcu"][::std::mem::offset_of!(BusChild, rcu) - 0usize];
["Offset of field: BusChild::child"][::std::mem::offset_of!(BusChild, child) - 16usize];
["Offset of field: BusChild::index"][::std::mem::offset_of!(BusChild, index) - 24usize];
["Offset of field: BusChild::sibling"][::std::mem::offset_of!(BusChild, sibling) - 32usize];
};
impl Default for BusChild {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for BusChild {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"BusChild {{ rcu: {:?}, child: {:?}, index: {:?}, sibling: {:?} }}",
self.rcu, self.child, self.index, self.sibling
)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union BusChildHead {
pub tqh_first: *mut BusChild,
pub tqh_circ: QTailQLink,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BusChildHead"][::std::mem::size_of::<BusChildHead>() - 16usize];
["Alignment of BusChildHead"][::std::mem::align_of::<BusChildHead>() - 8usize];
["Offset of field: BusChildHead::tqh_first"]
[::std::mem::offset_of!(BusChildHead, tqh_first) - 0usize];
["Offset of field: BusChildHead::tqh_circ"]
[::std::mem::offset_of!(BusChildHead, tqh_circ) - 0usize];
};
impl Default for BusChildHead {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for BusChildHead {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "BusChildHead {{ union }}")
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BusStateEntry {
pub le_next: *mut BusState,
pub le_prev: *mut *mut BusState,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BusStateEntry"][::std::mem::size_of::<BusStateEntry>() - 16usize];
["Alignment of BusStateEntry"][::std::mem::align_of::<BusStateEntry>() - 8usize];
["Offset of field: BusStateEntry::le_next"]
[::std::mem::offset_of!(BusStateEntry, le_next) - 0usize];
["Offset of field: BusStateEntry::le_prev"]
[::std::mem::offset_of!(BusStateEntry, le_prev) - 8usize];
};
impl Default for BusStateEntry {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[doc = " struct BusState:\n @obj: parent object\n @parent: parent Device\n @name: name of bus\n @hotplug_handler: link to a hotplug handler associated with bus.\n @max_index: max number of child buses\n @realized: is the bus itself realized?\n @full: is the bus full?\n @num_children: current number of child buses"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct BusState {
pub obj: Object,
pub parent: *mut DeviceState,
pub name: *mut ::std::os::raw::c_char,
pub hotplug_handler: *mut HotplugHandler,
pub max_index: ::std::os::raw::c_int,
pub realized: bool,
pub full: bool,
pub num_children: ::std::os::raw::c_int,
#[doc = " @children: an RCU protected QTAILQ, thus readers must use RCU\n to access it, and writers must hold the big qemu lock"]
pub children: BusChildHead,
#[doc = " @sibling: next bus"]
pub sibling: BusStateEntry,
#[doc = " @reset: ResettableState for the bus; handled by Resettable interface."]
pub reset: ResettableState,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BusState"][::std::mem::size_of::<BusState>() - 120usize];
["Alignment of BusState"][::std::mem::align_of::<BusState>() - 8usize];
["Offset of field: BusState::obj"][::std::mem::offset_of!(BusState, obj) - 0usize];
["Offset of field: BusState::parent"][::std::mem::offset_of!(BusState, parent) - 40usize];
["Offset of field: BusState::name"][::std::mem::offset_of!(BusState, name) - 48usize];
["Offset of field: BusState::hotplug_handler"]
[::std::mem::offset_of!(BusState, hotplug_handler) - 56usize];
["Offset of field: BusState::max_index"][::std::mem::offset_of!(BusState, max_index) - 64usize];
["Offset of field: BusState::realized"][::std::mem::offset_of!(BusState, realized) - 68usize];
["Offset of field: BusState::full"][::std::mem::offset_of!(BusState, full) - 69usize];
["Offset of field: BusState::num_children"]
[::std::mem::offset_of!(BusState, num_children) - 72usize];
["Offset of field: BusState::children"][::std::mem::offset_of!(BusState, children) - 80usize];
["Offset of field: BusState::sibling"][::std::mem::offset_of!(BusState, sibling) - 96usize];
["Offset of field: BusState::reset"][::std::mem::offset_of!(BusState, reset) - 112usize];
};
impl Default for BusState {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for BusState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"BusState {{ obj: {:?}, parent: {:?}, name: {:?}, hotplug_handler: {:?}, max_index: {:?}, realized: {:?}, full: {:?}, num_children: {:?}, children: {:?}, sibling: {:?}, reset: {:?} }}",
self.obj,
self.parent,
self.name,
self.hotplug_handler,
self.max_index,
self.realized,
self.full,
self.num_children,
self.children,
self.sibling,
self.reset
)
}
}
#[doc = " Property:\n @set_default: true if the default value should be set from @defval,\n in which case @info->set_default_value must not be NULL\n (if false then no default value is set by the property system\n and the field retains whatever value it was given by instance_init).\n @defval: default value for the property. This is used only if @set_default\n is true."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Property {
pub name: *const ::std::os::raw::c_char,
pub info: *const PropertyInfo,
pub offset: isize,
pub link_type: *const ::std::os::raw::c_char,
pub bitmask: u64,
pub defval: Property__bindgen_ty_1,
pub arrayinfo: *const PropertyInfo,
pub arrayoffset: ::std::os::raw::c_int,
pub arrayfieldsize: ::std::os::raw::c_int,
pub bitnr: u8,
pub set_default: bool,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union Property__bindgen_ty_1 {
pub i: i64,
pub u: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of Property__bindgen_ty_1"][::std::mem::size_of::<Property__bindgen_ty_1>() - 8usize];
["Alignment of Property__bindgen_ty_1"]
[::std::mem::align_of::<Property__bindgen_ty_1>() - 8usize];
["Offset of field: Property__bindgen_ty_1::i"]
[::std::mem::offset_of!(Property__bindgen_ty_1, i) - 0usize];
["Offset of field: Property__bindgen_ty_1::u"]
[::std::mem::offset_of!(Property__bindgen_ty_1, u) - 0usize];
};
impl Default for Property__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for Property__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "Property__bindgen_ty_1 {{ union }}")
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of Property"][::std::mem::size_of::<Property>() - 72usize];
["Alignment of Property"][::std::mem::align_of::<Property>() - 8usize];
["Offset of field: Property::name"][::std::mem::offset_of!(Property, name) - 0usize];
["Offset of field: Property::info"][::std::mem::offset_of!(Property, info) - 8usize];
["Offset of field: Property::offset"][::std::mem::offset_of!(Property, offset) - 16usize];
["Offset of field: Property::link_type"][::std::mem::offset_of!(Property, link_type) - 24usize];
["Offset of field: Property::bitmask"][::std::mem::offset_of!(Property, bitmask) - 32usize];
["Offset of field: Property::defval"][::std::mem::offset_of!(Property, defval) - 40usize];
["Offset of field: Property::arrayinfo"][::std::mem::offset_of!(Property, arrayinfo) - 48usize];
["Offset of field: Property::arrayoffset"]
[::std::mem::offset_of!(Property, arrayoffset) - 56usize];
["Offset of field: Property::arrayfieldsize"]
[::std::mem::offset_of!(Property, arrayfieldsize) - 60usize];
["Offset of field: Property::bitnr"][::std::mem::offset_of!(Property, bitnr) - 64usize];
["Offset of field: Property::set_default"]
[::std::mem::offset_of!(Property, set_default) - 65usize];
};
impl Default for Property {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for Property {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"Property {{ name: {:?}, info: {:?}, link_type: {:?}, defval: {:?}, arrayinfo: {:?}, arrayoffset: {:?}, arrayfieldsize: {:?}, set_default: {:?} }}",
self.name,
self.info,
self.link_type,
self.defval,
self.arrayinfo,
self.arrayoffset,
self.arrayfieldsize,
self.set_default
)
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PropertyInfo {
pub type_: *const ::std::os::raw::c_char,
pub description: *const ::std::os::raw::c_char,
pub enum_table: *const QEnumLookup,
pub realized_set_allowed: bool,
pub print: ::std::option::Option<
unsafe extern "C" fn(
obj: *mut Object,
prop: *const Property,
) -> *mut ::std::os::raw::c_char,
>,
pub set_default_value:
::std::option::Option<unsafe extern "C" fn(op: *mut ObjectProperty, prop: *const Property)>,
pub create: ::std::option::Option<
unsafe extern "C" fn(
oc: *mut ObjectClass,
name: *const ::std::os::raw::c_char,
prop: *const Property,
) -> *mut ObjectProperty,
>,
pub get: ObjectPropertyAccessor,
pub set: ObjectPropertyAccessor,
pub release: ObjectPropertyRelease,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of PropertyInfo"][::std::mem::size_of::<PropertyInfo>() - 80usize];
["Alignment of PropertyInfo"][::std::mem::align_of::<PropertyInfo>() - 8usize];
["Offset of field: PropertyInfo::type_"][::std::mem::offset_of!(PropertyInfo, type_) - 0usize];
["Offset of field: PropertyInfo::description"]
[::std::mem::offset_of!(PropertyInfo, description) - 8usize];
["Offset of field: PropertyInfo::enum_table"]
[::std::mem::offset_of!(PropertyInfo, enum_table) - 16usize];
["Offset of field: PropertyInfo::realized_set_allowed"]
[::std::mem::offset_of!(PropertyInfo, realized_set_allowed) - 24usize];
["Offset of field: PropertyInfo::print"][::std::mem::offset_of!(PropertyInfo, print) - 32usize];
["Offset of field: PropertyInfo::set_default_value"]
[::std::mem::offset_of!(PropertyInfo, set_default_value) - 40usize];
["Offset of field: PropertyInfo::create"]
[::std::mem::offset_of!(PropertyInfo, create) - 48usize];
["Offset of field: PropertyInfo::get"][::std::mem::offset_of!(PropertyInfo, get) - 56usize];
["Offset of field: PropertyInfo::set"][::std::mem::offset_of!(PropertyInfo, set) - 64usize];
["Offset of field: PropertyInfo::release"]
[::std::mem::offset_of!(PropertyInfo, release) - 72usize];
};
impl Default for PropertyInfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type PTR = *mut ::std::os::raw::c_void;
pub type bfd_vma = u64;
pub type bfd_byte = u8;
pub const bfd_flavour_bfd_target_unknown_flavour: bfd_flavour = bfd_flavour(0);
pub const bfd_flavour_bfd_target_aout_flavour: bfd_flavour = bfd_flavour(1);
pub const bfd_flavour_bfd_target_coff_flavour: bfd_flavour = bfd_flavour(2);
pub const bfd_flavour_bfd_target_ecoff_flavour: bfd_flavour = bfd_flavour(3);
pub const bfd_flavour_bfd_target_elf_flavour: bfd_flavour = bfd_flavour(4);
pub const bfd_flavour_bfd_target_ieee_flavour: bfd_flavour = bfd_flavour(5);
pub const bfd_flavour_bfd_target_nlm_flavour: bfd_flavour = bfd_flavour(6);
pub const bfd_flavour_bfd_target_oasys_flavour: bfd_flavour = bfd_flavour(7);
pub const bfd_flavour_bfd_target_tekhex_flavour: bfd_flavour = bfd_flavour(8);
pub const bfd_flavour_bfd_target_srec_flavour: bfd_flavour = bfd_flavour(9);
pub const bfd_flavour_bfd_target_ihex_flavour: bfd_flavour = bfd_flavour(10);
pub const bfd_flavour_bfd_target_som_flavour: bfd_flavour = bfd_flavour(11);
pub const bfd_flavour_bfd_target_os9k_flavour: bfd_flavour = bfd_flavour(12);
pub const bfd_flavour_bfd_target_versados_flavour: bfd_flavour = bfd_flavour(13);
pub const bfd_flavour_bfd_target_msdos_flavour: bfd_flavour = bfd_flavour(14);
pub const bfd_flavour_bfd_target_evax_flavour: bfd_flavour = bfd_flavour(15);
impl ::std::ops::BitOr<bfd_flavour> for bfd_flavour {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
bfd_flavour(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for bfd_flavour {
#[inline]
fn bitor_assign(&mut self, rhs: bfd_flavour) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<bfd_flavour> for bfd_flavour {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
bfd_flavour(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for bfd_flavour {
#[inline]
fn bitand_assign(&mut self, rhs: bfd_flavour) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct bfd_flavour(pub ::std::os::raw::c_uint);
pub const bfd_endian_BFD_ENDIAN_BIG: bfd_endian = bfd_endian(0);
pub const bfd_endian_BFD_ENDIAN_LITTLE: bfd_endian = bfd_endian(1);
pub const bfd_endian_BFD_ENDIAN_UNKNOWN: bfd_endian = bfd_endian(2);
impl ::std::ops::BitOr<bfd_endian> for bfd_endian {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
bfd_endian(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for bfd_endian {
#[inline]
fn bitor_assign(&mut self, rhs: bfd_endian) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<bfd_endian> for bfd_endian {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
bfd_endian(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for bfd_endian {
#[inline]
fn bitand_assign(&mut self, rhs: bfd_endian) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct bfd_endian(pub ::std::os::raw::c_uint);
pub const bfd_architecture_bfd_arch_unknown: bfd_architecture = bfd_architecture(0);
pub const bfd_architecture_bfd_arch_obscure: bfd_architecture = bfd_architecture(1);
pub const bfd_architecture_bfd_arch_m68k: bfd_architecture = bfd_architecture(2);
pub const bfd_architecture_bfd_arch_vax: bfd_architecture = bfd_architecture(3);
pub const bfd_architecture_bfd_arch_i960: bfd_architecture = bfd_architecture(4);
pub const bfd_architecture_bfd_arch_a29k: bfd_architecture = bfd_architecture(5);
pub const bfd_architecture_bfd_arch_sparc: bfd_architecture = bfd_architecture(6);
pub const bfd_architecture_bfd_arch_mips: bfd_architecture = bfd_architecture(7);
pub const bfd_architecture_bfd_arch_i386: bfd_architecture = bfd_architecture(8);
pub const bfd_architecture_bfd_arch_we32k: bfd_architecture = bfd_architecture(9);
pub const bfd_architecture_bfd_arch_tahoe: bfd_architecture = bfd_architecture(10);
pub const bfd_architecture_bfd_arch_i860: bfd_architecture = bfd_architecture(11);
pub const bfd_architecture_bfd_arch_romp: bfd_architecture = bfd_architecture(12);
pub const bfd_architecture_bfd_arch_alliant: bfd_architecture = bfd_architecture(13);
pub const bfd_architecture_bfd_arch_convex: bfd_architecture = bfd_architecture(14);
pub const bfd_architecture_bfd_arch_m88k: bfd_architecture = bfd_architecture(15);
pub const bfd_architecture_bfd_arch_pyramid: bfd_architecture = bfd_architecture(16);
pub const bfd_architecture_bfd_arch_h8300: bfd_architecture = bfd_architecture(17);
pub const bfd_architecture_bfd_arch_powerpc: bfd_architecture = bfd_architecture(18);
pub const bfd_architecture_bfd_arch_rs6000: bfd_architecture = bfd_architecture(19);
pub const bfd_architecture_bfd_arch_hppa: bfd_architecture = bfd_architecture(20);
pub const bfd_architecture_bfd_arch_d10v: bfd_architecture = bfd_architecture(21);
pub const bfd_architecture_bfd_arch_z8k: bfd_architecture = bfd_architecture(22);
pub const bfd_architecture_bfd_arch_h8500: bfd_architecture = bfd_architecture(23);
pub const bfd_architecture_bfd_arch_sh: bfd_architecture = bfd_architecture(24);
pub const bfd_architecture_bfd_arch_alpha: bfd_architecture = bfd_architecture(25);
pub const bfd_architecture_bfd_arch_arm: bfd_architecture = bfd_architecture(26);
pub const bfd_architecture_bfd_arch_ns32k: bfd_architecture = bfd_architecture(27);
pub const bfd_architecture_bfd_arch_w65: bfd_architecture = bfd_architecture(28);
pub const bfd_architecture_bfd_arch_tic30: bfd_architecture = bfd_architecture(29);
pub const bfd_architecture_bfd_arch_v850: bfd_architecture = bfd_architecture(30);
pub const bfd_architecture_bfd_arch_arc: bfd_architecture = bfd_architecture(31);
pub const bfd_architecture_bfd_arch_m32r: bfd_architecture = bfd_architecture(32);
pub const bfd_architecture_bfd_arch_mn10200: bfd_architecture = bfd_architecture(33);
pub const bfd_architecture_bfd_arch_mn10300: bfd_architecture = bfd_architecture(34);
pub const bfd_architecture_bfd_arch_avr: bfd_architecture = bfd_architecture(35);
pub const bfd_architecture_bfd_arch_microblaze: bfd_architecture = bfd_architecture(36);
pub const bfd_architecture_bfd_arch_moxie: bfd_architecture = bfd_architecture(37);
pub const bfd_architecture_bfd_arch_ia64: bfd_architecture = bfd_architecture(38);
pub const bfd_architecture_bfd_arch_rx: bfd_architecture = bfd_architecture(39);
pub const bfd_architecture_bfd_arch_loongarch: bfd_architecture = bfd_architecture(40);
pub const bfd_architecture_bfd_arch_last: bfd_architecture = bfd_architecture(41);
impl ::std::ops::BitOr<bfd_architecture> for bfd_architecture {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
bfd_architecture(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for bfd_architecture {
#[inline]
fn bitor_assign(&mut self, rhs: bfd_architecture) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<bfd_architecture> for bfd_architecture {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
bfd_architecture(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for bfd_architecture {
#[inline]
fn bitand_assign(&mut self, rhs: bfd_architecture) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct bfd_architecture(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Copy, Clone)]
pub struct symbol_cache_entry {
pub name: *const ::std::os::raw::c_char,
pub udata: symbol_cache_entry__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union symbol_cache_entry__bindgen_ty_1 {
pub p: PTR,
pub i: bfd_vma,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of symbol_cache_entry__bindgen_ty_1"]
[::std::mem::size_of::<symbol_cache_entry__bindgen_ty_1>() - 8usize];
["Alignment of symbol_cache_entry__bindgen_ty_1"]
[::std::mem::align_of::<symbol_cache_entry__bindgen_ty_1>() - 8usize];
["Offset of field: symbol_cache_entry__bindgen_ty_1::p"]
[::std::mem::offset_of!(symbol_cache_entry__bindgen_ty_1, p) - 0usize];
["Offset of field: symbol_cache_entry__bindgen_ty_1::i"]
[::std::mem::offset_of!(symbol_cache_entry__bindgen_ty_1, i) - 0usize];
};
impl Default for symbol_cache_entry__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for symbol_cache_entry__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "symbol_cache_entry__bindgen_ty_1 {{ union }}")
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of symbol_cache_entry"][::std::mem::size_of::<symbol_cache_entry>() - 16usize];
["Alignment of symbol_cache_entry"][::std::mem::align_of::<symbol_cache_entry>() - 8usize];
["Offset of field: symbol_cache_entry::name"]
[::std::mem::offset_of!(symbol_cache_entry, name) - 0usize];
["Offset of field: symbol_cache_entry::udata"]
[::std::mem::offset_of!(symbol_cache_entry, udata) - 8usize];
};
impl Default for symbol_cache_entry {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for symbol_cache_entry {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"symbol_cache_entry {{ name: {:?}, udata: {:?} }}",
self.name, self.udata
)
}
}
pub type asymbol = symbol_cache_entry;
pub type fprintf_function = ::std::option::Option<
unsafe extern "C" fn(
f: *mut FILE,
fmt: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int,
>;
pub const dis_insn_type_dis_noninsn: dis_insn_type = dis_insn_type(0);
pub const dis_insn_type_dis_nonbranch: dis_insn_type = dis_insn_type(1);
pub const dis_insn_type_dis_branch: dis_insn_type = dis_insn_type(2);
pub const dis_insn_type_dis_condbranch: dis_insn_type = dis_insn_type(3);
pub const dis_insn_type_dis_jsr: dis_insn_type = dis_insn_type(4);
pub const dis_insn_type_dis_condjsr: dis_insn_type = dis_insn_type(5);
pub const dis_insn_type_dis_dref: dis_insn_type = dis_insn_type(6);
pub const dis_insn_type_dis_dref2: dis_insn_type = dis_insn_type(7);
impl ::std::ops::BitOr<dis_insn_type> for dis_insn_type {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
dis_insn_type(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for dis_insn_type {
#[inline]
fn bitor_assign(&mut self, rhs: dis_insn_type) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<dis_insn_type> for dis_insn_type {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
dis_insn_type(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for dis_insn_type {
#[inline]
fn bitand_assign(&mut self, rhs: dis_insn_type) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct dis_insn_type(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct disassemble_info {
pub fprintf_func: fprintf_function,
pub stream: *mut FILE,
pub application_data: PTR,
pub flavour: bfd_flavour,
pub arch: bfd_architecture,
pub mach: ::std::os::raw::c_ulong,
pub endian: bfd_endian,
pub symbols: *mut *mut asymbol,
pub num_symbols: ::std::os::raw::c_int,
pub flags: ::std::os::raw::c_ulong,
pub private_data: PTR,
pub read_memory_func: ::std::option::Option<
unsafe extern "C" fn(
memaddr: bfd_vma,
myaddr: *mut bfd_byte,
length: ::std::os::raw::c_int,
info: *mut disassemble_info,
) -> ::std::os::raw::c_int,
>,
pub memory_error_func: ::std::option::Option<
unsafe extern "C" fn(
status: ::std::os::raw::c_int,
memaddr: bfd_vma,
info: *mut disassemble_info,
),
>,
pub print_address_func:
::std::option::Option<unsafe extern "C" fn(addr: bfd_vma, info: *mut disassemble_info)>,
pub print_insn: ::std::option::Option<
unsafe extern "C" fn(addr: bfd_vma, info: *mut disassemble_info) -> ::std::os::raw::c_int,
>,
pub symbol_at_address_func: ::std::option::Option<
unsafe extern "C" fn(addr: bfd_vma, info: *mut disassemble_info) -> ::std::os::raw::c_int,
>,
pub buffer: *const bfd_byte,
pub buffer_vma: bfd_vma,
pub buffer_length: ::std::os::raw::c_int,
pub bytes_per_line: ::std::os::raw::c_int,
pub bytes_per_chunk: ::std::os::raw::c_int,
pub display_endian: bfd_endian,
pub insn_info_valid: ::std::os::raw::c_char,
pub branch_delay_insns: ::std::os::raw::c_char,
pub data_size: ::std::os::raw::c_char,
pub insn_type: dis_insn_type,
pub target: bfd_vma,
pub target2: bfd_vma,
pub disassembler_options: *mut ::std::os::raw::c_char,
pub show_opcodes: bool,
pub target_info: *mut ::std::os::raw::c_void,
pub cap_arch: ::std::os::raw::c_int,
pub cap_mode: ::std::os::raw::c_int,
pub cap_insn_unit: ::std::os::raw::c_int,
pub cap_insn_split: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of disassemble_info"][::std::mem::size_of::<disassemble_info>() - 216usize];
["Alignment of disassemble_info"][::std::mem::align_of::<disassemble_info>() - 8usize];
["Offset of field: disassemble_info::fprintf_func"]
[::std::mem::offset_of!(disassemble_info, fprintf_func) - 0usize];
["Offset of field: disassemble_info::stream"]
[::std::mem::offset_of!(disassemble_info, stream) - 8usize];
["Offset of field: disassemble_info::application_data"]
[::std::mem::offset_of!(disassemble_info, application_data) - 16usize];
["Offset of field: disassemble_info::flavour"]
[::std::mem::offset_of!(disassemble_info, flavour) - 24usize];
["Offset of field: disassemble_info::arch"]
[::std::mem::offset_of!(disassemble_info, arch) - 28usize];
["Offset of field: disassemble_info::mach"]
[::std::mem::offset_of!(disassemble_info, mach) - 32usize];
["Offset of field: disassemble_info::endian"]
[::std::mem::offset_of!(disassemble_info, endian) - 40usize];
["Offset of field: disassemble_info::symbols"]
[::std::mem::offset_of!(disassemble_info, symbols) - 48usize];
["Offset of field: disassemble_info::num_symbols"]
[::std::mem::offset_of!(disassemble_info, num_symbols) - 56usize];
["Offset of field: disassemble_info::flags"]
[::std::mem::offset_of!(disassemble_info, flags) - 64usize];
["Offset of field: disassemble_info::private_data"]
[::std::mem::offset_of!(disassemble_info, private_data) - 72usize];
["Offset of field: disassemble_info::read_memory_func"]
[::std::mem::offset_of!(disassemble_info, read_memory_func) - 80usize];
["Offset of field: disassemble_info::memory_error_func"]
[::std::mem::offset_of!(disassemble_info, memory_error_func) - 88usize];
["Offset of field: disassemble_info::print_address_func"]
[::std::mem::offset_of!(disassemble_info, print_address_func) - 96usize];
["Offset of field: disassemble_info::print_insn"]
[::std::mem::offset_of!(disassemble_info, print_insn) - 104usize];
["Offset of field: disassemble_info::symbol_at_address_func"]
[::std::mem::offset_of!(disassemble_info, symbol_at_address_func) - 112usize];
["Offset of field: disassemble_info::buffer"]
[::std::mem::offset_of!(disassemble_info, buffer) - 120usize];
["Offset of field: disassemble_info::buffer_vma"]
[::std::mem::offset_of!(disassemble_info, buffer_vma) - 128usize];
["Offset of field: disassemble_info::buffer_length"]
[::std::mem::offset_of!(disassemble_info, buffer_length) - 136usize];
["Offset of field: disassemble_info::bytes_per_line"]
[::std::mem::offset_of!(disassemble_info, bytes_per_line) - 140usize];
["Offset of field: disassemble_info::bytes_per_chunk"]
[::std::mem::offset_of!(disassemble_info, bytes_per_chunk) - 144usize];
["Offset of field: disassemble_info::display_endian"]
[::std::mem::offset_of!(disassemble_info, display_endian) - 148usize];
["Offset of field: disassemble_info::insn_info_valid"]
[::std::mem::offset_of!(disassemble_info, insn_info_valid) - 152usize];
["Offset of field: disassemble_info::branch_delay_insns"]
[::std::mem::offset_of!(disassemble_info, branch_delay_insns) - 153usize];
["Offset of field: disassemble_info::data_size"]
[::std::mem::offset_of!(disassemble_info, data_size) - 154usize];
["Offset of field: disassemble_info::insn_type"]
[::std::mem::offset_of!(disassemble_info, insn_type) - 156usize];
["Offset of field: disassemble_info::target"]
[::std::mem::offset_of!(disassemble_info, target) - 160usize];
["Offset of field: disassemble_info::target2"]
[::std::mem::offset_of!(disassemble_info, target2) - 168usize];
["Offset of field: disassemble_info::disassembler_options"]
[::std::mem::offset_of!(disassemble_info, disassembler_options) - 176usize];
["Offset of field: disassemble_info::show_opcodes"]
[::std::mem::offset_of!(disassemble_info, show_opcodes) - 184usize];
["Offset of field: disassemble_info::target_info"]
[::std::mem::offset_of!(disassemble_info, target_info) - 192usize];
["Offset of field: disassemble_info::cap_arch"]
[::std::mem::offset_of!(disassemble_info, cap_arch) - 200usize];
["Offset of field: disassemble_info::cap_mode"]
[::std::mem::offset_of!(disassemble_info, cap_mode) - 204usize];
["Offset of field: disassemble_info::cap_insn_unit"]
[::std::mem::offset_of!(disassemble_info, cap_insn_unit) - 208usize];
["Offset of field: disassemble_info::cap_insn_split"]
[::std::mem::offset_of!(disassemble_info, cap_insn_split) - 212usize];
};
impl Default for disassemble_info {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[doc = " vaddr:\n Type wide enough to contain any #target_ulong virtual address.\n We do not support 64-bit guest on 32-host and detect at configure time.\n Therefore, a host pointer width will always fit a guest pointer."]
pub type vaddr = usize;
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Default, Copy, Clone)]
pub struct MemTxAttrs {
pub _bitfield_align_1: [u16; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
pub unspecified: bool,
pub _reserved1: u8,
pub _reserved2: u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of MemTxAttrs"][::std::mem::size_of::<MemTxAttrs>() - 8usize];
["Alignment of MemTxAttrs"][::std::mem::align_of::<MemTxAttrs>() - 4usize];
["Offset of field: MemTxAttrs::unspecified"]
[::std::mem::offset_of!(MemTxAttrs, unspecified) - 4usize];
["Offset of field: MemTxAttrs::_reserved1"]
[::std::mem::offset_of!(MemTxAttrs, _reserved1) - 5usize];
["Offset of field: MemTxAttrs::_reserved2"]
[::std::mem::offset_of!(MemTxAttrs, _reserved2) - 6usize];
};
impl MemTxAttrs {
#[inline]
pub fn secure(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_secure(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub unsafe fn secure_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
0usize,
1u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_secure_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
0usize,
1u8,
val as u64,
)
}
}
#[inline]
pub fn space(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) }
}
#[inline]
pub fn set_space(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(1usize, 2u8, val as u64)
}
}
#[inline]
pub unsafe fn space_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
1usize,
2u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_space_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
1usize,
2u8,
val as u64,
)
}
}
#[inline]
pub fn user(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
}
#[inline]
pub fn set_user(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, val as u64)
}
}
#[inline]
pub unsafe fn user_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
3usize,
1u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_user_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
3usize,
1u8,
val as u64,
)
}
}
#[inline]
pub fn memory(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
}
#[inline]
pub fn set_memory(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(4usize, 1u8, val as u64)
}
}
#[inline]
pub unsafe fn memory_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
4usize,
1u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_memory_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
4usize,
1u8,
val as u64,
)
}
}
#[inline]
pub fn debug(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
}
#[inline]
pub fn set_debug(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 1u8, val as u64)
}
}
#[inline]
pub unsafe fn debug_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
5usize,
1u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_debug_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
5usize,
1u8,
val as u64,
)
}
}
#[inline]
pub fn requester_id(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 16u8) as u32) }
}
#[inline]
pub fn set_requester_id(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(6usize, 16u8, val as u64)
}
}
#[inline]
pub unsafe fn requester_id_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
6usize,
16u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_requester_id_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
6usize,
16u8,
val as u64,
)
}
}
#[inline]
pub fn pid(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 8u8) as u32) }
}
#[inline]
pub fn set_pid(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(22usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn pid_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
22usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_pid_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
22usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn address_type(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) }
}
#[inline]
pub fn set_address_type(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(30usize, 1u8, val as u64)
}
}
#[inline]
pub unsafe fn address_type_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
30usize,
1u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_address_type_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
30usize,
1u8,
val as u64,
)
}
}
#[inline]
pub fn new_bitfield_1(
secure: ::std::os::raw::c_uint,
space: ::std::os::raw::c_uint,
user: ::std::os::raw::c_uint,
memory: ::std::os::raw::c_uint,
debug: ::std::os::raw::c_uint,
requester_id: ::std::os::raw::c_uint,
pid: ::std::os::raw::c_uint,
address_type: ::std::os::raw::c_uint,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let secure: u32 = unsafe { ::std::mem::transmute(secure) };
secure as u64
});
__bindgen_bitfield_unit.set(1usize, 2u8, {
let space: u32 = unsafe { ::std::mem::transmute(space) };
space as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let user: u32 = unsafe { ::std::mem::transmute(user) };
user as u64
});
__bindgen_bitfield_unit.set(4usize, 1u8, {
let memory: u32 = unsafe { ::std::mem::transmute(memory) };
memory as u64
});
__bindgen_bitfield_unit.set(5usize, 1u8, {
let debug: u32 = unsafe { ::std::mem::transmute(debug) };
debug as u64
});
__bindgen_bitfield_unit.set(6usize, 16u8, {
let requester_id: u32 = unsafe { ::std::mem::transmute(requester_id) };
requester_id as u64
});
__bindgen_bitfield_unit.set(22usize, 8u8, {
let pid: u32 = unsafe { ::std::mem::transmute(pid) };
pid as u64
});
__bindgen_bitfield_unit.set(30usize, 1u8, {
let address_type: u32 = unsafe { ::std::mem::transmute(address_type) };
address_type as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CPUBreakpoint {
pub pc: vaddr,
pub flags: ::std::os::raw::c_int,
pub entry: CPUBreakpoint__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPUBreakpoint__bindgen_ty_1 {
pub tqe_next: *mut CPUBreakpoint,
pub tqe_circ: QTailQLink,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUBreakpoint__bindgen_ty_1"]
[::std::mem::size_of::<CPUBreakpoint__bindgen_ty_1>() - 16usize];
["Alignment of CPUBreakpoint__bindgen_ty_1"]
[::std::mem::align_of::<CPUBreakpoint__bindgen_ty_1>() - 8usize];
["Offset of field: CPUBreakpoint__bindgen_ty_1::tqe_next"]
[::std::mem::offset_of!(CPUBreakpoint__bindgen_ty_1, tqe_next) - 0usize];
["Offset of field: CPUBreakpoint__bindgen_ty_1::tqe_circ"]
[::std::mem::offset_of!(CPUBreakpoint__bindgen_ty_1, tqe_circ) - 0usize];
};
impl Default for CPUBreakpoint__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUBreakpoint__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "CPUBreakpoint__bindgen_ty_1 {{ union }}")
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUBreakpoint"][::std::mem::size_of::<CPUBreakpoint>() - 32usize];
["Alignment of CPUBreakpoint"][::std::mem::align_of::<CPUBreakpoint>() - 8usize];
["Offset of field: CPUBreakpoint::pc"][::std::mem::offset_of!(CPUBreakpoint, pc) - 0usize];
["Offset of field: CPUBreakpoint::flags"]
[::std::mem::offset_of!(CPUBreakpoint, flags) - 8usize];
["Offset of field: CPUBreakpoint::entry"]
[::std::mem::offset_of!(CPUBreakpoint, entry) - 16usize];
};
impl Default for CPUBreakpoint {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUBreakpoint {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"CPUBreakpoint {{ flags: {:?}, entry: {:?} }}",
self.flags, self.entry
)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CPUWatchpoint {
pub vaddr: vaddr,
pub len: vaddr,
pub hitaddr: vaddr,
pub hitattrs: MemTxAttrs,
pub flags: ::std::os::raw::c_int,
pub entry: CPUWatchpoint__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPUWatchpoint__bindgen_ty_1 {
pub tqe_next: *mut CPUWatchpoint,
pub tqe_circ: QTailQLink,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUWatchpoint__bindgen_ty_1"]
[::std::mem::size_of::<CPUWatchpoint__bindgen_ty_1>() - 16usize];
["Alignment of CPUWatchpoint__bindgen_ty_1"]
[::std::mem::align_of::<CPUWatchpoint__bindgen_ty_1>() - 8usize];
["Offset of field: CPUWatchpoint__bindgen_ty_1::tqe_next"]
[::std::mem::offset_of!(CPUWatchpoint__bindgen_ty_1, tqe_next) - 0usize];
["Offset of field: CPUWatchpoint__bindgen_ty_1::tqe_circ"]
[::std::mem::offset_of!(CPUWatchpoint__bindgen_ty_1, tqe_circ) - 0usize];
};
impl Default for CPUWatchpoint__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUWatchpoint__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "CPUWatchpoint__bindgen_ty_1 {{ union }}")
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUWatchpoint"][::std::mem::size_of::<CPUWatchpoint>() - 56usize];
["Alignment of CPUWatchpoint"][::std::mem::align_of::<CPUWatchpoint>() - 8usize];
["Offset of field: CPUWatchpoint::vaddr"]
[::std::mem::offset_of!(CPUWatchpoint, vaddr) - 0usize];
["Offset of field: CPUWatchpoint::len"][::std::mem::offset_of!(CPUWatchpoint, len) - 8usize];
["Offset of field: CPUWatchpoint::hitaddr"]
[::std::mem::offset_of!(CPUWatchpoint, hitaddr) - 16usize];
["Offset of field: CPUWatchpoint::hitattrs"]
[::std::mem::offset_of!(CPUWatchpoint, hitattrs) - 24usize];
["Offset of field: CPUWatchpoint::flags"]
[::std::mem::offset_of!(CPUWatchpoint, flags) - 32usize];
["Offset of field: CPUWatchpoint::entry"]
[::std::mem::offset_of!(CPUWatchpoint, entry) - 40usize];
};
impl Default for CPUWatchpoint {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUWatchpoint {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"CPUWatchpoint {{ hitattrs: {:?}, flags: {:?}, entry: {:?} }}",
self.hitattrs, self.flags, self.entry
)
}
}
pub type hwaddr = u64;
pub const MMUAccessType_MMU_DATA_LOAD: MMUAccessType = MMUAccessType(0);
pub const MMUAccessType_MMU_DATA_STORE: MMUAccessType = MMUAccessType(1);
pub const MMUAccessType_MMU_INST_FETCH: MMUAccessType = MMUAccessType(2);
impl ::std::ops::BitOr<MMUAccessType> for MMUAccessType {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
MMUAccessType(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for MMUAccessType {
#[inline]
fn bitor_assign(&mut self, rhs: MMUAccessType) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<MMUAccessType> for MMUAccessType {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
MMUAccessType(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for MMUAccessType {
#[inline]
fn bitand_assign(&mut self, rhs: MMUAccessType) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct MMUAccessType(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPUTLBEntry {
pub __bindgen_anon_1: CPUTLBEntry__bindgen_ty_1,
pub addr_idx: [usize; 4usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CPUTLBEntry__bindgen_ty_1 {
pub addr_read: usize,
pub addr_write: usize,
pub addr_code: usize,
pub addend: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUTLBEntry__bindgen_ty_1"]
[::std::mem::size_of::<CPUTLBEntry__bindgen_ty_1>() - 32usize];
["Alignment of CPUTLBEntry__bindgen_ty_1"]
[::std::mem::align_of::<CPUTLBEntry__bindgen_ty_1>() - 8usize];
["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_read"]
[::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addr_read) - 0usize];
["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_write"]
[::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addr_write) - 8usize];
["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_code"]
[::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addr_code) - 16usize];
["Offset of field: CPUTLBEntry__bindgen_ty_1::addend"]
[::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addend) - 24usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUTLBEntry"][::std::mem::size_of::<CPUTLBEntry>() - 32usize];
["Alignment of CPUTLBEntry"][::std::mem::align_of::<CPUTLBEntry>() - 8usize];
["Offset of field: CPUTLBEntry::addr_idx"]
[::std::mem::offset_of!(CPUTLBEntry, addr_idx) - 0usize];
};
impl Default for CPUTLBEntry {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUTLBEntry {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "CPUTLBEntry {{ union }}")
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CPUTLBDescFast {
pub mask: usize,
pub table: *mut CPUTLBEntry,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUTLBDescFast"][::std::mem::size_of::<CPUTLBDescFast>() - 16usize];
["Alignment of CPUTLBDescFast"][::std::mem::align_of::<CPUTLBDescFast>() - 8usize];
["Offset of field: CPUTLBDescFast::mask"]
[::std::mem::offset_of!(CPUTLBDescFast, mask) - 0usize];
["Offset of field: CPUTLBDescFast::table"]
[::std::mem::offset_of!(CPUTLBDescFast, table) - 8usize];
};
impl Default for CPUTLBDescFast {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const OnOffAuto_ON_OFF_AUTO_AUTO: OnOffAuto = OnOffAuto(0);
pub const OnOffAuto_ON_OFF_AUTO_ON: OnOffAuto = OnOffAuto(1);
pub const OnOffAuto_ON_OFF_AUTO_OFF: OnOffAuto = OnOffAuto(2);
pub const OnOffAuto_ON_OFF_AUTO__MAX: OnOffAuto = OnOffAuto(3);
impl ::std::ops::BitOr<OnOffAuto> for OnOffAuto {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
OnOffAuto(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for OnOffAuto {
#[inline]
fn bitor_assign(&mut self, rhs: OnOffAuto) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<OnOffAuto> for OnOffAuto {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
OnOffAuto(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for OnOffAuto {
#[inline]
fn bitand_assign(&mut self, rhs: OnOffAuto) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OnOffAuto(pub ::std::os::raw::c_uint);
pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_AUTO: S390CpuEntitlement = S390CpuEntitlement(0);
pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_LOW: S390CpuEntitlement = S390CpuEntitlement(1);
pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_MEDIUM: S390CpuEntitlement =
S390CpuEntitlement(2);
pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_HIGH: S390CpuEntitlement = S390CpuEntitlement(3);
pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT__MAX: S390CpuEntitlement = S390CpuEntitlement(4);
impl ::std::ops::BitOr<S390CpuEntitlement> for S390CpuEntitlement {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
S390CpuEntitlement(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for S390CpuEntitlement {
#[inline]
fn bitor_assign(&mut self, rhs: S390CpuEntitlement) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<S390CpuEntitlement> for S390CpuEntitlement {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
S390CpuEntitlement(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for S390CpuEntitlement {
#[inline]
fn bitand_assign(&mut self, rhs: S390CpuEntitlement) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct S390CpuEntitlement(pub ::std::os::raw::c_uint);
pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_THREAD: CpuTopologyLevel = CpuTopologyLevel(0);
pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_CORE: CpuTopologyLevel = CpuTopologyLevel(1);
pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_MODULE: CpuTopologyLevel = CpuTopologyLevel(2);
pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_CLUSTER: CpuTopologyLevel = CpuTopologyLevel(3);
pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_DIE: CpuTopologyLevel = CpuTopologyLevel(4);
pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_SOCKET: CpuTopologyLevel = CpuTopologyLevel(5);
pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_BOOK: CpuTopologyLevel = CpuTopologyLevel(6);
pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_DRAWER: CpuTopologyLevel = CpuTopologyLevel(7);
pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_DEFAULT: CpuTopologyLevel = CpuTopologyLevel(8);
pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL__MAX: CpuTopologyLevel = CpuTopologyLevel(9);
impl ::std::ops::BitOr<CpuTopologyLevel> for CpuTopologyLevel {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
CpuTopologyLevel(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for CpuTopologyLevel {
#[inline]
fn bitor_assign(&mut self, rhs: CpuTopologyLevel) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<CpuTopologyLevel> for CpuTopologyLevel {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
CpuTopologyLevel(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for CpuTopologyLevel {
#[inline]
fn bitand_assign(&mut self, rhs: CpuTopologyLevel) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct CpuTopologyLevel(pub ::std::os::raw::c_uint);
pub const SysEmuTarget_SYS_EMU_TARGET_AARCH64: SysEmuTarget = SysEmuTarget(0);
pub const SysEmuTarget_SYS_EMU_TARGET_ALPHA: SysEmuTarget = SysEmuTarget(1);
pub const SysEmuTarget_SYS_EMU_TARGET_ARM: SysEmuTarget = SysEmuTarget(2);
pub const SysEmuTarget_SYS_EMU_TARGET_AVR: SysEmuTarget = SysEmuTarget(3);
pub const SysEmuTarget_SYS_EMU_TARGET_HPPA: SysEmuTarget = SysEmuTarget(4);
pub const SysEmuTarget_SYS_EMU_TARGET_I386: SysEmuTarget = SysEmuTarget(5);
pub const SysEmuTarget_SYS_EMU_TARGET_LOONGARCH64: SysEmuTarget = SysEmuTarget(6);
pub const SysEmuTarget_SYS_EMU_TARGET_M68K: SysEmuTarget = SysEmuTarget(7);
pub const SysEmuTarget_SYS_EMU_TARGET_MICROBLAZE: SysEmuTarget = SysEmuTarget(8);
pub const SysEmuTarget_SYS_EMU_TARGET_MICROBLAZEEL: SysEmuTarget = SysEmuTarget(9);
pub const SysEmuTarget_SYS_EMU_TARGET_MIPS: SysEmuTarget = SysEmuTarget(10);
pub const SysEmuTarget_SYS_EMU_TARGET_MIPS64: SysEmuTarget = SysEmuTarget(11);
pub const SysEmuTarget_SYS_EMU_TARGET_MIPS64EL: SysEmuTarget = SysEmuTarget(12);
pub const SysEmuTarget_SYS_EMU_TARGET_MIPSEL: SysEmuTarget = SysEmuTarget(13);
pub const SysEmuTarget_SYS_EMU_TARGET_OR1K: SysEmuTarget = SysEmuTarget(14);
pub const SysEmuTarget_SYS_EMU_TARGET_PPC: SysEmuTarget = SysEmuTarget(15);
pub const SysEmuTarget_SYS_EMU_TARGET_PPC64: SysEmuTarget = SysEmuTarget(16);
pub const SysEmuTarget_SYS_EMU_TARGET_RISCV32: SysEmuTarget = SysEmuTarget(17);
pub const SysEmuTarget_SYS_EMU_TARGET_RISCV64: SysEmuTarget = SysEmuTarget(18);
pub const SysEmuTarget_SYS_EMU_TARGET_RX: SysEmuTarget = SysEmuTarget(19);
pub const SysEmuTarget_SYS_EMU_TARGET_S390X: SysEmuTarget = SysEmuTarget(20);
pub const SysEmuTarget_SYS_EMU_TARGET_SH4: SysEmuTarget = SysEmuTarget(21);
pub const SysEmuTarget_SYS_EMU_TARGET_SH4EB: SysEmuTarget = SysEmuTarget(22);
pub const SysEmuTarget_SYS_EMU_TARGET_SPARC: SysEmuTarget = SysEmuTarget(23);
pub const SysEmuTarget_SYS_EMU_TARGET_SPARC64: SysEmuTarget = SysEmuTarget(24);
pub const SysEmuTarget_SYS_EMU_TARGET_TRICORE: SysEmuTarget = SysEmuTarget(25);
pub const SysEmuTarget_SYS_EMU_TARGET_X86_64: SysEmuTarget = SysEmuTarget(26);
pub const SysEmuTarget_SYS_EMU_TARGET_XTENSA: SysEmuTarget = SysEmuTarget(27);
pub const SysEmuTarget_SYS_EMU_TARGET_XTENSAEB: SysEmuTarget = SysEmuTarget(28);
pub const SysEmuTarget_SYS_EMU_TARGET__MAX: SysEmuTarget = SysEmuTarget(29);
impl ::std::ops::BitOr<SysEmuTarget> for SysEmuTarget {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
SysEmuTarget(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for SysEmuTarget {
#[inline]
fn bitor_assign(&mut self, rhs: SysEmuTarget) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<SysEmuTarget> for SysEmuTarget {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
SysEmuTarget(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for SysEmuTarget {
#[inline]
fn bitand_assign(&mut self, rhs: SysEmuTarget) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct SysEmuTarget(pub ::std::os::raw::c_uint);
pub const S390CpuState_S390_CPU_STATE_UNINITIALIZED: S390CpuState = S390CpuState(0);
pub const S390CpuState_S390_CPU_STATE_STOPPED: S390CpuState = S390CpuState(1);
pub const S390CpuState_S390_CPU_STATE_CHECK_STOP: S390CpuState = S390CpuState(2);
pub const S390CpuState_S390_CPU_STATE_OPERATING: S390CpuState = S390CpuState(3);
pub const S390CpuState_S390_CPU_STATE_LOAD: S390CpuState = S390CpuState(4);
pub const S390CpuState_S390_CPU_STATE__MAX: S390CpuState = S390CpuState(5);
impl ::std::ops::BitOr<S390CpuState> for S390CpuState {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
S390CpuState(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for S390CpuState {
#[inline]
fn bitor_assign(&mut self, rhs: S390CpuState) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<S390CpuState> for S390CpuState {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
S390CpuState(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for S390CpuState {
#[inline]
fn bitand_assign(&mut self, rhs: S390CpuState) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct S390CpuState(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CpuInfoS390 {
pub cpu_state: S390CpuState,
pub has_dedicated: bool,
pub dedicated: bool,
pub has_entitlement: bool,
pub entitlement: S390CpuEntitlement,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CpuInfoS390"][::std::mem::size_of::<CpuInfoS390>() - 12usize];
["Alignment of CpuInfoS390"][::std::mem::align_of::<CpuInfoS390>() - 4usize];
["Offset of field: CpuInfoS390::cpu_state"]
[::std::mem::offset_of!(CpuInfoS390, cpu_state) - 0usize];
["Offset of field: CpuInfoS390::has_dedicated"]
[::std::mem::offset_of!(CpuInfoS390, has_dedicated) - 4usize];
["Offset of field: CpuInfoS390::dedicated"]
[::std::mem::offset_of!(CpuInfoS390, dedicated) - 5usize];
["Offset of field: CpuInfoS390::has_entitlement"]
[::std::mem::offset_of!(CpuInfoS390, has_entitlement) - 6usize];
["Offset of field: CpuInfoS390::entitlement"]
[::std::mem::offset_of!(CpuInfoS390, entitlement) - 8usize];
};
impl Default for CpuInfoS390 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CpuInfoFast {
pub cpu_index: i64,
pub qom_type: *mut ::std::os::raw::c_char,
pub qom_path: *mut ::std::os::raw::c_char,
pub thread_id: i64,
pub props: *mut CpuInstanceProperties,
pub target: SysEmuTarget,
pub u: CpuInfoFast__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CpuInfoFast__bindgen_ty_1 {
pub s390x: CpuInfoS390,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CpuInfoFast__bindgen_ty_1"]
[::std::mem::size_of::<CpuInfoFast__bindgen_ty_1>() - 12usize];
["Alignment of CpuInfoFast__bindgen_ty_1"]
[::std::mem::align_of::<CpuInfoFast__bindgen_ty_1>() - 4usize];
["Offset of field: CpuInfoFast__bindgen_ty_1::s390x"]
[::std::mem::offset_of!(CpuInfoFast__bindgen_ty_1, s390x) - 0usize];
};
impl Default for CpuInfoFast__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CpuInfoFast__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "CpuInfoFast__bindgen_ty_1 {{ union }}")
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CpuInfoFast"][::std::mem::size_of::<CpuInfoFast>() - 56usize];
["Alignment of CpuInfoFast"][::std::mem::align_of::<CpuInfoFast>() - 8usize];
["Offset of field: CpuInfoFast::cpu_index"]
[::std::mem::offset_of!(CpuInfoFast, cpu_index) - 0usize];
["Offset of field: CpuInfoFast::qom_type"]
[::std::mem::offset_of!(CpuInfoFast, qom_type) - 8usize];
["Offset of field: CpuInfoFast::qom_path"]
[::std::mem::offset_of!(CpuInfoFast, qom_path) - 16usize];
["Offset of field: CpuInfoFast::thread_id"]
[::std::mem::offset_of!(CpuInfoFast, thread_id) - 24usize];
["Offset of field: CpuInfoFast::props"][::std::mem::offset_of!(CpuInfoFast, props) - 32usize];
["Offset of field: CpuInfoFast::target"][::std::mem::offset_of!(CpuInfoFast, target) - 40usize];
["Offset of field: CpuInfoFast::u"][::std::mem::offset_of!(CpuInfoFast, u) - 44usize];
};
impl Default for CpuInfoFast {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CpuInfoFast {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"CpuInfoFast {{ qom_type: {:?}, qom_path: {:?}, props: {:?}, target: {:?}, u: {:?} }}",
self.qom_type, self.qom_path, self.props, self.target, self.u
)
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CpuInstanceProperties {
pub has_node_id: bool,
pub node_id: i64,
pub has_drawer_id: bool,
pub drawer_id: i64,
pub has_book_id: bool,
pub book_id: i64,
pub has_socket_id: bool,
pub socket_id: i64,
pub has_die_id: bool,
pub die_id: i64,
pub has_cluster_id: bool,
pub cluster_id: i64,
pub has_module_id: bool,
pub module_id: i64,
pub has_core_id: bool,
pub core_id: i64,
pub has_thread_id: bool,
pub thread_id: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CpuInstanceProperties"][::std::mem::size_of::<CpuInstanceProperties>() - 144usize];
["Alignment of CpuInstanceProperties"]
[::std::mem::align_of::<CpuInstanceProperties>() - 8usize];
["Offset of field: CpuInstanceProperties::has_node_id"]
[::std::mem::offset_of!(CpuInstanceProperties, has_node_id) - 0usize];
["Offset of field: CpuInstanceProperties::node_id"]
[::std::mem::offset_of!(CpuInstanceProperties, node_id) - 8usize];
["Offset of field: CpuInstanceProperties::has_drawer_id"]
[::std::mem::offset_of!(CpuInstanceProperties, has_drawer_id) - 16usize];
["Offset of field: CpuInstanceProperties::drawer_id"]
[::std::mem::offset_of!(CpuInstanceProperties, drawer_id) - 24usize];
["Offset of field: CpuInstanceProperties::has_book_id"]
[::std::mem::offset_of!(CpuInstanceProperties, has_book_id) - 32usize];
["Offset of field: CpuInstanceProperties::book_id"]
[::std::mem::offset_of!(CpuInstanceProperties, book_id) - 40usize];
["Offset of field: CpuInstanceProperties::has_socket_id"]
[::std::mem::offset_of!(CpuInstanceProperties, has_socket_id) - 48usize];
["Offset of field: CpuInstanceProperties::socket_id"]
[::std::mem::offset_of!(CpuInstanceProperties, socket_id) - 56usize];
["Offset of field: CpuInstanceProperties::has_die_id"]
[::std::mem::offset_of!(CpuInstanceProperties, has_die_id) - 64usize];
["Offset of field: CpuInstanceProperties::die_id"]
[::std::mem::offset_of!(CpuInstanceProperties, die_id) - 72usize];
["Offset of field: CpuInstanceProperties::has_cluster_id"]
[::std::mem::offset_of!(CpuInstanceProperties, has_cluster_id) - 80usize];
["Offset of field: CpuInstanceProperties::cluster_id"]
[::std::mem::offset_of!(CpuInstanceProperties, cluster_id) - 88usize];
["Offset of field: CpuInstanceProperties::has_module_id"]
[::std::mem::offset_of!(CpuInstanceProperties, has_module_id) - 96usize];
["Offset of field: CpuInstanceProperties::module_id"]
[::std::mem::offset_of!(CpuInstanceProperties, module_id) - 104usize];
["Offset of field: CpuInstanceProperties::has_core_id"]
[::std::mem::offset_of!(CpuInstanceProperties, has_core_id) - 112usize];
["Offset of field: CpuInstanceProperties::core_id"]
[::std::mem::offset_of!(CpuInstanceProperties, core_id) - 120usize];
["Offset of field: CpuInstanceProperties::has_thread_id"]
[::std::mem::offset_of!(CpuInstanceProperties, has_thread_id) - 128usize];
["Offset of field: CpuInstanceProperties::thread_id"]
[::std::mem::offset_of!(CpuInstanceProperties, thread_id) - 136usize];
};
pub const ShutdownCause_SHUTDOWN_CAUSE_NONE: ShutdownCause = ShutdownCause(0);
pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_ERROR: ShutdownCause = ShutdownCause(1);
pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_QMP_QUIT: ShutdownCause = ShutdownCause(2);
pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_QMP_SYSTEM_RESET: ShutdownCause = ShutdownCause(3);
pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_SIGNAL: ShutdownCause = ShutdownCause(4);
pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_UI: ShutdownCause = ShutdownCause(5);
pub const ShutdownCause_SHUTDOWN_CAUSE_GUEST_SHUTDOWN: ShutdownCause = ShutdownCause(6);
pub const ShutdownCause_SHUTDOWN_CAUSE_GUEST_RESET: ShutdownCause = ShutdownCause(7);
pub const ShutdownCause_SHUTDOWN_CAUSE_GUEST_PANIC: ShutdownCause = ShutdownCause(8);
pub const ShutdownCause_SHUTDOWN_CAUSE_SUBSYSTEM_RESET: ShutdownCause = ShutdownCause(9);
pub const ShutdownCause_SHUTDOWN_CAUSE_SNAPSHOT_LOAD: ShutdownCause = ShutdownCause(10);
pub const ShutdownCause_SHUTDOWN_CAUSE__MAX: ShutdownCause = ShutdownCause(11);
impl ::std::ops::BitOr<ShutdownCause> for ShutdownCause {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
ShutdownCause(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for ShutdownCause {
#[inline]
fn bitor_assign(&mut self, rhs: ShutdownCause) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<ShutdownCause> for ShutdownCause {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
ShutdownCause(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for ShutdownCause {
#[inline]
fn bitand_assign(&mut self, rhs: ShutdownCause) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ShutdownCause(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct QemuLockCnt {
pub count: ::std::os::raw::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of QemuLockCnt"][::std::mem::size_of::<QemuLockCnt>() - 4usize];
["Alignment of QemuLockCnt"][::std::mem::align_of::<QemuLockCnt>() - 4usize];
["Offset of field: QemuLockCnt::count"][::std::mem::offset_of!(QemuLockCnt, count) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CPUAddressSpace {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CPUJumpCache {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct AccelCPUClass {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SysemuCPUOps {
_unused: [u8; 0],
}
#[doc = " CPUClass:\n @class_by_name: Callback to map -cpu command line model name to an\n instantiatable CPU type.\n @list_cpus: list available CPU models and flags.\n @parse_features: Callback to parse command line arguments.\n @reset_dump_flags: #CPUDumpFlags to use for reset logging.\n @memory_rw_debug: Callback for GDB memory access.\n @dump_state: Callback for dumping state.\n @query_cpu_fast:\n Fill in target specific information for the \"query-cpus-fast\"\n QAPI call.\n @get_arch_id: Callback for getting architecture-dependent CPU ID.\n @set_pc: Callback for setting the Program Counter register. This\n should have the semantics used by the target architecture when\n setting the PC from a source such as an ELF file entry point;\n for example on Arm it will also set the Thumb mode bit based\n on the least significant bit of the new PC value.\n If the target behaviour here is anything other than \"set\n the PC register to the value passed in\" then the target must\n also implement the synchronize_from_tb hook.\n @get_pc: Callback for getting the Program Counter register.\n As above, with the semantics of the target architecture.\n @gdb_read_register: Callback for letting GDB read a register.\n No more than @gdb_num_core_regs registers can be read.\n @gdb_write_register: Callback for letting GDB write a register.\n No more than @gdb_num_core_regs registers can be written.\n @gdb_adjust_breakpoint: Callback for adjusting the address of a\n breakpoint. Used by AVR to handle a gdb mis-feature with\n its Harvard architecture split code and data.\n @gdb_num_core_regs: Number of core registers accessible to GDB or 0 to infer\n from @gdb_core_xml_file.\n @gdb_core_xml_file: File name for core registers GDB XML description.\n @gdb_get_core_xml_file: Optional callback that returns the file name for\n the core registers GDB XML description. The returned value is expected to\n be a simple constant string: the caller will not g_free() it. If this\n is NULL then @gdb_core_xml_file will be used instead.\n @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop\n before the insn which triggers a watchpoint rather than after it.\n @gdb_arch_name: Optional callback that returns the architecture name known\n to GDB. The returned value is expected to be a simple constant string:\n the caller will not g_free() it.\n @disas_set_info: Setup architecture specific components of disassembly info\n @adjust_watchpoint_address: Perform a target-specific adjustment to an\n address before attempting to match it against watchpoints.\n @deprecation_note: If this CPUClass is deprecated, this field provides\n related information.\n\n Represents a CPU family or model."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CPUClass {
pub parent_class: DeviceClass,
pub class_by_name: ::std::option::Option<
unsafe extern "C" fn(cpu_model: *const ::std::os::raw::c_char) -> *mut ObjectClass,
>,
pub list_cpus: ::std::option::Option<unsafe extern "C" fn()>,
pub parse_features: ::std::option::Option<
unsafe extern "C" fn(
typename: *const ::std::os::raw::c_char,
str_: *mut ::std::os::raw::c_char,
errp: *mut *mut Error,
),
>,
pub memory_rw_debug: ::std::option::Option<
unsafe extern "C" fn(
cpu: *mut CPUState,
addr: vaddr,
buf: *mut u8,
len: usize,
is_write: bool,
) -> ::std::os::raw::c_int,
>,
pub dump_state: ::std::option::Option<
unsafe extern "C" fn(cpu: *mut CPUState, arg1: *mut FILE, flags: ::std::os::raw::c_int),
>,
pub query_cpu_fast:
::std::option::Option<unsafe extern "C" fn(cpu: *mut CPUState, value: *mut CpuInfoFast)>,
pub get_arch_id: ::std::option::Option<unsafe extern "C" fn(cpu: *mut CPUState) -> i64>,
pub set_pc: ::std::option::Option<unsafe extern "C" fn(cpu: *mut CPUState, value: vaddr)>,
pub get_pc: ::std::option::Option<unsafe extern "C" fn(cpu: *mut CPUState) -> vaddr>,
pub gdb_read_register: ::std::option::Option<
unsafe extern "C" fn(
cpu: *mut CPUState,
buf: *mut GByteArray,
reg: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>,
pub gdb_write_register: ::std::option::Option<
unsafe extern "C" fn(
cpu: *mut CPUState,
buf: *mut u8,
reg: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>,
pub gdb_adjust_breakpoint:
::std::option::Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr) -> vaddr>,
pub gdb_core_xml_file: *const ::std::os::raw::c_char,
pub gdb_arch_name: ::std::option::Option<
unsafe extern "C" fn(cpu: *mut CPUState) -> *const ::std::os::raw::c_char,
>,
pub gdb_get_core_xml_file: ::std::option::Option<
unsafe extern "C" fn(cpu: *mut CPUState) -> *const ::std::os::raw::c_char,
>,
pub disas_set_info: ::std::option::Option<
unsafe extern "C" fn(cpu: *mut CPUState, info: *mut disassemble_info),
>,
pub deprecation_note: *const ::std::os::raw::c_char,
pub accel_cpu: *mut AccelCPUClass,
pub sysemu_ops: *const SysemuCPUOps,
pub tcg_ops: *const TCGCPUOps,
pub init_accel_cpu: ::std::option::Option<
unsafe extern "C" fn(accel_cpu: *mut AccelCPUClass, cc: *mut CPUClass),
>,
pub reset_dump_flags: ::std::os::raw::c_int,
pub gdb_num_core_regs: ::std::os::raw::c_int,
pub gdb_stop_before_watchpoint: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUClass"][::std::mem::size_of::<CPUClass>() - 368usize];
["Alignment of CPUClass"][::std::mem::align_of::<CPUClass>() - 8usize];
["Offset of field: CPUClass::parent_class"]
[::std::mem::offset_of!(CPUClass, parent_class) - 0usize];
["Offset of field: CPUClass::class_by_name"]
[::std::mem::offset_of!(CPUClass, class_by_name) - 184usize];
["Offset of field: CPUClass::list_cpus"]
[::std::mem::offset_of!(CPUClass, list_cpus) - 192usize];
["Offset of field: CPUClass::parse_features"]
[::std::mem::offset_of!(CPUClass, parse_features) - 200usize];
["Offset of field: CPUClass::memory_rw_debug"]
[::std::mem::offset_of!(CPUClass, memory_rw_debug) - 208usize];
["Offset of field: CPUClass::dump_state"]
[::std::mem::offset_of!(CPUClass, dump_state) - 216usize];
["Offset of field: CPUClass::query_cpu_fast"]
[::std::mem::offset_of!(CPUClass, query_cpu_fast) - 224usize];
["Offset of field: CPUClass::get_arch_id"]
[::std::mem::offset_of!(CPUClass, get_arch_id) - 232usize];
["Offset of field: CPUClass::set_pc"][::std::mem::offset_of!(CPUClass, set_pc) - 240usize];
["Offset of field: CPUClass::get_pc"][::std::mem::offset_of!(CPUClass, get_pc) - 248usize];
["Offset of field: CPUClass::gdb_read_register"]
[::std::mem::offset_of!(CPUClass, gdb_read_register) - 256usize];
["Offset of field: CPUClass::gdb_write_register"]
[::std::mem::offset_of!(CPUClass, gdb_write_register) - 264usize];
["Offset of field: CPUClass::gdb_adjust_breakpoint"]
[::std::mem::offset_of!(CPUClass, gdb_adjust_breakpoint) - 272usize];
["Offset of field: CPUClass::gdb_core_xml_file"]
[::std::mem::offset_of!(CPUClass, gdb_core_xml_file) - 280usize];
["Offset of field: CPUClass::gdb_arch_name"]
[::std::mem::offset_of!(CPUClass, gdb_arch_name) - 288usize];
["Offset of field: CPUClass::gdb_get_core_xml_file"]
[::std::mem::offset_of!(CPUClass, gdb_get_core_xml_file) - 296usize];
["Offset of field: CPUClass::disas_set_info"]
[::std::mem::offset_of!(CPUClass, disas_set_info) - 304usize];
["Offset of field: CPUClass::deprecation_note"]
[::std::mem::offset_of!(CPUClass, deprecation_note) - 312usize];
["Offset of field: CPUClass::accel_cpu"]
[::std::mem::offset_of!(CPUClass, accel_cpu) - 320usize];
["Offset of field: CPUClass::sysemu_ops"]
[::std::mem::offset_of!(CPUClass, sysemu_ops) - 328usize];
["Offset of field: CPUClass::tcg_ops"][::std::mem::offset_of!(CPUClass, tcg_ops) - 336usize];
["Offset of field: CPUClass::init_accel_cpu"]
[::std::mem::offset_of!(CPUClass, init_accel_cpu) - 344usize];
["Offset of field: CPUClass::reset_dump_flags"]
[::std::mem::offset_of!(CPUClass, reset_dump_flags) - 352usize];
["Offset of field: CPUClass::gdb_num_core_regs"]
[::std::mem::offset_of!(CPUClass, gdb_num_core_regs) - 356usize];
["Offset of field: CPUClass::gdb_stop_before_watchpoint"]
[::std::mem::offset_of!(CPUClass, gdb_stop_before_watchpoint) - 360usize];
};
impl Default for CPUClass {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type MMUIdxMap = u32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CPUTLBEntryFull {
pub xlat_section: hwaddr,
pub phys_addr: hwaddr,
pub attrs: MemTxAttrs,
pub prot: u8,
pub lg_page_size: u8,
pub tlb_fill_flags: u8,
pub slow_flags: [u8; 3usize],
pub extra: CPUTLBEntryFull__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPUTLBEntryFull__bindgen_ty_1 {
pub arm: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1 {
pub pte_attrs: u8,
pub shareability: u8,
pub guarded: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1"]
[::std::mem::size_of::<CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1>() - 3usize];
["Alignment of CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1"]
[::std::mem::align_of::<CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1>() - 1usize];
["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::pte_attrs"]
[::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, pte_attrs) - 0usize];
["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::shareability"][::std::mem::offset_of!(
CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1,
shareability
) - 1usize];
["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::guarded"]
[::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, guarded) - 2usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUTLBEntryFull__bindgen_ty_1"]
[::std::mem::size_of::<CPUTLBEntryFull__bindgen_ty_1>() - 3usize];
["Alignment of CPUTLBEntryFull__bindgen_ty_1"]
[::std::mem::align_of::<CPUTLBEntryFull__bindgen_ty_1>() - 1usize];
["Offset of field: CPUTLBEntryFull__bindgen_ty_1::arm"]
[::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1, arm) - 0usize];
};
impl Default for CPUTLBEntryFull__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUTLBEntryFull__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "CPUTLBEntryFull__bindgen_ty_1 {{ union }}")
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUTLBEntryFull"][::std::mem::size_of::<CPUTLBEntryFull>() - 40usize];
["Alignment of CPUTLBEntryFull"][::std::mem::align_of::<CPUTLBEntryFull>() - 8usize];
["Offset of field: CPUTLBEntryFull::xlat_section"]
[::std::mem::offset_of!(CPUTLBEntryFull, xlat_section) - 0usize];
["Offset of field: CPUTLBEntryFull::phys_addr"]
[::std::mem::offset_of!(CPUTLBEntryFull, phys_addr) - 8usize];
["Offset of field: CPUTLBEntryFull::attrs"]
[::std::mem::offset_of!(CPUTLBEntryFull, attrs) - 16usize];
["Offset of field: CPUTLBEntryFull::prot"]
[::std::mem::offset_of!(CPUTLBEntryFull, prot) - 24usize];
["Offset of field: CPUTLBEntryFull::lg_page_size"]
[::std::mem::offset_of!(CPUTLBEntryFull, lg_page_size) - 25usize];
["Offset of field: CPUTLBEntryFull::tlb_fill_flags"]
[::std::mem::offset_of!(CPUTLBEntryFull, tlb_fill_flags) - 26usize];
["Offset of field: CPUTLBEntryFull::slow_flags"]
[::std::mem::offset_of!(CPUTLBEntryFull, slow_flags) - 27usize];
["Offset of field: CPUTLBEntryFull::extra"]
[::std::mem::offset_of!(CPUTLBEntryFull, extra) - 30usize];
};
impl Default for CPUTLBEntryFull {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUTLBEntryFull {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"CPUTLBEntryFull {{ attrs: {:?}, slow_flags: {:?}, extra: {:?} }}",
self.attrs, self.slow_flags, self.extra
)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CPUTLBDesc {
pub large_page_addr: vaddr,
pub large_page_mask: vaddr,
pub window_begin_ns: i64,
pub window_max_entries: usize,
pub n_used_entries: usize,
pub vindex: usize,
pub vtable: [CPUTLBEntry; 8usize],
pub vfulltlb: [CPUTLBEntryFull; 8usize],
pub fulltlb: *mut CPUTLBEntryFull,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUTLBDesc"][::std::mem::size_of::<CPUTLBDesc>() - 632usize];
["Alignment of CPUTLBDesc"][::std::mem::align_of::<CPUTLBDesc>() - 8usize];
["Offset of field: CPUTLBDesc::large_page_addr"]
[::std::mem::offset_of!(CPUTLBDesc, large_page_addr) - 0usize];
["Offset of field: CPUTLBDesc::large_page_mask"]
[::std::mem::offset_of!(CPUTLBDesc, large_page_mask) - 8usize];
["Offset of field: CPUTLBDesc::window_begin_ns"]
[::std::mem::offset_of!(CPUTLBDesc, window_begin_ns) - 16usize];
["Offset of field: CPUTLBDesc::window_max_entries"]
[::std::mem::offset_of!(CPUTLBDesc, window_max_entries) - 24usize];
["Offset of field: CPUTLBDesc::n_used_entries"]
[::std::mem::offset_of!(CPUTLBDesc, n_used_entries) - 32usize];
["Offset of field: CPUTLBDesc::vindex"][::std::mem::offset_of!(CPUTLBDesc, vindex) - 40usize];
["Offset of field: CPUTLBDesc::vtable"][::std::mem::offset_of!(CPUTLBDesc, vtable) - 48usize];
["Offset of field: CPUTLBDesc::vfulltlb"]
[::std::mem::offset_of!(CPUTLBDesc, vfulltlb) - 304usize];
["Offset of field: CPUTLBDesc::fulltlb"]
[::std::mem::offset_of!(CPUTLBDesc, fulltlb) - 624usize];
};
impl Default for CPUTLBDesc {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUTLBDesc {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"CPUTLBDesc {{ vtable: {:?}, vfulltlb: {:?}, fulltlb: {:?} }}",
self.vtable, self.vfulltlb, self.fulltlb
)
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CPUTLBCommon {
pub lock: QemuSpin,
pub dirty: MMUIdxMap,
pub full_flush_count: usize,
pub part_flush_count: usize,
pub elide_flush_count: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUTLBCommon"][::std::mem::size_of::<CPUTLBCommon>() - 32usize];
["Alignment of CPUTLBCommon"][::std::mem::align_of::<CPUTLBCommon>() - 8usize];
["Offset of field: CPUTLBCommon::lock"][::std::mem::offset_of!(CPUTLBCommon, lock) - 0usize];
["Offset of field: CPUTLBCommon::dirty"][::std::mem::offset_of!(CPUTLBCommon, dirty) - 4usize];
["Offset of field: CPUTLBCommon::full_flush_count"]
[::std::mem::offset_of!(CPUTLBCommon, full_flush_count) - 8usize];
["Offset of field: CPUTLBCommon::part_flush_count"]
[::std::mem::offset_of!(CPUTLBCommon, part_flush_count) - 16usize];
["Offset of field: CPUTLBCommon::elide_flush_count"]
[::std::mem::offset_of!(CPUTLBCommon, elide_flush_count) - 24usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct CPUTLB {
pub c: CPUTLBCommon,
pub d: [CPUTLBDesc; 22usize],
pub f: [CPUTLBDescFast; 22usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUTLB"][::std::mem::size_of::<CPUTLB>() - 14288usize];
["Alignment of CPUTLB"][::std::mem::align_of::<CPUTLB>() - 16usize];
["Offset of field: CPUTLB::c"][::std::mem::offset_of!(CPUTLB, c) - 0usize];
["Offset of field: CPUTLB::d"][::std::mem::offset_of!(CPUTLB, d) - 32usize];
["Offset of field: CPUTLB::f"][::std::mem::offset_of!(CPUTLB, f) - 13936usize];
};
impl Default for CPUTLB {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUTLB {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"CPUTLB {{ c: {:?}, d: {:?}, f: {:?} }}",
self.c, self.d, self.f
)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union IcountDecr {
pub u32_: u32,
pub u16_: IcountDecr__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IcountDecr__bindgen_ty_1 {
pub low: u16,
pub high: u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IcountDecr__bindgen_ty_1"]
[::std::mem::size_of::<IcountDecr__bindgen_ty_1>() - 4usize];
["Alignment of IcountDecr__bindgen_ty_1"]
[::std::mem::align_of::<IcountDecr__bindgen_ty_1>() - 2usize];
["Offset of field: IcountDecr__bindgen_ty_1::low"]
[::std::mem::offset_of!(IcountDecr__bindgen_ty_1, low) - 0usize];
["Offset of field: IcountDecr__bindgen_ty_1::high"]
[::std::mem::offset_of!(IcountDecr__bindgen_ty_1, high) - 2usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IcountDecr"][::std::mem::size_of::<IcountDecr>() - 4usize];
["Alignment of IcountDecr"][::std::mem::align_of::<IcountDecr>() - 4usize];
["Offset of field: IcountDecr::u32_"][::std::mem::offset_of!(IcountDecr, u32_) - 0usize];
["Offset of field: IcountDecr::u16_"][::std::mem::offset_of!(IcountDecr, u16_) - 0usize];
};
impl Default for IcountDecr {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for IcountDecr {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "IcountDecr {{ union }}")
}
}
#[doc = " CPUNegativeOffsetState: Elements of CPUState most efficiently accessed\n from CPUArchState, via small negative offsets.\n @can_do_io: True if memory-mapped IO is allowed.\n @plugin_mem_cbs: active plugin memory callbacks\n @plugin_mem_value_low: 64 lower bits of latest accessed mem value.\n @plugin_mem_value_high: 64 higher bits of latest accessed mem value."]
#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct CPUNegativeOffsetState {
pub tlb: CPUTLB,
pub plugin_mem_cbs: *mut GArray,
pub plugin_mem_value_low: u64,
pub plugin_mem_value_high: u64,
pub plugin_cb_flags: i32,
pub icount_decr: IcountDecr,
pub can_do_io: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUNegativeOffsetState"]
[::std::mem::size_of::<CPUNegativeOffsetState>() - 14336usize];
["Alignment of CPUNegativeOffsetState"]
[::std::mem::align_of::<CPUNegativeOffsetState>() - 16usize];
["Offset of field: CPUNegativeOffsetState::tlb"]
[::std::mem::offset_of!(CPUNegativeOffsetState, tlb) - 0usize];
["Offset of field: CPUNegativeOffsetState::plugin_mem_cbs"]
[::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_cbs) - 14288usize];
["Offset of field: CPUNegativeOffsetState::plugin_mem_value_low"]
[::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_value_low) - 14296usize];
["Offset of field: CPUNegativeOffsetState::plugin_mem_value_high"]
[::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_value_high) - 14304usize];
["Offset of field: CPUNegativeOffsetState::plugin_cb_flags"]
[::std::mem::offset_of!(CPUNegativeOffsetState, plugin_cb_flags) - 14312usize];
["Offset of field: CPUNegativeOffsetState::icount_decr"]
[::std::mem::offset_of!(CPUNegativeOffsetState, icount_decr) - 14316usize];
["Offset of field: CPUNegativeOffsetState::can_do_io"]
[::std::mem::offset_of!(CPUNegativeOffsetState, can_do_io) - 14320usize];
};
impl Default for CPUNegativeOffsetState {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUNegativeOffsetState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"CPUNegativeOffsetState {{ tlb: {:?}, plugin_mem_cbs: {:?}, icount_decr: {:?}, can_do_io: {:?} }}",
self.tlb, self.plugin_mem_cbs, self.icount_decr, self.can_do_io
)
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct KVMState {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct kvm_run {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct qemu_work_item {
_unused: [u8; 0],
}
#[doc = " struct CPUState - common state of one CPU core or thread.\n\n @cpu_index: CPU index (informative).\n @cluster_index: Identifies which cluster this CPU is in.\n For boards which don't define clusters or for \"loose\" CPUs not assigned\n to a cluster this will be UNASSIGNED_CLUSTER_INDEX; otherwise it will\n be the same as the cluster-id property of the CPU object's TYPE_CPU_CLUSTER\n QOM parent.\n Under TCG this value is propagated to @tcg_cflags.\n See TranslationBlock::TCG CF_CLUSTER_MASK.\n @tcg_cflags: Pre-computed cflags for this cpu.\n @nr_threads: Number of threads within this CPU core.\n @thread: Host thread details, only live once @created is #true\n @sem: WIN32 only semaphore used only for qtest\n @thread_id: native thread id of vCPU, only live once @created is #true\n @running: #true if CPU is currently running (lockless).\n @has_waiter: #true if a CPU is currently waiting for the cpu_exec_end;\n valid under cpu_list_lock.\n @created: Indicates whether the CPU thread has been successfully created.\n @halt_cond: condition variable sleeping threads can wait on.\n @exit_request: Another thread requests the CPU to call qemu_process_cpu_events().\n Should be read only by CPU thread with load-acquire, to synchronize with\n other threads' store-release operation.\n\n In some cases, accelerator-specific code will write exit_request from\n within the same thread, to \"bump\" the effect of qemu_cpu_kick() to\n the one provided by cpu_exit(), especially when processing interrupt\n flags. In this case, the write and read happen in the same thread\n and the write therefore can use qemu_atomic_set().\n @interrupt_request: Indicates a pending interrupt request.\n Only used by system emulation.\n @halted: Nonzero if the CPU is in suspended state.\n @stop: Indicates a pending stop request.\n @stopped: Indicates the CPU has been artificially stopped.\n @unplug: Indicates a pending CPU unplug request.\n @crash_occurred: Indicates the OS reported a crash (panic) for this CPU\n @singlestep_enabled: Flags for single-stepping.\n @icount_extra: Instructions until next timer event.\n @cpu_ases: Pointer to array of CPUAddressSpaces (which define the\n AddressSpaces this CPU has)\n @num_ases: number of CPUAddressSpaces in @cpu_ases\n @as: Pointer to the first AddressSpace, for the convenience of targets which\n only have a single AddressSpace\n @gdb_regs: Additional GDB registers.\n @gdb_num_regs: Number of total registers accessible to GDB.\n @gdb_num_g_regs: Number of registers in GDB 'g' packets.\n @node: QTAILQ of CPUs sharing TB cache.\n @opaque: User data.\n @mem_io_pc: Host Program Counter at which the memory was accessed.\n @accel: Pointer to accelerator specific state.\n @vcpu_dirty: Hardware accelerator is not synchronized with QEMU state\n @kvm_fd: vCPU file descriptor for KVM.\n @work_mutex: Lock to prevent multiple access to @work_list.\n @work_list: List of pending asynchronous work.\n @plugin_state: per-CPU plugin state\n @ignore_memory_transaction_failures: Cached copy of the MachineState\n flag of the same name: allows the board to suppress calling of the\n CPU do_transaction_failed hook function.\n @kvm_dirty_gfns: Points to the KVM dirty ring for this CPU when KVM dirty\n ring is enabled.\n @kvm_fetch_index: Keeps the index that we last fetched from the per-vCPU\n dirty ring structure.\n\n @neg_align: The CPUState is the common part of a concrete ArchCPU\n which is allocated when an individual CPU instance is created. As\n such care is taken is ensure there is no gap between between\n CPUState and CPUArchState within ArchCPU.\n\n @neg: The architectural register state (\"cpu_env\") immediately follows\n CPUState in ArchCPU and is passed to TCG code. The @neg structure holds\n some common TCG CPU variables which are accessed with a negative offset\n from cpu_env."]
#[repr(C)]
#[repr(align(16))]
pub struct CPUState {
pub parent_obj: DeviceState,
pub cc: *mut CPUClass,
pub nr_threads: ::std::os::raw::c_int,
pub thread: *mut QemuThread,
pub thread_id: ::std::os::raw::c_int,
pub running: bool,
pub has_waiter: bool,
pub halt_cond: *mut QemuCond,
pub thread_kicked: bool,
pub created: bool,
pub stop: bool,
pub stopped: bool,
pub start_powered_off: bool,
pub unplug: bool,
pub crash_occurred: bool,
pub exit_request: bool,
pub exclusive_context_count: ::std::os::raw::c_int,
pub cflags_next_tb: u32,
pub interrupt_request: u32,
pub singlestep_enabled: ::std::os::raw::c_int,
pub icount_budget: i64,
pub icount_extra: i64,
pub random_seed: u64,
pub jmp_env: sigjmp_buf,
pub work_mutex: QemuMutex,
pub work_list: CPUState__bindgen_ty_1,
pub cpu_ases: *mut CPUAddressSpace,
pub num_ases: ::std::os::raw::c_int,
pub as_: *mut AddressSpace,
pub memory: *mut MemoryRegion,
pub tb_jmp_cache: *mut CPUJumpCache,
pub gdb_regs: *mut GArray,
pub gdb_num_regs: ::std::os::raw::c_int,
pub gdb_num_g_regs: ::std::os::raw::c_int,
pub node: CPUState__bindgen_ty_2,
pub breakpoints: CPUState__bindgen_ty_3,
pub watchpoints: CPUState__bindgen_ty_4,
pub watchpoint_hit: *mut CPUWatchpoint,
pub opaque: *mut ::std::os::raw::c_void,
pub mem_io_pc: usize,
pub kvm_fd: ::std::os::raw::c_int,
pub kvm_state: *mut KVMState,
pub kvm_run: *mut kvm_run,
pub kvm_dirty_gfns: *mut kvm_dirty_gfn,
pub kvm_fetch_index: u32,
pub dirty_pages: u64,
pub kvm_vcpu_stats_fd: ::std::os::raw::c_int,
pub in_ioctl_lock: QemuLockCnt,
pub plugin_state: *mut CPUPluginState,
pub cpu_index: ::std::os::raw::c_int,
pub cluster_index: ::std::os::raw::c_int,
pub tcg_cflags: u32,
pub halted: u32,
pub exception_index: i32,
pub vcpu_dirty: bool,
pub accel: *mut AccelCPUState,
pub throttle_thread_scheduled: bool,
pub throttle_us_per_full: i64,
pub ignore_memory_transaction_failures: bool,
pub prctl_unalign_sigbus: bool,
pub iommu_notifiers: *mut GArray,
pub __bindgen_padding_0: [u8; 8usize],
pub neg_align: __IncompleteArrayField<::std::os::raw::c_char>,
pub neg: CPUNegativeOffsetState,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CPUState__bindgen_ty_1 {
pub sqh_first: *mut qemu_work_item,
pub sqh_last: *mut *mut qemu_work_item,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUState__bindgen_ty_1"][::std::mem::size_of::<CPUState__bindgen_ty_1>() - 16usize];
["Alignment of CPUState__bindgen_ty_1"]
[::std::mem::align_of::<CPUState__bindgen_ty_1>() - 8usize];
["Offset of field: CPUState__bindgen_ty_1::sqh_first"]
[::std::mem::offset_of!(CPUState__bindgen_ty_1, sqh_first) - 0usize];
["Offset of field: CPUState__bindgen_ty_1::sqh_last"]
[::std::mem::offset_of!(CPUState__bindgen_ty_1, sqh_last) - 8usize];
};
impl Default for CPUState__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPUState__bindgen_ty_2 {
pub tqe_next: *mut CPUState,
pub tqe_circ: QTailQLink,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUState__bindgen_ty_2"][::std::mem::size_of::<CPUState__bindgen_ty_2>() - 16usize];
["Alignment of CPUState__bindgen_ty_2"]
[::std::mem::align_of::<CPUState__bindgen_ty_2>() - 8usize];
["Offset of field: CPUState__bindgen_ty_2::tqe_next"]
[::std::mem::offset_of!(CPUState__bindgen_ty_2, tqe_next) - 0usize];
["Offset of field: CPUState__bindgen_ty_2::tqe_circ"]
[::std::mem::offset_of!(CPUState__bindgen_ty_2, tqe_circ) - 0usize];
};
impl Default for CPUState__bindgen_ty_2 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUState__bindgen_ty_2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "CPUState__bindgen_ty_2 {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPUState__bindgen_ty_3 {
pub tqh_first: *mut CPUBreakpoint,
pub tqh_circ: QTailQLink,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUState__bindgen_ty_3"][::std::mem::size_of::<CPUState__bindgen_ty_3>() - 16usize];
["Alignment of CPUState__bindgen_ty_3"]
[::std::mem::align_of::<CPUState__bindgen_ty_3>() - 8usize];
["Offset of field: CPUState__bindgen_ty_3::tqh_first"]
[::std::mem::offset_of!(CPUState__bindgen_ty_3, tqh_first) - 0usize];
["Offset of field: CPUState__bindgen_ty_3::tqh_circ"]
[::std::mem::offset_of!(CPUState__bindgen_ty_3, tqh_circ) - 0usize];
};
impl Default for CPUState__bindgen_ty_3 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUState__bindgen_ty_3 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "CPUState__bindgen_ty_3 {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPUState__bindgen_ty_4 {
pub tqh_first: *mut CPUWatchpoint,
pub tqh_circ: QTailQLink,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUState__bindgen_ty_4"][::std::mem::size_of::<CPUState__bindgen_ty_4>() - 16usize];
["Alignment of CPUState__bindgen_ty_4"]
[::std::mem::align_of::<CPUState__bindgen_ty_4>() - 8usize];
["Offset of field: CPUState__bindgen_ty_4::tqh_first"]
[::std::mem::offset_of!(CPUState__bindgen_ty_4, tqh_first) - 0usize];
["Offset of field: CPUState__bindgen_ty_4::tqh_circ"]
[::std::mem::offset_of!(CPUState__bindgen_ty_4, tqh_circ) - 0usize];
};
impl Default for CPUState__bindgen_ty_4 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUState__bindgen_ty_4 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "CPUState__bindgen_ty_4 {{ union }}")
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUState"][::std::mem::size_of::<CPUState>() - 15104usize];
["Alignment of CPUState"][::std::mem::align_of::<CPUState>() - 16usize];
["Offset of field: CPUState::parent_obj"]
[::std::mem::offset_of!(CPUState, parent_obj) - 0usize];
["Offset of field: CPUState::cc"][::std::mem::offset_of!(CPUState, cc) - 152usize];
["Offset of field: CPUState::nr_threads"]
[::std::mem::offset_of!(CPUState, nr_threads) - 160usize];
["Offset of field: CPUState::thread"][::std::mem::offset_of!(CPUState, thread) - 168usize];
["Offset of field: CPUState::thread_id"]
[::std::mem::offset_of!(CPUState, thread_id) - 176usize];
["Offset of field: CPUState::running"][::std::mem::offset_of!(CPUState, running) - 180usize];
["Offset of field: CPUState::has_waiter"]
[::std::mem::offset_of!(CPUState, has_waiter) - 181usize];
["Offset of field: CPUState::halt_cond"]
[::std::mem::offset_of!(CPUState, halt_cond) - 184usize];
["Offset of field: CPUState::thread_kicked"]
[::std::mem::offset_of!(CPUState, thread_kicked) - 192usize];
["Offset of field: CPUState::created"][::std::mem::offset_of!(CPUState, created) - 193usize];
["Offset of field: CPUState::stop"][::std::mem::offset_of!(CPUState, stop) - 194usize];
["Offset of field: CPUState::stopped"][::std::mem::offset_of!(CPUState, stopped) - 195usize];
["Offset of field: CPUState::start_powered_off"]
[::std::mem::offset_of!(CPUState, start_powered_off) - 196usize];
["Offset of field: CPUState::unplug"][::std::mem::offset_of!(CPUState, unplug) - 197usize];
["Offset of field: CPUState::crash_occurred"]
[::std::mem::offset_of!(CPUState, crash_occurred) - 198usize];
["Offset of field: CPUState::exit_request"]
[::std::mem::offset_of!(CPUState, exit_request) - 199usize];
["Offset of field: CPUState::exclusive_context_count"]
[::std::mem::offset_of!(CPUState, exclusive_context_count) - 200usize];
["Offset of field: CPUState::cflags_next_tb"]
[::std::mem::offset_of!(CPUState, cflags_next_tb) - 204usize];
["Offset of field: CPUState::interrupt_request"]
[::std::mem::offset_of!(CPUState, interrupt_request) - 208usize];
["Offset of field: CPUState::singlestep_enabled"]
[::std::mem::offset_of!(CPUState, singlestep_enabled) - 212usize];
["Offset of field: CPUState::icount_budget"]
[::std::mem::offset_of!(CPUState, icount_budget) - 216usize];
["Offset of field: CPUState::icount_extra"]
[::std::mem::offset_of!(CPUState, icount_extra) - 224usize];
["Offset of field: CPUState::random_seed"]
[::std::mem::offset_of!(CPUState, random_seed) - 232usize];
["Offset of field: CPUState::jmp_env"][::std::mem::offset_of!(CPUState, jmp_env) - 240usize];
["Offset of field: CPUState::work_mutex"]
[::std::mem::offset_of!(CPUState, work_mutex) - 440usize];
["Offset of field: CPUState::work_list"]
[::std::mem::offset_of!(CPUState, work_list) - 488usize];
["Offset of field: CPUState::cpu_ases"][::std::mem::offset_of!(CPUState, cpu_ases) - 504usize];
["Offset of field: CPUState::num_ases"][::std::mem::offset_of!(CPUState, num_ases) - 512usize];
["Offset of field: CPUState::as_"][::std::mem::offset_of!(CPUState, as_) - 520usize];
["Offset of field: CPUState::memory"][::std::mem::offset_of!(CPUState, memory) - 528usize];
["Offset of field: CPUState::tb_jmp_cache"]
[::std::mem::offset_of!(CPUState, tb_jmp_cache) - 536usize];
["Offset of field: CPUState::gdb_regs"][::std::mem::offset_of!(CPUState, gdb_regs) - 544usize];
["Offset of field: CPUState::gdb_num_regs"]
[::std::mem::offset_of!(CPUState, gdb_num_regs) - 552usize];
["Offset of field: CPUState::gdb_num_g_regs"]
[::std::mem::offset_of!(CPUState, gdb_num_g_regs) - 556usize];
["Offset of field: CPUState::node"][::std::mem::offset_of!(CPUState, node) - 560usize];
["Offset of field: CPUState::breakpoints"]
[::std::mem::offset_of!(CPUState, breakpoints) - 576usize];
["Offset of field: CPUState::watchpoints"]
[::std::mem::offset_of!(CPUState, watchpoints) - 592usize];
["Offset of field: CPUState::watchpoint_hit"]
[::std::mem::offset_of!(CPUState, watchpoint_hit) - 608usize];
["Offset of field: CPUState::opaque"][::std::mem::offset_of!(CPUState, opaque) - 616usize];
["Offset of field: CPUState::mem_io_pc"]
[::std::mem::offset_of!(CPUState, mem_io_pc) - 624usize];
["Offset of field: CPUState::kvm_fd"][::std::mem::offset_of!(CPUState, kvm_fd) - 632usize];
["Offset of field: CPUState::kvm_state"]
[::std::mem::offset_of!(CPUState, kvm_state) - 640usize];
["Offset of field: CPUState::kvm_run"][::std::mem::offset_of!(CPUState, kvm_run) - 648usize];
["Offset of field: CPUState::kvm_dirty_gfns"]
[::std::mem::offset_of!(CPUState, kvm_dirty_gfns) - 656usize];
["Offset of field: CPUState::kvm_fetch_index"]
[::std::mem::offset_of!(CPUState, kvm_fetch_index) - 664usize];
["Offset of field: CPUState::dirty_pages"]
[::std::mem::offset_of!(CPUState, dirty_pages) - 672usize];
["Offset of field: CPUState::kvm_vcpu_stats_fd"]
[::std::mem::offset_of!(CPUState, kvm_vcpu_stats_fd) - 680usize];
["Offset of field: CPUState::in_ioctl_lock"]
[::std::mem::offset_of!(CPUState, in_ioctl_lock) - 684usize];
["Offset of field: CPUState::plugin_state"]
[::std::mem::offset_of!(CPUState, plugin_state) - 688usize];
["Offset of field: CPUState::cpu_index"]
[::std::mem::offset_of!(CPUState, cpu_index) - 696usize];
["Offset of field: CPUState::cluster_index"]
[::std::mem::offset_of!(CPUState, cluster_index) - 700usize];
["Offset of field: CPUState::tcg_cflags"]
[::std::mem::offset_of!(CPUState, tcg_cflags) - 704usize];
["Offset of field: CPUState::halted"][::std::mem::offset_of!(CPUState, halted) - 708usize];
["Offset of field: CPUState::exception_index"]
[::std::mem::offset_of!(CPUState, exception_index) - 712usize];
["Offset of field: CPUState::vcpu_dirty"]
[::std::mem::offset_of!(CPUState, vcpu_dirty) - 716usize];
["Offset of field: CPUState::accel"][::std::mem::offset_of!(CPUState, accel) - 720usize];
["Offset of field: CPUState::throttle_thread_scheduled"]
[::std::mem::offset_of!(CPUState, throttle_thread_scheduled) - 728usize];
["Offset of field: CPUState::throttle_us_per_full"]
[::std::mem::offset_of!(CPUState, throttle_us_per_full) - 736usize];
["Offset of field: CPUState::ignore_memory_transaction_failures"]
[::std::mem::offset_of!(CPUState, ignore_memory_transaction_failures) - 744usize];
["Offset of field: CPUState::prctl_unalign_sigbus"]
[::std::mem::offset_of!(CPUState, prctl_unalign_sigbus) - 745usize];
["Offset of field: CPUState::iommu_notifiers"]
[::std::mem::offset_of!(CPUState, iommu_notifiers) - 752usize];
["Offset of field: CPUState::neg_align"]
[::std::mem::offset_of!(CPUState, neg_align) - 768usize];
["Offset of field: CPUState::neg"][::std::mem::offset_of!(CPUState, neg) - 768usize];
};
impl Default for CPUState {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"CPUState {{ parent_obj: {:?}, cc: {:?}, nr_threads: {:?}, thread: {:?}, thread_id: {:?}, running: {:?}, has_waiter: {:?}, halt_cond: {:?}, thread_kicked: {:?}, created: {:?}, stop: {:?}, stopped: {:?}, start_powered_off: {:?}, unplug: {:?}, crash_occurred: {:?}, exit_request: {:?}, exclusive_context_count: {:?}, singlestep_enabled: {:?}, jmp_env: {:?}, work_mutex: {:?}, work_list: {:?}, cpu_ases: {:?}, num_ases: {:?}, as: {:?}, memory: {:?}, tb_jmp_cache: {:?}, gdb_regs: {:?}, gdb_num_regs: {:?}, gdb_num_g_regs: {:?}, node: {:?}, breakpoints: {:?}, watchpoints: {:?}, watchpoint_hit: {:?}, opaque: {:?}, kvm_fd: {:?}, kvm_state: {:?}, kvm_run: {:?}, kvm_dirty_gfns: {:?}, kvm_vcpu_stats_fd: {:?}, in_ioctl_lock: {:?}, plugin_state: {:?}, cpu_index: {:?}, cluster_index: {:?}, vcpu_dirty: {:?}, accel: {:?}, throttle_thread_scheduled: {:?}, ignore_memory_transaction_failures: {:?}, prctl_unalign_sigbus: {:?}, iommu_notifiers: {:?}, neg_align: {:?}, neg: {:?} }}",
self.parent_obj,
self.cc,
self.nr_threads,
self.thread,
self.thread_id,
self.running,
self.has_waiter,
self.halt_cond,
self.thread_kicked,
self.created,
self.stop,
self.stopped,
self.start_powered_off,
self.unplug,
self.crash_occurred,
self.exit_request,
self.exclusive_context_count,
self.singlestep_enabled,
self.jmp_env,
self.work_mutex,
self.work_list,
self.cpu_ases,
self.num_ases,
self.as_,
self.memory,
self.tb_jmp_cache,
self.gdb_regs,
self.gdb_num_regs,
self.gdb_num_g_regs,
self.node,
self.breakpoints,
self.watchpoints,
self.watchpoint_hit,
self.opaque,
self.kvm_fd,
self.kvm_state,
self.kvm_run,
self.kvm_dirty_gfns,
self.kvm_vcpu_stats_fd,
self.in_ioctl_lock,
self.plugin_state,
self.cpu_index,
self.cluster_index,
self.vcpu_dirty,
self.accel,
self.throttle_thread_scheduled,
self.ignore_memory_transaction_failures,
self.prctl_unalign_sigbus,
self.iommu_notifiers,
self.neg_align,
self.neg
)
}
}
unsafe extern "C" {
#[doc = " cpu_memory_rw_debug:\n @cpu: The CPU whose memory is to be accessed\n @addr: guest virtual address\n @ptr: buffer with the data transferred\n @len: the number of bytes to read or write\n @is_write: indicates the transfer direction\n\n Take a virtual address, convert it to a physical address via\n an MMU lookup using the current settings of the specified CPU,\n and then perform the access (using address_space_rw() for\n reads or address_space_write_rom() for writes).\n\n This function is intended for use by the GDB stub and similar code.\n\n Returns: 0 on success, -1 on error"]
pub fn cpu_memory_rw_debug(
cpu: *mut CPUState,
addr: vaddr,
ptr: *mut ::std::os::raw::c_void,
len: usize,
is_write: bool,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
#[doc = " cpu_get_phys_page_attrs_debug:\n @cpu: The CPU to obtain the physical page address for.\n @addr: The virtual address.\n @attrs: Updated on return with the memory transaction attributes to use\n for this access.\n\n Obtains the physical page corresponding to a virtual one, together\n with the corresponding memory transaction attributes to use for the access.\n Use it only for debugging because no protection checks are done.\n\n Returns: Corresponding physical page address or -1 if no page found."]
pub fn cpu_get_phys_page_attrs_debug(
cpu: *mut CPUState,
addr: vaddr,
attrs: *mut MemTxAttrs,
) -> hwaddr;
}
unsafe extern "C" {
#[doc = " cpu_reset:\n @cpu: The CPU whose state is to be reset."]
pub fn cpu_reset(cpu: *mut CPUState);
}
pub const CacheType_DATA_CACHE: CacheType = CacheType(0);
pub const CacheType_INSTRUCTION_CACHE: CacheType = CacheType(1);
pub const CacheType_UNIFIED_CACHE: CacheType = CacheType(2);
impl ::std::ops::BitOr<CacheType> for CacheType {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
CacheType(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for CacheType {
#[inline]
fn bitor_assign(&mut self, rhs: CacheType) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<CacheType> for CacheType {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
CacheType(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for CacheType {
#[inline]
fn bitand_assign(&mut self, rhs: CacheType) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct CacheType(pub ::std::os::raw::c_uint);
#[doc = " X86CPU:\n @env: #CPUX86State\n @migratable: If set, only migratable flags will be accepted when \"enforce\"\n mode is used, and only migratable flags will be included in the \"host\"\n CPU model.\n\n An x86 CPU."]
pub type X86CPU = ArchCPU;
unsafe extern "C" {
pub fn cpu_physical_memory_read(addr: hwaddr, buf: *mut ::std::os::raw::c_void, len: hwaddr);
}
unsafe extern "C" {
pub fn cpu_physical_memory_write(addr: hwaddr, buf: *const ::std::os::raw::c_void, len: hwaddr);
}
pub const MemOp_MO_8: MemOp = MemOp(0);
pub const MemOp_MO_16: MemOp = MemOp(1);
pub const MemOp_MO_32: MemOp = MemOp(2);
pub const MemOp_MO_64: MemOp = MemOp(3);
pub const MemOp_MO_128: MemOp = MemOp(4);
pub const MemOp_MO_256: MemOp = MemOp(5);
pub const MemOp_MO_512: MemOp = MemOp(6);
pub const MemOp_MO_1024: MemOp = MemOp(7);
pub const MemOp_MO_SIZE: MemOp = MemOp(7);
pub const MemOp_MO_SIGN: MemOp = MemOp(8);
pub const MemOp_MO_BSWAP: MemOp = MemOp(16);
pub const MemOp_MO_LE: MemOp = MemOp(0);
pub const MemOp_MO_BE: MemOp = MemOp(16);
pub const MemOp_MO_TE: MemOp = MemOp(0);
pub const MemOp_MO_ASHIFT: MemOp = MemOp(5);
pub const MemOp_MO_AMASK: MemOp = MemOp(224);
pub const MemOp_MO_UNALN: MemOp = MemOp(0);
pub const MemOp_MO_ALIGN_2: MemOp = MemOp(32);
pub const MemOp_MO_ALIGN_4: MemOp = MemOp(64);
pub const MemOp_MO_ALIGN_8: MemOp = MemOp(96);
pub const MemOp_MO_ALIGN_16: MemOp = MemOp(128);
pub const MemOp_MO_ALIGN_32: MemOp = MemOp(160);
pub const MemOp_MO_ALIGN_64: MemOp = MemOp(192);
pub const MemOp_MO_ALIGN: MemOp = MemOp(224);
pub const MemOp_MO_ALIGN_TLB_ONLY: MemOp = MemOp(256);
pub const MemOp_MO_ATOM_SHIFT: MemOp = MemOp(9);
pub const MemOp_MO_ATOM_IFALIGN: MemOp = MemOp(0);
pub const MemOp_MO_ATOM_IFALIGN_PAIR: MemOp = MemOp(512);
pub const MemOp_MO_ATOM_WITHIN16: MemOp = MemOp(1024);
pub const MemOp_MO_ATOM_WITHIN16_PAIR: MemOp = MemOp(1536);
pub const MemOp_MO_ATOM_SUBALIGN: MemOp = MemOp(2048);
pub const MemOp_MO_ATOM_NONE: MemOp = MemOp(2560);
pub const MemOp_MO_ATOM_MASK: MemOp = MemOp(3584);
pub const MemOp_MO_UB: MemOp = MemOp(0);
pub const MemOp_MO_UW: MemOp = MemOp(1);
pub const MemOp_MO_UL: MemOp = MemOp(2);
pub const MemOp_MO_UQ: MemOp = MemOp(3);
pub const MemOp_MO_UO: MemOp = MemOp(4);
pub const MemOp_MO_SB: MemOp = MemOp(8);
pub const MemOp_MO_SW: MemOp = MemOp(9);
pub const MemOp_MO_SL: MemOp = MemOp(10);
pub const MemOp_MO_SQ: MemOp = MemOp(11);
pub const MemOp_MO_SO: MemOp = MemOp(12);
pub const MemOp_MO_LEUW: MemOp = MemOp(1);
pub const MemOp_MO_LEUL: MemOp = MemOp(2);
pub const MemOp_MO_LEUQ: MemOp = MemOp(3);
pub const MemOp_MO_LESW: MemOp = MemOp(9);
pub const MemOp_MO_LESL: MemOp = MemOp(10);
pub const MemOp_MO_LESQ: MemOp = MemOp(11);
pub const MemOp_MO_BEUW: MemOp = MemOp(17);
pub const MemOp_MO_BEUL: MemOp = MemOp(18);
pub const MemOp_MO_BEUQ: MemOp = MemOp(19);
pub const MemOp_MO_BESW: MemOp = MemOp(25);
pub const MemOp_MO_BESL: MemOp = MemOp(26);
pub const MemOp_MO_BESQ: MemOp = MemOp(27);
pub const MemOp_MO_TEUW: MemOp = MemOp(1);
pub const MemOp_MO_TEUL: MemOp = MemOp(2);
pub const MemOp_MO_TEUQ: MemOp = MemOp(3);
pub const MemOp_MO_TEUO: MemOp = MemOp(4);
pub const MemOp_MO_TESW: MemOp = MemOp(9);
pub const MemOp_MO_TESL: MemOp = MemOp(10);
pub const MemOp_MO_TESQ: MemOp = MemOp(11);
pub const MemOp_MO_SSIZE: MemOp = MemOp(15);
impl ::std::ops::BitOr<MemOp> for MemOp {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
MemOp(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for MemOp {
#[inline]
fn bitor_assign(&mut self, rhs: MemOp) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<MemOp> for MemOp {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
MemOp(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for MemOp {
#[inline]
fn bitand_assign(&mut self, rhs: MemOp) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct MemOp(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct APICCommonState {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct X86CPUTopoInfo {
pub dies_per_pkg: ::std::os::raw::c_uint,
pub modules_per_die: ::std::os::raw::c_uint,
pub cores_per_module: ::std::os::raw::c_uint,
pub threads_per_core: ::std::os::raw::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of X86CPUTopoInfo"][::std::mem::size_of::<X86CPUTopoInfo>() - 16usize];
["Alignment of X86CPUTopoInfo"][::std::mem::align_of::<X86CPUTopoInfo>() - 4usize];
["Offset of field: X86CPUTopoInfo::dies_per_pkg"]
[::std::mem::offset_of!(X86CPUTopoInfo, dies_per_pkg) - 0usize];
["Offset of field: X86CPUTopoInfo::modules_per_die"]
[::std::mem::offset_of!(X86CPUTopoInfo, modules_per_die) - 4usize];
["Offset of field: X86CPUTopoInfo::cores_per_module"]
[::std::mem::offset_of!(X86CPUTopoInfo, cores_per_module) - 8usize];
["Offset of field: X86CPUTopoInfo::threads_per_core"]
[::std::mem::offset_of!(X86CPUTopoInfo, threads_per_core) - 12usize];
};
pub type float16 = u16;
pub type float32 = u32;
pub type float64 = u64;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct floatx80 {
pub low: u64,
pub high: u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of floatx80"][::std::mem::size_of::<floatx80>() - 16usize];
["Alignment of floatx80"][::std::mem::align_of::<floatx80>() - 8usize];
["Offset of field: floatx80::low"][::std::mem::offset_of!(floatx80, low) - 0usize];
["Offset of field: floatx80::high"][::std::mem::offset_of!(floatx80, high) - 8usize];
};
pub const FloatRoundMode_float_round_nearest_even: FloatRoundMode = FloatRoundMode(0);
pub const FloatRoundMode_float_round_down: FloatRoundMode = FloatRoundMode(1);
pub const FloatRoundMode_float_round_up: FloatRoundMode = FloatRoundMode(2);
pub const FloatRoundMode_float_round_to_zero: FloatRoundMode = FloatRoundMode(3);
pub const FloatRoundMode_float_round_ties_away: FloatRoundMode = FloatRoundMode(4);
pub const FloatRoundMode_float_round_to_odd: FloatRoundMode = FloatRoundMode(5);
pub const FloatRoundMode_float_round_to_odd_inf: FloatRoundMode = FloatRoundMode(6);
pub const FloatRoundMode_float_round_nearest_even_max: FloatRoundMode = FloatRoundMode(7);
impl ::std::ops::BitOr<FloatRoundMode> for FloatRoundMode {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
FloatRoundMode(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for FloatRoundMode {
#[inline]
fn bitor_assign(&mut self, rhs: FloatRoundMode) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<FloatRoundMode> for FloatRoundMode {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
FloatRoundMode(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for FloatRoundMode {
#[inline]
fn bitand_assign(&mut self, rhs: FloatRoundMode) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct FloatRoundMode(pub ::std::os::raw::c_uchar);
pub const FloatX80RoundPrec_floatx80_precision_x: FloatX80RoundPrec = FloatX80RoundPrec(0);
pub const FloatX80RoundPrec_floatx80_precision_d: FloatX80RoundPrec = FloatX80RoundPrec(1);
pub const FloatX80RoundPrec_floatx80_precision_s: FloatX80RoundPrec = FloatX80RoundPrec(2);
impl ::std::ops::BitOr<FloatX80RoundPrec> for FloatX80RoundPrec {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
FloatX80RoundPrec(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for FloatX80RoundPrec {
#[inline]
fn bitor_assign(&mut self, rhs: FloatX80RoundPrec) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<FloatX80RoundPrec> for FloatX80RoundPrec {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
FloatX80RoundPrec(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for FloatX80RoundPrec {
#[inline]
fn bitand_assign(&mut self, rhs: FloatX80RoundPrec) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct FloatX80RoundPrec(pub ::std::os::raw::c_uchar);
pub const Float2NaNPropRule_float_2nan_prop_none: Float2NaNPropRule = Float2NaNPropRule(0);
pub const Float2NaNPropRule_float_2nan_prop_s_ab: Float2NaNPropRule = Float2NaNPropRule(1);
pub const Float2NaNPropRule_float_2nan_prop_s_ba: Float2NaNPropRule = Float2NaNPropRule(2);
pub const Float2NaNPropRule_float_2nan_prop_ab: Float2NaNPropRule = Float2NaNPropRule(3);
pub const Float2NaNPropRule_float_2nan_prop_ba: Float2NaNPropRule = Float2NaNPropRule(4);
pub const Float2NaNPropRule_float_2nan_prop_x87: Float2NaNPropRule = Float2NaNPropRule(5);
impl ::std::ops::BitOr<Float2NaNPropRule> for Float2NaNPropRule {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
Float2NaNPropRule(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for Float2NaNPropRule {
#[inline]
fn bitor_assign(&mut self, rhs: Float2NaNPropRule) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<Float2NaNPropRule> for Float2NaNPropRule {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
Float2NaNPropRule(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for Float2NaNPropRule {
#[inline]
fn bitand_assign(&mut self, rhs: Float2NaNPropRule) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Float2NaNPropRule(pub ::std::os::raw::c_uchar);
pub const Float3NaNPropRule_float_3nan_prop_none: Float3NaNPropRule = Float3NaNPropRule(0);
pub const Float3NaNPropRule_float_3nan_prop_abc: Float3NaNPropRule = Float3NaNPropRule(36);
pub const Float3NaNPropRule_float_3nan_prop_acb: Float3NaNPropRule = Float3NaNPropRule(24);
pub const Float3NaNPropRule_float_3nan_prop_bac: Float3NaNPropRule = Float3NaNPropRule(33);
pub const Float3NaNPropRule_float_3nan_prop_bca: Float3NaNPropRule = Float3NaNPropRule(9);
pub const Float3NaNPropRule_float_3nan_prop_cab: Float3NaNPropRule = Float3NaNPropRule(18);
pub const Float3NaNPropRule_float_3nan_prop_cba: Float3NaNPropRule = Float3NaNPropRule(6);
pub const Float3NaNPropRule_float_3nan_prop_s_abc: Float3NaNPropRule = Float3NaNPropRule(100);
pub const Float3NaNPropRule_float_3nan_prop_s_acb: Float3NaNPropRule = Float3NaNPropRule(88);
pub const Float3NaNPropRule_float_3nan_prop_s_bac: Float3NaNPropRule = Float3NaNPropRule(97);
pub const Float3NaNPropRule_float_3nan_prop_s_bca: Float3NaNPropRule = Float3NaNPropRule(73);
pub const Float3NaNPropRule_float_3nan_prop_s_cab: Float3NaNPropRule = Float3NaNPropRule(82);
pub const Float3NaNPropRule_float_3nan_prop_s_cba: Float3NaNPropRule = Float3NaNPropRule(70);
impl ::std::ops::BitOr<Float3NaNPropRule> for Float3NaNPropRule {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
Float3NaNPropRule(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for Float3NaNPropRule {
#[inline]
fn bitor_assign(&mut self, rhs: Float3NaNPropRule) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<Float3NaNPropRule> for Float3NaNPropRule {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
Float3NaNPropRule(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for Float3NaNPropRule {
#[inline]
fn bitand_assign(&mut self, rhs: Float3NaNPropRule) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Float3NaNPropRule(pub ::std::os::raw::c_uchar);
pub const FloatInfZeroNaNRule_float_infzeronan_none: FloatInfZeroNaNRule = FloatInfZeroNaNRule(0);
pub const FloatInfZeroNaNRule_float_infzeronan_dnan_never: FloatInfZeroNaNRule =
FloatInfZeroNaNRule(1);
pub const FloatInfZeroNaNRule_float_infzeronan_dnan_always: FloatInfZeroNaNRule =
FloatInfZeroNaNRule(2);
pub const FloatInfZeroNaNRule_float_infzeronan_dnan_if_qnan: FloatInfZeroNaNRule =
FloatInfZeroNaNRule(3);
pub const FloatInfZeroNaNRule_float_infzeronan_suppress_invalid: FloatInfZeroNaNRule =
FloatInfZeroNaNRule(128);
impl ::std::ops::BitOr<FloatInfZeroNaNRule> for FloatInfZeroNaNRule {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
FloatInfZeroNaNRule(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for FloatInfZeroNaNRule {
#[inline]
fn bitor_assign(&mut self, rhs: FloatInfZeroNaNRule) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<FloatInfZeroNaNRule> for FloatInfZeroNaNRule {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
FloatInfZeroNaNRule(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for FloatInfZeroNaNRule {
#[inline]
fn bitand_assign(&mut self, rhs: FloatInfZeroNaNRule) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct FloatInfZeroNaNRule(pub ::std::os::raw::c_uchar);
pub const FloatFTZDetection_float_ftz_after_rounding: FloatFTZDetection = FloatFTZDetection(0);
pub const FloatFTZDetection_float_ftz_before_rounding: FloatFTZDetection = FloatFTZDetection(1);
impl ::std::ops::BitOr<FloatFTZDetection> for FloatFTZDetection {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
FloatFTZDetection(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for FloatFTZDetection {
#[inline]
fn bitor_assign(&mut self, rhs: FloatFTZDetection) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<FloatFTZDetection> for FloatFTZDetection {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
FloatFTZDetection(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for FloatFTZDetection {
#[inline]
fn bitand_assign(&mut self, rhs: FloatFTZDetection) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct FloatFTZDetection(pub ::std::os::raw::c_uchar);
pub const FloatX80Behaviour_floatx80_default_inf_int_bit_is_zero: FloatX80Behaviour =
FloatX80Behaviour(1);
pub const FloatX80Behaviour_floatx80_pseudo_inf_valid: FloatX80Behaviour = FloatX80Behaviour(2);
pub const FloatX80Behaviour_floatx80_pseudo_nan_valid: FloatX80Behaviour = FloatX80Behaviour(4);
pub const FloatX80Behaviour_floatx80_unnormal_valid: FloatX80Behaviour = FloatX80Behaviour(8);
pub const FloatX80Behaviour_floatx80_pseudo_denormal_valid: FloatX80Behaviour =
FloatX80Behaviour(16);
impl ::std::ops::BitOr<FloatX80Behaviour> for FloatX80Behaviour {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
FloatX80Behaviour(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for FloatX80Behaviour {
#[inline]
fn bitor_assign(&mut self, rhs: FloatX80Behaviour) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<FloatX80Behaviour> for FloatX80Behaviour {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
FloatX80Behaviour(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for FloatX80Behaviour {
#[inline]
fn bitand_assign(&mut self, rhs: FloatX80Behaviour) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct FloatX80Behaviour(pub ::std::os::raw::c_uchar);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct float_status {
pub float_exception_flags: u16,
pub float_rounding_mode: FloatRoundMode,
pub floatx80_rounding_precision: FloatX80RoundPrec,
pub floatx80_behaviour: FloatX80Behaviour,
pub float_2nan_prop_rule: Float2NaNPropRule,
pub float_3nan_prop_rule: Float3NaNPropRule,
pub float_infzeronan_rule: FloatInfZeroNaNRule,
pub tininess_before_rounding: bool,
pub flush_to_zero: bool,
pub ftz_detection: FloatFTZDetection,
pub flush_inputs_to_zero: bool,
pub default_nan_mode: bool,
pub default_nan_pattern: u8,
pub snan_bit_is_one: bool,
pub no_signaling_nans: bool,
pub rebias_overflow: bool,
pub rebias_underflow: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of float_status"][::std::mem::size_of::<float_status>() - 18usize];
["Alignment of float_status"][::std::mem::align_of::<float_status>() - 2usize];
["Offset of field: float_status::float_exception_flags"]
[::std::mem::offset_of!(float_status, float_exception_flags) - 0usize];
["Offset of field: float_status::float_rounding_mode"]
[::std::mem::offset_of!(float_status, float_rounding_mode) - 2usize];
["Offset of field: float_status::floatx80_rounding_precision"]
[::std::mem::offset_of!(float_status, floatx80_rounding_precision) - 3usize];
["Offset of field: float_status::floatx80_behaviour"]
[::std::mem::offset_of!(float_status, floatx80_behaviour) - 4usize];
["Offset of field: float_status::float_2nan_prop_rule"]
[::std::mem::offset_of!(float_status, float_2nan_prop_rule) - 5usize];
["Offset of field: float_status::float_3nan_prop_rule"]
[::std::mem::offset_of!(float_status, float_3nan_prop_rule) - 6usize];
["Offset of field: float_status::float_infzeronan_rule"]
[::std::mem::offset_of!(float_status, float_infzeronan_rule) - 7usize];
["Offset of field: float_status::tininess_before_rounding"]
[::std::mem::offset_of!(float_status, tininess_before_rounding) - 8usize];
["Offset of field: float_status::flush_to_zero"]
[::std::mem::offset_of!(float_status, flush_to_zero) - 9usize];
["Offset of field: float_status::ftz_detection"]
[::std::mem::offset_of!(float_status, ftz_detection) - 10usize];
["Offset of field: float_status::flush_inputs_to_zero"]
[::std::mem::offset_of!(float_status, flush_inputs_to_zero) - 11usize];
["Offset of field: float_status::default_nan_mode"]
[::std::mem::offset_of!(float_status, default_nan_mode) - 12usize];
["Offset of field: float_status::default_nan_pattern"]
[::std::mem::offset_of!(float_status, default_nan_pattern) - 13usize];
["Offset of field: float_status::snan_bit_is_one"]
[::std::mem::offset_of!(float_status, snan_bit_is_one) - 14usize];
["Offset of field: float_status::no_signaling_nans"]
[::std::mem::offset_of!(float_status, no_signaling_nans) - 15usize];
["Offset of field: float_status::rebias_overflow"]
[::std::mem::offset_of!(float_status, rebias_overflow) - 16usize];
["Offset of field: float_status::rebias_underflow"]
[::std::mem::offset_of!(float_status, rebias_underflow) - 17usize];
};
impl Default for float_status {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type FeatureWordArray = [u64; 45usize];
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SegmentCache {
pub selector: u32,
pub base: target_ulong,
pub limit: u32,
pub flags: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of SegmentCache"][::std::mem::size_of::<SegmentCache>() - 24usize];
["Alignment of SegmentCache"][::std::mem::align_of::<SegmentCache>() - 8usize];
["Offset of field: SegmentCache::selector"]
[::std::mem::offset_of!(SegmentCache, selector) - 0usize];
["Offset of field: SegmentCache::base"][::std::mem::offset_of!(SegmentCache, base) - 8usize];
["Offset of field: SegmentCache::limit"][::std::mem::offset_of!(SegmentCache, limit) - 16usize];
["Offset of field: SegmentCache::flags"][::std::mem::offset_of!(SegmentCache, flags) - 20usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union MMXReg {
pub _b_MMXReg: [u8; 8usize],
pub _w_MMXReg: [u16; 4usize],
pub _l_MMXReg: [u32; 2usize],
pub _q_MMXReg: [u64; 1usize],
pub _s_MMXReg: [float32; 2usize],
pub _d_MMXReg: [float64; 1usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of MMXReg"][::std::mem::size_of::<MMXReg>() - 8usize];
["Alignment of MMXReg"][::std::mem::align_of::<MMXReg>() - 8usize];
["Offset of field: MMXReg::_b_MMXReg"][::std::mem::offset_of!(MMXReg, _b_MMXReg) - 0usize];
["Offset of field: MMXReg::_w_MMXReg"][::std::mem::offset_of!(MMXReg, _w_MMXReg) - 0usize];
["Offset of field: MMXReg::_l_MMXReg"][::std::mem::offset_of!(MMXReg, _l_MMXReg) - 0usize];
["Offset of field: MMXReg::_q_MMXReg"][::std::mem::offset_of!(MMXReg, _q_MMXReg) - 0usize];
["Offset of field: MMXReg::_s_MMXReg"][::std::mem::offset_of!(MMXReg, _s_MMXReg) - 0usize];
["Offset of field: MMXReg::_d_MMXReg"][::std::mem::offset_of!(MMXReg, _d_MMXReg) - 0usize];
};
impl Default for MMXReg {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for MMXReg {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "MMXReg {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union XMMReg {
pub _q_XMMReg: [u64; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of XMMReg"][::std::mem::size_of::<XMMReg>() - 16usize];
["Alignment of XMMReg"][::std::mem::align_of::<XMMReg>() - 8usize];
["Offset of field: XMMReg::_q_XMMReg"][::std::mem::offset_of!(XMMReg, _q_XMMReg) - 0usize];
};
impl Default for XMMReg {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for XMMReg {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "XMMReg {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union YMMReg {
pub _q_YMMReg: [u64; 4usize],
pub _x_YMMReg: [XMMReg; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of YMMReg"][::std::mem::size_of::<YMMReg>() - 32usize];
["Alignment of YMMReg"][::std::mem::align_of::<YMMReg>() - 8usize];
["Offset of field: YMMReg::_q_YMMReg"][::std::mem::offset_of!(YMMReg, _q_YMMReg) - 0usize];
["Offset of field: YMMReg::_x_YMMReg"][::std::mem::offset_of!(YMMReg, _x_YMMReg) - 0usize];
};
impl Default for YMMReg {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for YMMReg {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "YMMReg {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ZMMReg {
pub _b_ZMMReg: [u8; 64usize],
pub _w_ZMMReg: [u16; 32usize],
pub _l_ZMMReg: [u32; 16usize],
pub _q_ZMMReg: [u64; 8usize],
pub _h_ZMMReg: [float16; 32usize],
pub _s_ZMMReg: [float32; 16usize],
pub _d_ZMMReg: [float64; 8usize],
pub _x_ZMMReg: [XMMReg; 4usize],
pub _y_ZMMReg: [YMMReg; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of ZMMReg"][::std::mem::size_of::<ZMMReg>() - 64usize];
["Alignment of ZMMReg"][::std::mem::align_of::<ZMMReg>() - 8usize];
["Offset of field: ZMMReg::_b_ZMMReg"][::std::mem::offset_of!(ZMMReg, _b_ZMMReg) - 0usize];
["Offset of field: ZMMReg::_w_ZMMReg"][::std::mem::offset_of!(ZMMReg, _w_ZMMReg) - 0usize];
["Offset of field: ZMMReg::_l_ZMMReg"][::std::mem::offset_of!(ZMMReg, _l_ZMMReg) - 0usize];
["Offset of field: ZMMReg::_q_ZMMReg"][::std::mem::offset_of!(ZMMReg, _q_ZMMReg) - 0usize];
["Offset of field: ZMMReg::_h_ZMMReg"][::std::mem::offset_of!(ZMMReg, _h_ZMMReg) - 0usize];
["Offset of field: ZMMReg::_s_ZMMReg"][::std::mem::offset_of!(ZMMReg, _s_ZMMReg) - 0usize];
["Offset of field: ZMMReg::_d_ZMMReg"][::std::mem::offset_of!(ZMMReg, _d_ZMMReg) - 0usize];
["Offset of field: ZMMReg::_x_ZMMReg"][::std::mem::offset_of!(ZMMReg, _x_ZMMReg) - 0usize];
["Offset of field: ZMMReg::_y_ZMMReg"][::std::mem::offset_of!(ZMMReg, _y_ZMMReg) - 0usize];
};
impl Default for ZMMReg {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for ZMMReg {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "ZMMReg {{ union }}")
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct BNDReg {
pub lb: u64,
pub ub: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BNDReg"][::std::mem::size_of::<BNDReg>() - 16usize];
["Alignment of BNDReg"][::std::mem::align_of::<BNDReg>() - 8usize];
["Offset of field: BNDReg::lb"][::std::mem::offset_of!(BNDReg, lb) - 0usize];
["Offset of field: BNDReg::ub"][::std::mem::offset_of!(BNDReg, ub) - 8usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct BNDCSReg {
pub cfgu: u64,
pub sts: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BNDCSReg"][::std::mem::size_of::<BNDCSReg>() - 16usize];
["Alignment of BNDCSReg"][::std::mem::align_of::<BNDCSReg>() - 8usize];
["Offset of field: BNDCSReg::cfgu"][::std::mem::offset_of!(BNDCSReg, cfgu) - 0usize];
["Offset of field: BNDCSReg::sts"][::std::mem::offset_of!(BNDCSReg, sts) - 8usize];
};
#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub union FPReg {
pub d: floatx80,
pub mmx: MMXReg,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of FPReg"][::std::mem::size_of::<FPReg>() - 16usize];
["Alignment of FPReg"][::std::mem::align_of::<FPReg>() - 16usize];
["Offset of field: FPReg::d"][::std::mem::offset_of!(FPReg, d) - 0usize];
["Offset of field: FPReg::mmx"][::std::mem::offset_of!(FPReg, mmx) - 0usize];
};
impl Default for FPReg {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for FPReg {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "FPReg {{ union }}")
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MTRRVar {
pub base: u64,
pub mask: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of MTRRVar"][::std::mem::size_of::<MTRRVar>() - 16usize];
["Alignment of MTRRVar"][::std::mem::align_of::<MTRRVar>() - 8usize];
["Offset of field: MTRRVar::base"][::std::mem::offset_of!(MTRRVar, base) - 0usize];
["Offset of field: MTRRVar::mask"][::std::mem::offset_of!(MTRRVar, mask) - 8usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct LBREntry {
pub from: u64,
pub to: u64,
pub info: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of LBREntry"][::std::mem::size_of::<LBREntry>() - 24usize];
["Alignment of LBREntry"][::std::mem::align_of::<LBREntry>() - 8usize];
["Offset of field: LBREntry::from"][::std::mem::offset_of!(LBREntry, from) - 0usize];
["Offset of field: LBREntry::to"][::std::mem::offset_of!(LBREntry, to) - 8usize];
["Offset of field: LBREntry::info"][::std::mem::offset_of!(LBREntry, info) - 16usize];
};
pub const TPRAccess_TPR_ACCESS_READ: TPRAccess = TPRAccess(0);
pub const TPRAccess_TPR_ACCESS_WRITE: TPRAccess = TPRAccess(1);
impl ::std::ops::BitOr<TPRAccess> for TPRAccess {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
TPRAccess(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for TPRAccess {
#[inline]
fn bitor_assign(&mut self, rhs: TPRAccess) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<TPRAccess> for TPRAccess {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
TPRAccess(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for TPRAccess {
#[inline]
fn bitand_assign(&mut self, rhs: TPRAccess) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct TPRAccess(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CPUCacheInfo {
pub type_: CacheType,
pub level: u8,
pub size: u32,
pub line_size: u16,
pub associativity: u8,
pub partitions: u8,
pub sets: u32,
pub lines_per_tag: u8,
pub self_init: bool,
pub no_invd_sharing: bool,
pub inclusive: bool,
pub complex_indexing: bool,
pub share_level: CpuTopologyLevel,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUCacheInfo"][::std::mem::size_of::<CPUCacheInfo>() - 32usize];
["Alignment of CPUCacheInfo"][::std::mem::align_of::<CPUCacheInfo>() - 4usize];
["Offset of field: CPUCacheInfo::type_"][::std::mem::offset_of!(CPUCacheInfo, type_) - 0usize];
["Offset of field: CPUCacheInfo::level"][::std::mem::offset_of!(CPUCacheInfo, level) - 4usize];
["Offset of field: CPUCacheInfo::size"][::std::mem::offset_of!(CPUCacheInfo, size) - 8usize];
["Offset of field: CPUCacheInfo::line_size"]
[::std::mem::offset_of!(CPUCacheInfo, line_size) - 12usize];
["Offset of field: CPUCacheInfo::associativity"]
[::std::mem::offset_of!(CPUCacheInfo, associativity) - 14usize];
["Offset of field: CPUCacheInfo::partitions"]
[::std::mem::offset_of!(CPUCacheInfo, partitions) - 15usize];
["Offset of field: CPUCacheInfo::sets"][::std::mem::offset_of!(CPUCacheInfo, sets) - 16usize];
["Offset of field: CPUCacheInfo::lines_per_tag"]
[::std::mem::offset_of!(CPUCacheInfo, lines_per_tag) - 20usize];
["Offset of field: CPUCacheInfo::self_init"]
[::std::mem::offset_of!(CPUCacheInfo, self_init) - 21usize];
["Offset of field: CPUCacheInfo::no_invd_sharing"]
[::std::mem::offset_of!(CPUCacheInfo, no_invd_sharing) - 22usize];
["Offset of field: CPUCacheInfo::inclusive"]
[::std::mem::offset_of!(CPUCacheInfo, inclusive) - 23usize];
["Offset of field: CPUCacheInfo::complex_indexing"]
[::std::mem::offset_of!(CPUCacheInfo, complex_indexing) - 24usize];
["Offset of field: CPUCacheInfo::share_level"]
[::std::mem::offset_of!(CPUCacheInfo, share_level) - 28usize];
};
impl Default for CPUCacheInfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CPUCaches {
pub l1d_cache: *mut CPUCacheInfo,
pub l1i_cache: *mut CPUCacheInfo,
pub l2_cache: *mut CPUCacheInfo,
pub l3_cache: *mut CPUCacheInfo,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUCaches"][::std::mem::size_of::<CPUCaches>() - 32usize];
["Alignment of CPUCaches"][::std::mem::align_of::<CPUCaches>() - 8usize];
["Offset of field: CPUCaches::l1d_cache"]
[::std::mem::offset_of!(CPUCaches, l1d_cache) - 0usize];
["Offset of field: CPUCaches::l1i_cache"]
[::std::mem::offset_of!(CPUCaches, l1i_cache) - 8usize];
["Offset of field: CPUCaches::l2_cache"][::std::mem::offset_of!(CPUCaches, l2_cache) - 16usize];
["Offset of field: CPUCaches::l3_cache"][::std::mem::offset_of!(CPUCaches, l3_cache) - 24usize];
};
impl Default for CPUCaches {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[repr(align(16))]
#[derive(Copy, Clone)]
pub struct CPUArchState {
pub regs: [target_ulong; 16usize],
pub eip: target_ulong,
pub eflags: target_ulong,
pub cc_dst: target_ulong,
pub cc_src: target_ulong,
pub cc_src2: target_ulong,
pub cc_op: u32,
pub df: i32,
pub hflags: u32,
pub hflags2: u32,
pub segs: [SegmentCache; 6usize],
pub ldt: SegmentCache,
pub tr: SegmentCache,
pub gdt: SegmentCache,
pub idt: SegmentCache,
pub cr: [target_ulong; 5usize],
pub pdptrs_valid: bool,
pub pdptrs: [u64; 4usize],
pub a20_mask: i32,
pub bnd_regs: [BNDReg; 4usize],
pub bndcs_regs: BNDCSReg,
pub msr_bndcfgs: u64,
pub efer: u64,
pub start_init_save: CPUArchState__bindgen_ty_1,
pub fpstt: ::std::os::raw::c_uint,
pub fpus: u16,
pub fpuc: u16,
pub fptags: [u8; 8usize],
pub fpregs: [FPReg; 8usize],
pub fpop: u16,
pub fpcs: u16,
pub fpds: u16,
pub fpip: u64,
pub fpdp: u64,
pub fp_status: float_status,
pub ft0: floatx80,
pub mmx_status: float_status,
pub sse_status: float_status,
pub mxcsr: u32,
pub __bindgen_padding_0: u64,
pub xmm_regs: [ZMMReg; 32usize],
pub xmm_t0: ZMMReg,
pub mmx_t0: MMXReg,
pub opmask_regs: [u64; 8usize],
pub xtilecfg: [u8; 64usize],
pub xtiledata: [u8; 8192usize],
pub sysenter_cs: u32,
pub sysenter_esp: target_ulong,
pub sysenter_eip: target_ulong,
pub star: u64,
pub vm_hsave: u64,
pub lstar: target_ulong,
pub cstar: target_ulong,
pub fmask: target_ulong,
pub kernelgsbase: target_ulong,
pub fred_rsp0: u64,
pub fred_rsp1: u64,
pub fred_rsp2: u64,
pub fred_rsp3: u64,
pub fred_stklvls: u64,
pub fred_ssp1: u64,
pub fred_ssp2: u64,
pub fred_ssp3: u64,
pub fred_config: u64,
pub tsc_adjust: u64,
pub tsc_deadline: u64,
pub tsc_aux: u64,
pub xcr0: u64,
pub mcg_status: u64,
pub msr_ia32_misc_enable: u64,
pub msr_ia32_feature_control: u64,
pub msr_ia32_sgxlepubkeyhash: [u64; 4usize],
pub msr_fixed_ctr_ctrl: u64,
pub msr_global_ctrl: u64,
pub msr_global_status: u64,
pub msr_global_ovf_ctrl: u64,
pub msr_fixed_counters: [u64; 3usize],
pub msr_gp_counters: [u64; 18usize],
pub msr_gp_evtsel: [u64; 18usize],
pub pat: u64,
pub smbase: u32,
pub msr_smi_count: u64,
pub pkru: u32,
pub pkrs: u32,
pub tsx_ctrl: u32,
pub spec_ctrl: u64,
pub amd_tsc_scale_msr: u64,
pub virt_ssbd: u64,
pub end_init_save: CPUArchState__bindgen_ty_2,
pub system_time_msr: u64,
pub wall_clock_msr: u64,
pub steal_time_msr: u64,
pub async_pf_en_msr: u64,
pub async_pf_int_msr: u64,
pub pv_eoi_en_msr: u64,
pub poll_control_msr: u64,
pub msr_hv_hypercall: u64,
pub msr_hv_guest_os_id: u64,
pub msr_hv_tsc: u64,
pub msr_hv_syndbg_control: u64,
pub msr_hv_syndbg_status: u64,
pub msr_hv_syndbg_send_page: u64,
pub msr_hv_syndbg_recv_page: u64,
pub msr_hv_syndbg_pending_page: u64,
pub msr_hv_syndbg_options: u64,
pub msr_hv_vapic: u64,
pub msr_hv_crash_params: [u64; 5usize],
pub msr_hv_runtime: u64,
pub msr_hv_synic_control: u64,
pub msr_hv_synic_evt_page: u64,
pub msr_hv_synic_msg_page: u64,
pub msr_hv_synic_sint: [u64; 16usize],
pub msr_hv_stimer_config: [u64; 4usize],
pub msr_hv_stimer_count: [u64; 4usize],
pub msr_hv_reenlightenment_control: u64,
pub msr_hv_tsc_emulation_control: u64,
pub msr_hv_tsc_emulation_status: u64,
pub msr_rtit_ctrl: u64,
pub msr_rtit_status: u64,
pub msr_rtit_output_base: u64,
pub msr_rtit_output_mask: u64,
pub msr_rtit_cr3_match: u64,
pub msr_rtit_addrs: [u64; 8usize],
pub msr_xfd: u64,
pub msr_xfd_err: u64,
pub msr_lbr_ctl: u64,
pub msr_lbr_depth: u64,
pub lbr_records: [LBREntry; 32usize],
pub msr_hwcr: u64,
pub error_code: ::std::os::raw::c_int,
pub exception_is_int: ::std::os::raw::c_int,
pub exception_next_eip: target_ulong,
pub dr: [target_ulong; 8usize],
pub __bindgen_anon_1: CPUArchState__bindgen_ty_3,
pub old_exception: ::std::os::raw::c_int,
pub vm_vmcb: u64,
pub tsc_offset: u64,
pub intercept: u64,
pub intercept_cr_read: u16,
pub intercept_cr_write: u16,
pub intercept_dr_read: u16,
pub intercept_dr_write: u16,
pub intercept_exceptions: u32,
pub nested_cr3: u64,
pub nested_pg_mode: u32,
pub v_tpr: u8,
pub int_ctl: u32,
pub nmi_injected: u8,
pub nmi_pending: u8,
pub retaddr: usize,
pub msr_rapl_power_unit: u64,
pub msr_pkg_energy_status: u64,
pub end_reset_fields: CPUArchState__bindgen_ty_4,
pub cpuid_level_func7: u32,
pub cpuid_min_level_func7: u32,
pub cpuid_min_level: u32,
pub cpuid_min_xlevel: u32,
pub cpuid_min_xlevel2: u32,
pub cpuid_max_level: u32,
pub cpuid_max_xlevel: u32,
pub cpuid_max_xlevel2: u32,
pub cpuid_level: u32,
pub cpuid_xlevel: u32,
pub cpuid_xlevel2: u32,
pub cpuid_vendor1: u32,
pub cpuid_vendor2: u32,
pub cpuid_vendor3: u32,
pub cpuid_version: u32,
pub features: FeatureWordArray,
pub avx10_version: u8,
pub user_features: FeatureWordArray,
pub cpuid_model: [u32; 12usize],
pub cache_info: CPUCaches,
pub enable_legacy_cpuid2_cache: bool,
pub enable_legacy_vendor_cache: bool,
pub mtrr_fixed: [u64; 11usize],
pub mtrr_deftype: u64,
pub mtrr_var: [MTRRVar; 8usize],
pub mp_state: u32,
pub exception_nr: i32,
pub interrupt_injected: i32,
pub soft_interrupt: u8,
pub exception_pending: u8,
pub exception_injected: u8,
pub has_error_code: u8,
pub exception_has_payload: u8,
pub exception_payload: u64,
pub triple_fault_pending: u8,
pub ins_len: u32,
pub sipi_vector: u32,
pub tsc_valid: bool,
pub tsc_khz: i64,
pub user_tsc_khz: i64,
pub apic_bus_freq: u64,
pub tsc: u64,
pub mcg_cap: u64,
pub mcg_ctl: u64,
pub mcg_ext_ctl: u64,
pub mce_banks: [u64; 40usize],
pub xstate_bv: u64,
pub fpus_vmstate: u16,
pub fptag_vmstate: u16,
pub fpregs_format_vmstate: u16,
pub xss: u64,
pub umwait: u32,
pub tpr_access_type: TPRAccess,
pub topo_info: X86CPUTopoInfo,
pub avail_cpu_topo: [::std::os::raw::c_ulong; 1usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CPUArchState__bindgen_ty_1 {}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUArchState__bindgen_ty_1"]
[::std::mem::size_of::<CPUArchState__bindgen_ty_1>() - 0usize];
["Alignment of CPUArchState__bindgen_ty_1"]
[::std::mem::align_of::<CPUArchState__bindgen_ty_1>() - 1usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CPUArchState__bindgen_ty_2 {}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUArchState__bindgen_ty_2"]
[::std::mem::size_of::<CPUArchState__bindgen_ty_2>() - 0usize];
["Alignment of CPUArchState__bindgen_ty_2"]
[::std::mem::align_of::<CPUArchState__bindgen_ty_2>() - 1usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union CPUArchState__bindgen_ty_3 {
pub cpu_breakpoint: [*mut CPUBreakpoint; 4usize],
pub cpu_watchpoint: [*mut CPUWatchpoint; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUArchState__bindgen_ty_3"]
[::std::mem::size_of::<CPUArchState__bindgen_ty_3>() - 32usize];
["Alignment of CPUArchState__bindgen_ty_3"]
[::std::mem::align_of::<CPUArchState__bindgen_ty_3>() - 8usize];
["Offset of field: CPUArchState__bindgen_ty_3::cpu_breakpoint"]
[::std::mem::offset_of!(CPUArchState__bindgen_ty_3, cpu_breakpoint) - 0usize];
["Offset of field: CPUArchState__bindgen_ty_3::cpu_watchpoint"]
[::std::mem::offset_of!(CPUArchState__bindgen_ty_3, cpu_watchpoint) - 0usize];
};
impl Default for CPUArchState__bindgen_ty_3 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUArchState__bindgen_ty_3 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "CPUArchState__bindgen_ty_3 {{ union }}")
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CPUArchState__bindgen_ty_4 {}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUArchState__bindgen_ty_4"]
[::std::mem::size_of::<CPUArchState__bindgen_ty_4>() - 0usize];
["Alignment of CPUArchState__bindgen_ty_4"]
[::std::mem::align_of::<CPUArchState__bindgen_ty_4>() - 1usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUArchState"][::std::mem::size_of::<CPUArchState>() - 15072usize];
["Alignment of CPUArchState"][::std::mem::align_of::<CPUArchState>() - 16usize];
["Offset of field: CPUArchState::regs"][::std::mem::offset_of!(CPUArchState, regs) - 0usize];
["Offset of field: CPUArchState::eip"][::std::mem::offset_of!(CPUArchState, eip) - 128usize];
["Offset of field: CPUArchState::eflags"]
[::std::mem::offset_of!(CPUArchState, eflags) - 136usize];
["Offset of field: CPUArchState::cc_dst"]
[::std::mem::offset_of!(CPUArchState, cc_dst) - 144usize];
["Offset of field: CPUArchState::cc_src"]
[::std::mem::offset_of!(CPUArchState, cc_src) - 152usize];
["Offset of field: CPUArchState::cc_src2"]
[::std::mem::offset_of!(CPUArchState, cc_src2) - 160usize];
["Offset of field: CPUArchState::cc_op"]
[::std::mem::offset_of!(CPUArchState, cc_op) - 168usize];
["Offset of field: CPUArchState::df"][::std::mem::offset_of!(CPUArchState, df) - 172usize];
["Offset of field: CPUArchState::hflags"]
[::std::mem::offset_of!(CPUArchState, hflags) - 176usize];
["Offset of field: CPUArchState::hflags2"]
[::std::mem::offset_of!(CPUArchState, hflags2) - 180usize];
["Offset of field: CPUArchState::segs"][::std::mem::offset_of!(CPUArchState, segs) - 184usize];
["Offset of field: CPUArchState::ldt"][::std::mem::offset_of!(CPUArchState, ldt) - 328usize];
["Offset of field: CPUArchState::tr"][::std::mem::offset_of!(CPUArchState, tr) - 352usize];
["Offset of field: CPUArchState::gdt"][::std::mem::offset_of!(CPUArchState, gdt) - 376usize];
["Offset of field: CPUArchState::idt"][::std::mem::offset_of!(CPUArchState, idt) - 400usize];
["Offset of field: CPUArchState::cr"][::std::mem::offset_of!(CPUArchState, cr) - 424usize];
["Offset of field: CPUArchState::pdptrs_valid"]
[::std::mem::offset_of!(CPUArchState, pdptrs_valid) - 464usize];
["Offset of field: CPUArchState::pdptrs"]
[::std::mem::offset_of!(CPUArchState, pdptrs) - 472usize];
["Offset of field: CPUArchState::a20_mask"]
[::std::mem::offset_of!(CPUArchState, a20_mask) - 504usize];
["Offset of field: CPUArchState::bnd_regs"]
[::std::mem::offset_of!(CPUArchState, bnd_regs) - 512usize];
["Offset of field: CPUArchState::bndcs_regs"]
[::std::mem::offset_of!(CPUArchState, bndcs_regs) - 576usize];
["Offset of field: CPUArchState::msr_bndcfgs"]
[::std::mem::offset_of!(CPUArchState, msr_bndcfgs) - 592usize];
["Offset of field: CPUArchState::efer"][::std::mem::offset_of!(CPUArchState, efer) - 600usize];
["Offset of field: CPUArchState::start_init_save"]
[::std::mem::offset_of!(CPUArchState, start_init_save) - 608usize];
["Offset of field: CPUArchState::fpstt"]
[::std::mem::offset_of!(CPUArchState, fpstt) - 608usize];
["Offset of field: CPUArchState::fpus"][::std::mem::offset_of!(CPUArchState, fpus) - 612usize];
["Offset of field: CPUArchState::fpuc"][::std::mem::offset_of!(CPUArchState, fpuc) - 614usize];
["Offset of field: CPUArchState::fptags"]
[::std::mem::offset_of!(CPUArchState, fptags) - 616usize];
["Offset of field: CPUArchState::fpregs"]
[::std::mem::offset_of!(CPUArchState, fpregs) - 624usize];
["Offset of field: CPUArchState::fpop"][::std::mem::offset_of!(CPUArchState, fpop) - 752usize];
["Offset of field: CPUArchState::fpcs"][::std::mem::offset_of!(CPUArchState, fpcs) - 754usize];
["Offset of field: CPUArchState::fpds"][::std::mem::offset_of!(CPUArchState, fpds) - 756usize];
["Offset of field: CPUArchState::fpip"][::std::mem::offset_of!(CPUArchState, fpip) - 760usize];
["Offset of field: CPUArchState::fpdp"][::std::mem::offset_of!(CPUArchState, fpdp) - 768usize];
["Offset of field: CPUArchState::fp_status"]
[::std::mem::offset_of!(CPUArchState, fp_status) - 776usize];
["Offset of field: CPUArchState::ft0"][::std::mem::offset_of!(CPUArchState, ft0) - 800usize];
["Offset of field: CPUArchState::mmx_status"]
[::std::mem::offset_of!(CPUArchState, mmx_status) - 816usize];
["Offset of field: CPUArchState::sse_status"]
[::std::mem::offset_of!(CPUArchState, sse_status) - 834usize];
["Offset of field: CPUArchState::mxcsr"]
[::std::mem::offset_of!(CPUArchState, mxcsr) - 852usize];
["Offset of field: CPUArchState::xmm_regs"]
[::std::mem::offset_of!(CPUArchState, xmm_regs) - 864usize];
["Offset of field: CPUArchState::xmm_t0"]
[::std::mem::offset_of!(CPUArchState, xmm_t0) - 2912usize];
["Offset of field: CPUArchState::mmx_t0"]
[::std::mem::offset_of!(CPUArchState, mmx_t0) - 2976usize];
["Offset of field: CPUArchState::opmask_regs"]
[::std::mem::offset_of!(CPUArchState, opmask_regs) - 2984usize];
["Offset of field: CPUArchState::xtilecfg"]
[::std::mem::offset_of!(CPUArchState, xtilecfg) - 3048usize];
["Offset of field: CPUArchState::xtiledata"]
[::std::mem::offset_of!(CPUArchState, xtiledata) - 3112usize];
["Offset of field: CPUArchState::sysenter_cs"]
[::std::mem::offset_of!(CPUArchState, sysenter_cs) - 11304usize];
["Offset of field: CPUArchState::sysenter_esp"]
[::std::mem::offset_of!(CPUArchState, sysenter_esp) - 11312usize];
["Offset of field: CPUArchState::sysenter_eip"]
[::std::mem::offset_of!(CPUArchState, sysenter_eip) - 11320usize];
["Offset of field: CPUArchState::star"]
[::std::mem::offset_of!(CPUArchState, star) - 11328usize];
["Offset of field: CPUArchState::vm_hsave"]
[::std::mem::offset_of!(CPUArchState, vm_hsave) - 11336usize];
["Offset of field: CPUArchState::lstar"]
[::std::mem::offset_of!(CPUArchState, lstar) - 11344usize];
["Offset of field: CPUArchState::cstar"]
[::std::mem::offset_of!(CPUArchState, cstar) - 11352usize];
["Offset of field: CPUArchState::fmask"]
[::std::mem::offset_of!(CPUArchState, fmask) - 11360usize];
["Offset of field: CPUArchState::kernelgsbase"]
[::std::mem::offset_of!(CPUArchState, kernelgsbase) - 11368usize];
["Offset of field: CPUArchState::fred_rsp0"]
[::std::mem::offset_of!(CPUArchState, fred_rsp0) - 11376usize];
["Offset of field: CPUArchState::fred_rsp1"]
[::std::mem::offset_of!(CPUArchState, fred_rsp1) - 11384usize];
["Offset of field: CPUArchState::fred_rsp2"]
[::std::mem::offset_of!(CPUArchState, fred_rsp2) - 11392usize];
["Offset of field: CPUArchState::fred_rsp3"]
[::std::mem::offset_of!(CPUArchState, fred_rsp3) - 11400usize];
["Offset of field: CPUArchState::fred_stklvls"]
[::std::mem::offset_of!(CPUArchState, fred_stklvls) - 11408usize];
["Offset of field: CPUArchState::fred_ssp1"]
[::std::mem::offset_of!(CPUArchState, fred_ssp1) - 11416usize];
["Offset of field: CPUArchState::fred_ssp2"]
[::std::mem::offset_of!(CPUArchState, fred_ssp2) - 11424usize];
["Offset of field: CPUArchState::fred_ssp3"]
[::std::mem::offset_of!(CPUArchState, fred_ssp3) - 11432usize];
["Offset of field: CPUArchState::fred_config"]
[::std::mem::offset_of!(CPUArchState, fred_config) - 11440usize];
["Offset of field: CPUArchState::tsc_adjust"]
[::std::mem::offset_of!(CPUArchState, tsc_adjust) - 11448usize];
["Offset of field: CPUArchState::tsc_deadline"]
[::std::mem::offset_of!(CPUArchState, tsc_deadline) - 11456usize];
["Offset of field: CPUArchState::tsc_aux"]
[::std::mem::offset_of!(CPUArchState, tsc_aux) - 11464usize];
["Offset of field: CPUArchState::xcr0"]
[::std::mem::offset_of!(CPUArchState, xcr0) - 11472usize];
["Offset of field: CPUArchState::mcg_status"]
[::std::mem::offset_of!(CPUArchState, mcg_status) - 11480usize];
["Offset of field: CPUArchState::msr_ia32_misc_enable"]
[::std::mem::offset_of!(CPUArchState, msr_ia32_misc_enable) - 11488usize];
["Offset of field: CPUArchState::msr_ia32_feature_control"]
[::std::mem::offset_of!(CPUArchState, msr_ia32_feature_control) - 11496usize];
["Offset of field: CPUArchState::msr_ia32_sgxlepubkeyhash"]
[::std::mem::offset_of!(CPUArchState, msr_ia32_sgxlepubkeyhash) - 11504usize];
["Offset of field: CPUArchState::msr_fixed_ctr_ctrl"]
[::std::mem::offset_of!(CPUArchState, msr_fixed_ctr_ctrl) - 11536usize];
["Offset of field: CPUArchState::msr_global_ctrl"]
[::std::mem::offset_of!(CPUArchState, msr_global_ctrl) - 11544usize];
["Offset of field: CPUArchState::msr_global_status"]
[::std::mem::offset_of!(CPUArchState, msr_global_status) - 11552usize];
["Offset of field: CPUArchState::msr_global_ovf_ctrl"]
[::std::mem::offset_of!(CPUArchState, msr_global_ovf_ctrl) - 11560usize];
["Offset of field: CPUArchState::msr_fixed_counters"]
[::std::mem::offset_of!(CPUArchState, msr_fixed_counters) - 11568usize];
["Offset of field: CPUArchState::msr_gp_counters"]
[::std::mem::offset_of!(CPUArchState, msr_gp_counters) - 11592usize];
["Offset of field: CPUArchState::msr_gp_evtsel"]
[::std::mem::offset_of!(CPUArchState, msr_gp_evtsel) - 11736usize];
["Offset of field: CPUArchState::pat"][::std::mem::offset_of!(CPUArchState, pat) - 11880usize];
["Offset of field: CPUArchState::smbase"]
[::std::mem::offset_of!(CPUArchState, smbase) - 11888usize];
["Offset of field: CPUArchState::msr_smi_count"]
[::std::mem::offset_of!(CPUArchState, msr_smi_count) - 11896usize];
["Offset of field: CPUArchState::pkru"]
[::std::mem::offset_of!(CPUArchState, pkru) - 11904usize];
["Offset of field: CPUArchState::pkrs"]
[::std::mem::offset_of!(CPUArchState, pkrs) - 11908usize];
["Offset of field: CPUArchState::tsx_ctrl"]
[::std::mem::offset_of!(CPUArchState, tsx_ctrl) - 11912usize];
["Offset of field: CPUArchState::spec_ctrl"]
[::std::mem::offset_of!(CPUArchState, spec_ctrl) - 11920usize];
["Offset of field: CPUArchState::amd_tsc_scale_msr"]
[::std::mem::offset_of!(CPUArchState, amd_tsc_scale_msr) - 11928usize];
["Offset of field: CPUArchState::virt_ssbd"]
[::std::mem::offset_of!(CPUArchState, virt_ssbd) - 11936usize];
["Offset of field: CPUArchState::end_init_save"]
[::std::mem::offset_of!(CPUArchState, end_init_save) - 11944usize];
["Offset of field: CPUArchState::system_time_msr"]
[::std::mem::offset_of!(CPUArchState, system_time_msr) - 11944usize];
["Offset of field: CPUArchState::wall_clock_msr"]
[::std::mem::offset_of!(CPUArchState, wall_clock_msr) - 11952usize];
["Offset of field: CPUArchState::steal_time_msr"]
[::std::mem::offset_of!(CPUArchState, steal_time_msr) - 11960usize];
["Offset of field: CPUArchState::async_pf_en_msr"]
[::std::mem::offset_of!(CPUArchState, async_pf_en_msr) - 11968usize];
["Offset of field: CPUArchState::async_pf_int_msr"]
[::std::mem::offset_of!(CPUArchState, async_pf_int_msr) - 11976usize];
["Offset of field: CPUArchState::pv_eoi_en_msr"]
[::std::mem::offset_of!(CPUArchState, pv_eoi_en_msr) - 11984usize];
["Offset of field: CPUArchState::poll_control_msr"]
[::std::mem::offset_of!(CPUArchState, poll_control_msr) - 11992usize];
["Offset of field: CPUArchState::msr_hv_hypercall"]
[::std::mem::offset_of!(CPUArchState, msr_hv_hypercall) - 12000usize];
["Offset of field: CPUArchState::msr_hv_guest_os_id"]
[::std::mem::offset_of!(CPUArchState, msr_hv_guest_os_id) - 12008usize];
["Offset of field: CPUArchState::msr_hv_tsc"]
[::std::mem::offset_of!(CPUArchState, msr_hv_tsc) - 12016usize];
["Offset of field: CPUArchState::msr_hv_syndbg_control"]
[::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_control) - 12024usize];
["Offset of field: CPUArchState::msr_hv_syndbg_status"]
[::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_status) - 12032usize];
["Offset of field: CPUArchState::msr_hv_syndbg_send_page"]
[::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_send_page) - 12040usize];
["Offset of field: CPUArchState::msr_hv_syndbg_recv_page"]
[::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_recv_page) - 12048usize];
["Offset of field: CPUArchState::msr_hv_syndbg_pending_page"]
[::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_pending_page) - 12056usize];
["Offset of field: CPUArchState::msr_hv_syndbg_options"]
[::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_options) - 12064usize];
["Offset of field: CPUArchState::msr_hv_vapic"]
[::std::mem::offset_of!(CPUArchState, msr_hv_vapic) - 12072usize];
["Offset of field: CPUArchState::msr_hv_crash_params"]
[::std::mem::offset_of!(CPUArchState, msr_hv_crash_params) - 12080usize];
["Offset of field: CPUArchState::msr_hv_runtime"]
[::std::mem::offset_of!(CPUArchState, msr_hv_runtime) - 12120usize];
["Offset of field: CPUArchState::msr_hv_synic_control"]
[::std::mem::offset_of!(CPUArchState, msr_hv_synic_control) - 12128usize];
["Offset of field: CPUArchState::msr_hv_synic_evt_page"]
[::std::mem::offset_of!(CPUArchState, msr_hv_synic_evt_page) - 12136usize];
["Offset of field: CPUArchState::msr_hv_synic_msg_page"]
[::std::mem::offset_of!(CPUArchState, msr_hv_synic_msg_page) - 12144usize];
["Offset of field: CPUArchState::msr_hv_synic_sint"]
[::std::mem::offset_of!(CPUArchState, msr_hv_synic_sint) - 12152usize];
["Offset of field: CPUArchState::msr_hv_stimer_config"]
[::std::mem::offset_of!(CPUArchState, msr_hv_stimer_config) - 12280usize];
["Offset of field: CPUArchState::msr_hv_stimer_count"]
[::std::mem::offset_of!(CPUArchState, msr_hv_stimer_count) - 12312usize];
["Offset of field: CPUArchState::msr_hv_reenlightenment_control"]
[::std::mem::offset_of!(CPUArchState, msr_hv_reenlightenment_control) - 12344usize];
["Offset of field: CPUArchState::msr_hv_tsc_emulation_control"]
[::std::mem::offset_of!(CPUArchState, msr_hv_tsc_emulation_control) - 12352usize];
["Offset of field: CPUArchState::msr_hv_tsc_emulation_status"]
[::std::mem::offset_of!(CPUArchState, msr_hv_tsc_emulation_status) - 12360usize];
["Offset of field: CPUArchState::msr_rtit_ctrl"]
[::std::mem::offset_of!(CPUArchState, msr_rtit_ctrl) - 12368usize];
["Offset of field: CPUArchState::msr_rtit_status"]
[::std::mem::offset_of!(CPUArchState, msr_rtit_status) - 12376usize];
["Offset of field: CPUArchState::msr_rtit_output_base"]
[::std::mem::offset_of!(CPUArchState, msr_rtit_output_base) - 12384usize];
["Offset of field: CPUArchState::msr_rtit_output_mask"]
[::std::mem::offset_of!(CPUArchState, msr_rtit_output_mask) - 12392usize];
["Offset of field: CPUArchState::msr_rtit_cr3_match"]
[::std::mem::offset_of!(CPUArchState, msr_rtit_cr3_match) - 12400usize];
["Offset of field: CPUArchState::msr_rtit_addrs"]
[::std::mem::offset_of!(CPUArchState, msr_rtit_addrs) - 12408usize];
["Offset of field: CPUArchState::msr_xfd"]
[::std::mem::offset_of!(CPUArchState, msr_xfd) - 12472usize];
["Offset of field: CPUArchState::msr_xfd_err"]
[::std::mem::offset_of!(CPUArchState, msr_xfd_err) - 12480usize];
["Offset of field: CPUArchState::msr_lbr_ctl"]
[::std::mem::offset_of!(CPUArchState, msr_lbr_ctl) - 12488usize];
["Offset of field: CPUArchState::msr_lbr_depth"]
[::std::mem::offset_of!(CPUArchState, msr_lbr_depth) - 12496usize];
["Offset of field: CPUArchState::lbr_records"]
[::std::mem::offset_of!(CPUArchState, lbr_records) - 12504usize];
["Offset of field: CPUArchState::msr_hwcr"]
[::std::mem::offset_of!(CPUArchState, msr_hwcr) - 13272usize];
["Offset of field: CPUArchState::error_code"]
[::std::mem::offset_of!(CPUArchState, error_code) - 13280usize];
["Offset of field: CPUArchState::exception_is_int"]
[::std::mem::offset_of!(CPUArchState, exception_is_int) - 13284usize];
["Offset of field: CPUArchState::exception_next_eip"]
[::std::mem::offset_of!(CPUArchState, exception_next_eip) - 13288usize];
["Offset of field: CPUArchState::dr"][::std::mem::offset_of!(CPUArchState, dr) - 13296usize];
["Offset of field: CPUArchState::old_exception"]
[::std::mem::offset_of!(CPUArchState, old_exception) - 13392usize];
["Offset of field: CPUArchState::vm_vmcb"]
[::std::mem::offset_of!(CPUArchState, vm_vmcb) - 13400usize];
["Offset of field: CPUArchState::tsc_offset"]
[::std::mem::offset_of!(CPUArchState, tsc_offset) - 13408usize];
["Offset of field: CPUArchState::intercept"]
[::std::mem::offset_of!(CPUArchState, intercept) - 13416usize];
["Offset of field: CPUArchState::intercept_cr_read"]
[::std::mem::offset_of!(CPUArchState, intercept_cr_read) - 13424usize];
["Offset of field: CPUArchState::intercept_cr_write"]
[::std::mem::offset_of!(CPUArchState, intercept_cr_write) - 13426usize];
["Offset of field: CPUArchState::intercept_dr_read"]
[::std::mem::offset_of!(CPUArchState, intercept_dr_read) - 13428usize];
["Offset of field: CPUArchState::intercept_dr_write"]
[::std::mem::offset_of!(CPUArchState, intercept_dr_write) - 13430usize];
["Offset of field: CPUArchState::intercept_exceptions"]
[::std::mem::offset_of!(CPUArchState, intercept_exceptions) - 13432usize];
["Offset of field: CPUArchState::nested_cr3"]
[::std::mem::offset_of!(CPUArchState, nested_cr3) - 13440usize];
["Offset of field: CPUArchState::nested_pg_mode"]
[::std::mem::offset_of!(CPUArchState, nested_pg_mode) - 13448usize];
["Offset of field: CPUArchState::v_tpr"]
[::std::mem::offset_of!(CPUArchState, v_tpr) - 13452usize];
["Offset of field: CPUArchState::int_ctl"]
[::std::mem::offset_of!(CPUArchState, int_ctl) - 13456usize];
["Offset of field: CPUArchState::nmi_injected"]
[::std::mem::offset_of!(CPUArchState, nmi_injected) - 13460usize];
["Offset of field: CPUArchState::nmi_pending"]
[::std::mem::offset_of!(CPUArchState, nmi_pending) - 13461usize];
["Offset of field: CPUArchState::retaddr"]
[::std::mem::offset_of!(CPUArchState, retaddr) - 13464usize];
["Offset of field: CPUArchState::msr_rapl_power_unit"]
[::std::mem::offset_of!(CPUArchState, msr_rapl_power_unit) - 13472usize];
["Offset of field: CPUArchState::msr_pkg_energy_status"]
[::std::mem::offset_of!(CPUArchState, msr_pkg_energy_status) - 13480usize];
["Offset of field: CPUArchState::end_reset_fields"]
[::std::mem::offset_of!(CPUArchState, end_reset_fields) - 13488usize];
["Offset of field: CPUArchState::cpuid_level_func7"]
[::std::mem::offset_of!(CPUArchState, cpuid_level_func7) - 13488usize];
["Offset of field: CPUArchState::cpuid_min_level_func7"]
[::std::mem::offset_of!(CPUArchState, cpuid_min_level_func7) - 13492usize];
["Offset of field: CPUArchState::cpuid_min_level"]
[::std::mem::offset_of!(CPUArchState, cpuid_min_level) - 13496usize];
["Offset of field: CPUArchState::cpuid_min_xlevel"]
[::std::mem::offset_of!(CPUArchState, cpuid_min_xlevel) - 13500usize];
["Offset of field: CPUArchState::cpuid_min_xlevel2"]
[::std::mem::offset_of!(CPUArchState, cpuid_min_xlevel2) - 13504usize];
["Offset of field: CPUArchState::cpuid_max_level"]
[::std::mem::offset_of!(CPUArchState, cpuid_max_level) - 13508usize];
["Offset of field: CPUArchState::cpuid_max_xlevel"]
[::std::mem::offset_of!(CPUArchState, cpuid_max_xlevel) - 13512usize];
["Offset of field: CPUArchState::cpuid_max_xlevel2"]
[::std::mem::offset_of!(CPUArchState, cpuid_max_xlevel2) - 13516usize];
["Offset of field: CPUArchState::cpuid_level"]
[::std::mem::offset_of!(CPUArchState, cpuid_level) - 13520usize];
["Offset of field: CPUArchState::cpuid_xlevel"]
[::std::mem::offset_of!(CPUArchState, cpuid_xlevel) - 13524usize];
["Offset of field: CPUArchState::cpuid_xlevel2"]
[::std::mem::offset_of!(CPUArchState, cpuid_xlevel2) - 13528usize];
["Offset of field: CPUArchState::cpuid_vendor1"]
[::std::mem::offset_of!(CPUArchState, cpuid_vendor1) - 13532usize];
["Offset of field: CPUArchState::cpuid_vendor2"]
[::std::mem::offset_of!(CPUArchState, cpuid_vendor2) - 13536usize];
["Offset of field: CPUArchState::cpuid_vendor3"]
[::std::mem::offset_of!(CPUArchState, cpuid_vendor3) - 13540usize];
["Offset of field: CPUArchState::cpuid_version"]
[::std::mem::offset_of!(CPUArchState, cpuid_version) - 13544usize];
["Offset of field: CPUArchState::features"]
[::std::mem::offset_of!(CPUArchState, features) - 13552usize];
["Offset of field: CPUArchState::avx10_version"]
[::std::mem::offset_of!(CPUArchState, avx10_version) - 13912usize];
["Offset of field: CPUArchState::user_features"]
[::std::mem::offset_of!(CPUArchState, user_features) - 13920usize];
["Offset of field: CPUArchState::cpuid_model"]
[::std::mem::offset_of!(CPUArchState, cpuid_model) - 14280usize];
["Offset of field: CPUArchState::cache_info"]
[::std::mem::offset_of!(CPUArchState, cache_info) - 14328usize];
["Offset of field: CPUArchState::enable_legacy_cpuid2_cache"]
[::std::mem::offset_of!(CPUArchState, enable_legacy_cpuid2_cache) - 14360usize];
["Offset of field: CPUArchState::enable_legacy_vendor_cache"]
[::std::mem::offset_of!(CPUArchState, enable_legacy_vendor_cache) - 14361usize];
["Offset of field: CPUArchState::mtrr_fixed"]
[::std::mem::offset_of!(CPUArchState, mtrr_fixed) - 14368usize];
["Offset of field: CPUArchState::mtrr_deftype"]
[::std::mem::offset_of!(CPUArchState, mtrr_deftype) - 14456usize];
["Offset of field: CPUArchState::mtrr_var"]
[::std::mem::offset_of!(CPUArchState, mtrr_var) - 14464usize];
["Offset of field: CPUArchState::mp_state"]
[::std::mem::offset_of!(CPUArchState, mp_state) - 14592usize];
["Offset of field: CPUArchState::exception_nr"]
[::std::mem::offset_of!(CPUArchState, exception_nr) - 14596usize];
["Offset of field: CPUArchState::interrupt_injected"]
[::std::mem::offset_of!(CPUArchState, interrupt_injected) - 14600usize];
["Offset of field: CPUArchState::soft_interrupt"]
[::std::mem::offset_of!(CPUArchState, soft_interrupt) - 14604usize];
["Offset of field: CPUArchState::exception_pending"]
[::std::mem::offset_of!(CPUArchState, exception_pending) - 14605usize];
["Offset of field: CPUArchState::exception_injected"]
[::std::mem::offset_of!(CPUArchState, exception_injected) - 14606usize];
["Offset of field: CPUArchState::has_error_code"]
[::std::mem::offset_of!(CPUArchState, has_error_code) - 14607usize];
["Offset of field: CPUArchState::exception_has_payload"]
[::std::mem::offset_of!(CPUArchState, exception_has_payload) - 14608usize];
["Offset of field: CPUArchState::exception_payload"]
[::std::mem::offset_of!(CPUArchState, exception_payload) - 14616usize];
["Offset of field: CPUArchState::triple_fault_pending"]
[::std::mem::offset_of!(CPUArchState, triple_fault_pending) - 14624usize];
["Offset of field: CPUArchState::ins_len"]
[::std::mem::offset_of!(CPUArchState, ins_len) - 14628usize];
["Offset of field: CPUArchState::sipi_vector"]
[::std::mem::offset_of!(CPUArchState, sipi_vector) - 14632usize];
["Offset of field: CPUArchState::tsc_valid"]
[::std::mem::offset_of!(CPUArchState, tsc_valid) - 14636usize];
["Offset of field: CPUArchState::tsc_khz"]
[::std::mem::offset_of!(CPUArchState, tsc_khz) - 14640usize];
["Offset of field: CPUArchState::user_tsc_khz"]
[::std::mem::offset_of!(CPUArchState, user_tsc_khz) - 14648usize];
["Offset of field: CPUArchState::apic_bus_freq"]
[::std::mem::offset_of!(CPUArchState, apic_bus_freq) - 14656usize];
["Offset of field: CPUArchState::tsc"][::std::mem::offset_of!(CPUArchState, tsc) - 14664usize];
["Offset of field: CPUArchState::mcg_cap"]
[::std::mem::offset_of!(CPUArchState, mcg_cap) - 14672usize];
["Offset of field: CPUArchState::mcg_ctl"]
[::std::mem::offset_of!(CPUArchState, mcg_ctl) - 14680usize];
["Offset of field: CPUArchState::mcg_ext_ctl"]
[::std::mem::offset_of!(CPUArchState, mcg_ext_ctl) - 14688usize];
["Offset of field: CPUArchState::mce_banks"]
[::std::mem::offset_of!(CPUArchState, mce_banks) - 14696usize];
["Offset of field: CPUArchState::xstate_bv"]
[::std::mem::offset_of!(CPUArchState, xstate_bv) - 15016usize];
["Offset of field: CPUArchState::fpus_vmstate"]
[::std::mem::offset_of!(CPUArchState, fpus_vmstate) - 15024usize];
["Offset of field: CPUArchState::fptag_vmstate"]
[::std::mem::offset_of!(CPUArchState, fptag_vmstate) - 15026usize];
["Offset of field: CPUArchState::fpregs_format_vmstate"]
[::std::mem::offset_of!(CPUArchState, fpregs_format_vmstate) - 15028usize];
["Offset of field: CPUArchState::xss"][::std::mem::offset_of!(CPUArchState, xss) - 15032usize];
["Offset of field: CPUArchState::umwait"]
[::std::mem::offset_of!(CPUArchState, umwait) - 15040usize];
["Offset of field: CPUArchState::tpr_access_type"]
[::std::mem::offset_of!(CPUArchState, tpr_access_type) - 15044usize];
["Offset of field: CPUArchState::topo_info"]
[::std::mem::offset_of!(CPUArchState, topo_info) - 15048usize];
["Offset of field: CPUArchState::avail_cpu_topo"]
[::std::mem::offset_of!(CPUArchState, avail_cpu_topo) - 15064usize];
};
impl Default for CPUArchState {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for CPUArchState {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"CPUArchState {{ regs: {:?}, segs: {:?}, ldt: {:?}, tr: {:?}, gdt: {:?}, idt: {:?}, cr: {:?}, pdptrs_valid: {:?}, pdptrs: {:?}, bnd_regs: {:?}, bndcs_regs: {:?}, start_init_save: {:?}, fpstt: {:?}, fptags: {:?}, fpregs: {:?}, fp_status: {:?}, ft0: {:?}, mmx_status: {:?}, sse_status: {:?}, xmm_regs: {:?}, xmm_t0: {:?}, mmx_t0: {:?}, opmask_regs: {:?}, xtilecfg: {:?}, xtiledata: {:?}, msr_ia32_sgxlepubkeyhash: {:?}, msr_fixed_counters: {:?}, msr_gp_counters: {:?}, msr_gp_evtsel: {:?}, end_init_save: {:?}, msr_hv_crash_params: {:?}, msr_hv_synic_sint: {:?}, msr_hv_stimer_config: {:?}, msr_hv_stimer_count: {:?}, msr_rtit_addrs: {:?}, lbr_records: {:?}, error_code: {:?}, exception_is_int: {:?}, dr: {:?}, __bindgen_anon_1: {:?}, old_exception: {:?}, end_reset_fields: {:?}, features: {:?}, user_features: {:?}, cpuid_model: {:?}, cache_info: {:?}, enable_legacy_cpuid2_cache: {:?}, enable_legacy_vendor_cache: {:?}, mtrr_fixed: {:?}, mtrr_var: {:?}, tsc_valid: {:?}, mce_banks: {:?}, tpr_access_type: {:?}, topo_info: {:?}, avail_cpu_topo: {:?} }}",
self.regs,
self.segs,
self.ldt,
self.tr,
self.gdt,
self.idt,
self.cr,
self.pdptrs_valid,
self.pdptrs,
self.bnd_regs,
self.bndcs_regs,
self.start_init_save,
self.fpstt,
self.fptags,
self.fpregs,
self.fp_status,
self.ft0,
self.mmx_status,
self.sse_status,
self.xmm_regs,
self.xmm_t0,
self.mmx_t0,
self.opmask_regs,
self.xtilecfg,
self.xtiledata,
self.msr_ia32_sgxlepubkeyhash,
self.msr_fixed_counters,
self.msr_gp_counters,
self.msr_gp_evtsel,
self.end_init_save,
self.msr_hv_crash_params,
self.msr_hv_synic_sint,
self.msr_hv_stimer_config,
self.msr_hv_stimer_count,
self.msr_rtit_addrs,
self.lbr_records,
self.error_code,
self.exception_is_int,
self.dr,
self.__bindgen_anon_1,
self.old_exception,
self.end_reset_fields,
self.features,
self.user_features,
self.cpuid_model,
self.cache_info,
self.enable_legacy_cpuid2_cache,
self.enable_legacy_vendor_cache,
self.mtrr_fixed,
self.mtrr_var,
self.tsc_valid,
self.mce_banks,
self.tpr_access_type,
self.topo_info,
self.avail_cpu_topo
)
}
}
pub type CPUX86State = CPUArchState;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct kvm_msrs {
_unused: [u8; 0],
}
#[doc = " X86CPU:\n @env: #CPUX86State\n @migratable: If set, only migratable flags will be accepted when \"enforce\"\n mode is used, and only migratable flags will be included in the \"host\"\n CPU model.\n\n An x86 CPU."]
#[repr(C)]
#[repr(align(16))]
pub struct ArchCPU {
pub parent_obj: CPUState,
pub env: CPUX86State,
pub vmsentry: *mut VMChangeStateEntry,
pub ucode_rev: u64,
pub hyperv_spinlock_attempts: u32,
pub hyperv_vendor: *mut ::std::os::raw::c_char,
pub hyperv_synic_kvm_only: bool,
pub hyperv_features: u64,
pub hyperv_passthrough: bool,
pub hyperv_no_nonarch_cs: OnOffAuto,
pub hyperv_vendor_id: [u32; 3usize],
pub hyperv_interface_id: [u32; 4usize],
pub hyperv_limits: [u32; 3usize],
pub hyperv_enforce_cpuid: bool,
pub hyperv_ver_id_build: u32,
pub hyperv_ver_id_major: u16,
pub hyperv_ver_id_minor: u16,
pub hyperv_ver_id_sp: u32,
pub hyperv_ver_id_sb: u8,
pub hyperv_ver_id_sn: u32,
pub check_cpuid: bool,
pub enforce_cpuid: bool,
pub force_features: bool,
pub expose_kvm: bool,
pub expose_tcg: bool,
pub migratable: bool,
pub migrate_smi_count: bool,
pub apic_id: u32,
pub vmware_cpuid_freq: bool,
pub cache_info_passthrough: bool,
pub mwait: ArchCPU__bindgen_ty_1,
pub filtered_features: FeatureWordArray,
pub forced_on_features: FeatureWordArray,
pub enable_pmu: bool,
pub lbr_fmt: u64,
pub enable_lmce: bool,
pub enable_l3_cache: bool,
pub l1_cache_per_core: bool,
pub legacy_cache: bool,
pub consistent_cache: bool,
pub legacy_multi_node: bool,
pub enable_cpuid_0xb: bool,
pub force_cpuid_0x1f: bool,
pub full_cpuid_auto_level: bool,
pub vendor_cpuid_only: bool,
pub vendor_cpuid_only_v2: bool,
pub amd_topoext_features_only: bool,
pub intel_pt_auto_level: bool,
pub fill_mtrr_mask: bool,
pub host_phys_bits: bool,
pub host_phys_bits_limit: u8,
pub kvm_pv_enforce_cpuid: bool,
pub arch_cap_always_on: bool,
pub pdcm_on_even_without_pmu: bool,
pub phys_bits: u32,
pub guest_phys_bits: u32,
pub apic_state: *mut APICCommonState,
pub cpu_as_root: *mut MemoryRegion,
pub cpu_as_mem: *mut MemoryRegion,
pub smram: *mut MemoryRegion,
pub machine_done: Notifier,
pub kvm_msr_buf: *mut kvm_msrs,
pub node_id: i32,
pub socket_id: i32,
pub die_id: i32,
pub module_id: i32,
pub core_id: i32,
pub thread_id: i32,
pub hv_max_vps: i32,
pub xen_vapic: bool,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ArchCPU__bindgen_ty_1 {
pub eax: u32,
pub ebx: u32,
pub ecx: u32,
pub edx: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of ArchCPU__bindgen_ty_1"][::std::mem::size_of::<ArchCPU__bindgen_ty_1>() - 16usize];
["Alignment of ArchCPU__bindgen_ty_1"]
[::std::mem::align_of::<ArchCPU__bindgen_ty_1>() - 4usize];
["Offset of field: ArchCPU__bindgen_ty_1::eax"]
[::std::mem::offset_of!(ArchCPU__bindgen_ty_1, eax) - 0usize];
["Offset of field: ArchCPU__bindgen_ty_1::ebx"]
[::std::mem::offset_of!(ArchCPU__bindgen_ty_1, ebx) - 4usize];
["Offset of field: ArchCPU__bindgen_ty_1::ecx"]
[::std::mem::offset_of!(ArchCPU__bindgen_ty_1, ecx) - 8usize];
["Offset of field: ArchCPU__bindgen_ty_1::edx"]
[::std::mem::offset_of!(ArchCPU__bindgen_ty_1, edx) - 12usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of ArchCPU"][::std::mem::size_of::<ArchCPU>() - 31200usize];
["Alignment of ArchCPU"][::std::mem::align_of::<ArchCPU>() - 16usize];
["Offset of field: ArchCPU::parent_obj"][::std::mem::offset_of!(ArchCPU, parent_obj) - 0usize];
["Offset of field: ArchCPU::env"][::std::mem::offset_of!(ArchCPU, env) - 15104usize];
["Offset of field: ArchCPU::vmsentry"][::std::mem::offset_of!(ArchCPU, vmsentry) - 30176usize];
["Offset of field: ArchCPU::ucode_rev"]
[::std::mem::offset_of!(ArchCPU, ucode_rev) - 30184usize];
["Offset of field: ArchCPU::hyperv_spinlock_attempts"]
[::std::mem::offset_of!(ArchCPU, hyperv_spinlock_attempts) - 30192usize];
["Offset of field: ArchCPU::hyperv_vendor"]
[::std::mem::offset_of!(ArchCPU, hyperv_vendor) - 30200usize];
["Offset of field: ArchCPU::hyperv_synic_kvm_only"]
[::std::mem::offset_of!(ArchCPU, hyperv_synic_kvm_only) - 30208usize];
["Offset of field: ArchCPU::hyperv_features"]
[::std::mem::offset_of!(ArchCPU, hyperv_features) - 30216usize];
["Offset of field: ArchCPU::hyperv_passthrough"]
[::std::mem::offset_of!(ArchCPU, hyperv_passthrough) - 30224usize];
["Offset of field: ArchCPU::hyperv_no_nonarch_cs"]
[::std::mem::offset_of!(ArchCPU, hyperv_no_nonarch_cs) - 30228usize];
["Offset of field: ArchCPU::hyperv_vendor_id"]
[::std::mem::offset_of!(ArchCPU, hyperv_vendor_id) - 30232usize];
["Offset of field: ArchCPU::hyperv_interface_id"]
[::std::mem::offset_of!(ArchCPU, hyperv_interface_id) - 30244usize];
["Offset of field: ArchCPU::hyperv_limits"]
[::std::mem::offset_of!(ArchCPU, hyperv_limits) - 30260usize];
["Offset of field: ArchCPU::hyperv_enforce_cpuid"]
[::std::mem::offset_of!(ArchCPU, hyperv_enforce_cpuid) - 30272usize];
["Offset of field: ArchCPU::hyperv_ver_id_build"]
[::std::mem::offset_of!(ArchCPU, hyperv_ver_id_build) - 30276usize];
["Offset of field: ArchCPU::hyperv_ver_id_major"]
[::std::mem::offset_of!(ArchCPU, hyperv_ver_id_major) - 30280usize];
["Offset of field: ArchCPU::hyperv_ver_id_minor"]
[::std::mem::offset_of!(ArchCPU, hyperv_ver_id_minor) - 30282usize];
["Offset of field: ArchCPU::hyperv_ver_id_sp"]
[::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sp) - 30284usize];
["Offset of field: ArchCPU::hyperv_ver_id_sb"]
[::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sb) - 30288usize];
["Offset of field: ArchCPU::hyperv_ver_id_sn"]
[::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sn) - 30292usize];
["Offset of field: ArchCPU::check_cpuid"]
[::std::mem::offset_of!(ArchCPU, check_cpuid) - 30296usize];
["Offset of field: ArchCPU::enforce_cpuid"]
[::std::mem::offset_of!(ArchCPU, enforce_cpuid) - 30297usize];
["Offset of field: ArchCPU::force_features"]
[::std::mem::offset_of!(ArchCPU, force_features) - 30298usize];
["Offset of field: ArchCPU::expose_kvm"]
[::std::mem::offset_of!(ArchCPU, expose_kvm) - 30299usize];
["Offset of field: ArchCPU::expose_tcg"]
[::std::mem::offset_of!(ArchCPU, expose_tcg) - 30300usize];
["Offset of field: ArchCPU::migratable"]
[::std::mem::offset_of!(ArchCPU, migratable) - 30301usize];
["Offset of field: ArchCPU::migrate_smi_count"]
[::std::mem::offset_of!(ArchCPU, migrate_smi_count) - 30302usize];
["Offset of field: ArchCPU::apic_id"][::std::mem::offset_of!(ArchCPU, apic_id) - 30304usize];
["Offset of field: ArchCPU::vmware_cpuid_freq"]
[::std::mem::offset_of!(ArchCPU, vmware_cpuid_freq) - 30308usize];
["Offset of field: ArchCPU::cache_info_passthrough"]
[::std::mem::offset_of!(ArchCPU, cache_info_passthrough) - 30309usize];
["Offset of field: ArchCPU::mwait"][::std::mem::offset_of!(ArchCPU, mwait) - 30312usize];
["Offset of field: ArchCPU::filtered_features"]
[::std::mem::offset_of!(ArchCPU, filtered_features) - 30328usize];
["Offset of field: ArchCPU::forced_on_features"]
[::std::mem::offset_of!(ArchCPU, forced_on_features) - 30688usize];
["Offset of field: ArchCPU::enable_pmu"]
[::std::mem::offset_of!(ArchCPU, enable_pmu) - 31048usize];
["Offset of field: ArchCPU::lbr_fmt"][::std::mem::offset_of!(ArchCPU, lbr_fmt) - 31056usize];
["Offset of field: ArchCPU::enable_lmce"]
[::std::mem::offset_of!(ArchCPU, enable_lmce) - 31064usize];
["Offset of field: ArchCPU::enable_l3_cache"]
[::std::mem::offset_of!(ArchCPU, enable_l3_cache) - 31065usize];
["Offset of field: ArchCPU::l1_cache_per_core"]
[::std::mem::offset_of!(ArchCPU, l1_cache_per_core) - 31066usize];
["Offset of field: ArchCPU::legacy_cache"]
[::std::mem::offset_of!(ArchCPU, legacy_cache) - 31067usize];
["Offset of field: ArchCPU::consistent_cache"]
[::std::mem::offset_of!(ArchCPU, consistent_cache) - 31068usize];
["Offset of field: ArchCPU::legacy_multi_node"]
[::std::mem::offset_of!(ArchCPU, legacy_multi_node) - 31069usize];
["Offset of field: ArchCPU::enable_cpuid_0xb"]
[::std::mem::offset_of!(ArchCPU, enable_cpuid_0xb) - 31070usize];
["Offset of field: ArchCPU::force_cpuid_0x1f"]
[::std::mem::offset_of!(ArchCPU, force_cpuid_0x1f) - 31071usize];
["Offset of field: ArchCPU::full_cpuid_auto_level"]
[::std::mem::offset_of!(ArchCPU, full_cpuid_auto_level) - 31072usize];
["Offset of field: ArchCPU::vendor_cpuid_only"]
[::std::mem::offset_of!(ArchCPU, vendor_cpuid_only) - 31073usize];
["Offset of field: ArchCPU::vendor_cpuid_only_v2"]
[::std::mem::offset_of!(ArchCPU, vendor_cpuid_only_v2) - 31074usize];
["Offset of field: ArchCPU::amd_topoext_features_only"]
[::std::mem::offset_of!(ArchCPU, amd_topoext_features_only) - 31075usize];
["Offset of field: ArchCPU::intel_pt_auto_level"]
[::std::mem::offset_of!(ArchCPU, intel_pt_auto_level) - 31076usize];
["Offset of field: ArchCPU::fill_mtrr_mask"]
[::std::mem::offset_of!(ArchCPU, fill_mtrr_mask) - 31077usize];
["Offset of field: ArchCPU::host_phys_bits"]
[::std::mem::offset_of!(ArchCPU, host_phys_bits) - 31078usize];
["Offset of field: ArchCPU::host_phys_bits_limit"]
[::std::mem::offset_of!(ArchCPU, host_phys_bits_limit) - 31079usize];
["Offset of field: ArchCPU::kvm_pv_enforce_cpuid"]
[::std::mem::offset_of!(ArchCPU, kvm_pv_enforce_cpuid) - 31080usize];
["Offset of field: ArchCPU::arch_cap_always_on"]
[::std::mem::offset_of!(ArchCPU, arch_cap_always_on) - 31081usize];
["Offset of field: ArchCPU::pdcm_on_even_without_pmu"]
[::std::mem::offset_of!(ArchCPU, pdcm_on_even_without_pmu) - 31082usize];
["Offset of field: ArchCPU::phys_bits"]
[::std::mem::offset_of!(ArchCPU, phys_bits) - 31084usize];
["Offset of field: ArchCPU::guest_phys_bits"]
[::std::mem::offset_of!(ArchCPU, guest_phys_bits) - 31088usize];
["Offset of field: ArchCPU::apic_state"]
[::std::mem::offset_of!(ArchCPU, apic_state) - 31096usize];
["Offset of field: ArchCPU::cpu_as_root"]
[::std::mem::offset_of!(ArchCPU, cpu_as_root) - 31104usize];
["Offset of field: ArchCPU::cpu_as_mem"]
[::std::mem::offset_of!(ArchCPU, cpu_as_mem) - 31112usize];
["Offset of field: ArchCPU::smram"][::std::mem::offset_of!(ArchCPU, smram) - 31120usize];
["Offset of field: ArchCPU::machine_done"]
[::std::mem::offset_of!(ArchCPU, machine_done) - 31128usize];
["Offset of field: ArchCPU::kvm_msr_buf"]
[::std::mem::offset_of!(ArchCPU, kvm_msr_buf) - 31152usize];
["Offset of field: ArchCPU::node_id"][::std::mem::offset_of!(ArchCPU, node_id) - 31160usize];
["Offset of field: ArchCPU::socket_id"]
[::std::mem::offset_of!(ArchCPU, socket_id) - 31164usize];
["Offset of field: ArchCPU::die_id"][::std::mem::offset_of!(ArchCPU, die_id) - 31168usize];
["Offset of field: ArchCPU::module_id"]
[::std::mem::offset_of!(ArchCPU, module_id) - 31172usize];
["Offset of field: ArchCPU::core_id"][::std::mem::offset_of!(ArchCPU, core_id) - 31176usize];
["Offset of field: ArchCPU::thread_id"]
[::std::mem::offset_of!(ArchCPU, thread_id) - 31180usize];
["Offset of field: ArchCPU::hv_max_vps"]
[::std::mem::offset_of!(ArchCPU, hv_max_vps) - 31184usize];
["Offset of field: ArchCPU::xen_vapic"]
[::std::mem::offset_of!(ArchCPU, xen_vapic) - 31188usize];
};
impl Default for ArchCPU {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for ArchCPU {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"ArchCPU {{ parent_obj: {:?}, env: {:?}, vmsentry: {:?}, hyperv_vendor: {:?}, hyperv_synic_kvm_only: {:?}, hyperv_passthrough: {:?}, hyperv_no_nonarch_cs: {:?}, hyperv_vendor_id: {:?}, hyperv_interface_id: {:?}, hyperv_limits: {:?}, hyperv_enforce_cpuid: {:?}, check_cpuid: {:?}, enforce_cpuid: {:?}, force_features: {:?}, expose_kvm: {:?}, expose_tcg: {:?}, migratable: {:?}, migrate_smi_count: {:?}, vmware_cpuid_freq: {:?}, cache_info_passthrough: {:?}, mwait: {:?}, filtered_features: {:?}, forced_on_features: {:?}, enable_pmu: {:?}, enable_lmce: {:?}, enable_l3_cache: {:?}, l1_cache_per_core: {:?}, legacy_cache: {:?}, consistent_cache: {:?}, legacy_multi_node: {:?}, enable_cpuid_0xb: {:?}, force_cpuid_0x1f: {:?}, full_cpuid_auto_level: {:?}, vendor_cpuid_only: {:?}, vendor_cpuid_only_v2: {:?}, amd_topoext_features_only: {:?}, intel_pt_auto_level: {:?}, fill_mtrr_mask: {:?}, host_phys_bits: {:?}, kvm_pv_enforce_cpuid: {:?}, arch_cap_always_on: {:?}, pdcm_on_even_without_pmu: {:?}, apic_state: {:?}, cpu_as_root: {:?}, cpu_as_mem: {:?}, smram: {:?}, machine_done: {:?}, kvm_msr_buf: {:?}, xen_vapic: {:?} }}",
self.parent_obj,
self.env,
self.vmsentry,
self.hyperv_vendor,
self.hyperv_synic_kvm_only,
self.hyperv_passthrough,
self.hyperv_no_nonarch_cs,
self.hyperv_vendor_id,
self.hyperv_interface_id,
self.hyperv_limits,
self.hyperv_enforce_cpuid,
self.check_cpuid,
self.enforce_cpuid,
self.force_features,
self.expose_kvm,
self.expose_tcg,
self.migratable,
self.migrate_smi_count,
self.vmware_cpuid_freq,
self.cache_info_passthrough,
self.mwait,
self.filtered_features,
self.forced_on_features,
self.enable_pmu,
self.enable_lmce,
self.enable_l3_cache,
self.l1_cache_per_core,
self.legacy_cache,
self.consistent_cache,
self.legacy_multi_node,
self.enable_cpuid_0xb,
self.force_cpuid_0x1f,
self.full_cpuid_auto_level,
self.vendor_cpuid_only,
self.vendor_cpuid_only_v2,
self.amd_topoext_features_only,
self.intel_pt_auto_level,
self.fill_mtrr_mask,
self.host_phys_bits,
self.kvm_pv_enforce_cpuid,
self.arch_cap_always_on,
self.pdcm_on_even_without_pmu,
self.apic_state,
self.cpu_as_root,
self.cpu_as_mem,
self.smram,
self.machine_done,
self.kvm_msr_buf,
self.xen_vapic
)
}
}
pub type MemOpIdx = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TCGTBCPUState {
pub pc: vaddr,
pub flags: u32,
pub cflags: u32,
pub cs_base: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of TCGTBCPUState"][::std::mem::size_of::<TCGTBCPUState>() - 24usize];
["Alignment of TCGTBCPUState"][::std::mem::align_of::<TCGTBCPUState>() - 8usize];
["Offset of field: TCGTBCPUState::pc"][::std::mem::offset_of!(TCGTBCPUState, pc) - 0usize];
["Offset of field: TCGTBCPUState::flags"]
[::std::mem::offset_of!(TCGTBCPUState, flags) - 8usize];
["Offset of field: TCGTBCPUState::cflags"]
[::std::mem::offset_of!(TCGTBCPUState, cflags) - 12usize];
["Offset of field: TCGTBCPUState::cs_base"]
[::std::mem::offset_of!(TCGTBCPUState, cs_base) - 16usize];
};
pub const TCGBar_TCG_MO_LD_LD: TCGBar = TCGBar(1);
pub const TCGBar_TCG_MO_ST_LD: TCGBar = TCGBar(2);
pub const TCGBar_TCG_MO_LD_ST: TCGBar = TCGBar(4);
pub const TCGBar_TCG_MO_ST_ST: TCGBar = TCGBar(8);
pub const TCGBar_TCG_MO_ALL: TCGBar = TCGBar(15);
pub const TCGBar_TCG_BAR_LDAQ: TCGBar = TCGBar(16);
pub const TCGBar_TCG_BAR_STRL: TCGBar = TCGBar(32);
pub const TCGBar_TCG_BAR_SC: TCGBar = TCGBar(48);
impl ::std::ops::BitOr<TCGBar> for TCGBar {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
TCGBar(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for TCGBar {
#[inline]
fn bitor_assign(&mut self, rhs: TCGBar) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<TCGBar> for TCGBar {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
TCGBar(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for TCGBar {
#[inline]
fn bitand_assign(&mut self, rhs: TCGBar) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct TCGBar(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TCGCPUOps {
#[doc = " mttcg_supported: multi-threaded TCG is supported\n\n Target (TCG frontend) supports:\n - atomic instructions\n - memory ordering primitives (barriers)"]
pub mttcg_supported: bool,
#[doc = " @precise_smc: Stores which modify code within the current TB force\n the TB to exit; the next executed instruction will see\n the result of the store."]
pub precise_smc: bool,
#[doc = " @guest_default_memory_order: default barrier that is required\n for the guest memory ordering."]
pub guest_default_memory_order: TCGBar,
#[doc = " @initialize: Initialize TCG state\n\n Called when the first CPU is realized."]
pub initialize: ::std::option::Option<unsafe extern "C" fn()>,
#[doc = " @translate_code: Translate guest instructions to TCGOps\n @cpu: cpu context\n @tb: translation block\n @max_insns: max number of instructions to translate\n @pc: guest virtual program counter address\n @host_pc: host physical program counter address\n\n This function must be provided by the target, which should create\n the target-specific DisasContext, and then invoke translator_loop."]
pub translate_code: ::std::option::Option<
unsafe extern "C" fn(
cpu: *mut CPUState,
tb: *mut TranslationBlock,
max_insns: *mut ::std::os::raw::c_int,
pc: vaddr,
host_pc: *mut ::std::os::raw::c_void,
),
>,
#[doc = " @get_tb_cpu_state: Extract CPU state for a TCG #TranslationBlock\n\n Fill in all data required to select or compile a TranslationBlock."]
pub get_tb_cpu_state:
::std::option::Option<unsafe extern "C" fn(cs: *mut CPUState) -> TCGTBCPUState>,
#[doc = " @synchronize_from_tb: Synchronize state from a TCG #TranslationBlock\n\n This is called when we abandon execution of a TB before starting it,\n and must set all parts of the CPU state which the previous TB in the\n chain may not have updated.\n By default, when this is NULL, a call is made to @set_pc(tb->pc).\n\n If more state needs to be restored, the target must implement a\n function to restore all the state, and register it here."]
pub synchronize_from_tb: ::std::option::Option<
unsafe extern "C" fn(cpu: *mut CPUState, tb: *const TranslationBlock),
>,
#[doc = " @restore_state_to_opc: Synchronize state from INDEX_op_start_insn\n\n This is called when we unwind state in the middle of a TB,\n usually before raising an exception. Set all part of the CPU\n state which are tracked insn-by-insn in the target-specific\n arguments to start_insn, passed as @data."]
pub restore_state_to_opc: ::std::option::Option<
unsafe extern "C" fn(cpu: *mut CPUState, tb: *const TranslationBlock, data: *const u64),
>,
#[doc = " @cpu_exec_enter: Callback for cpu_exec preparation"]
pub cpu_exec_enter: ::std::option::Option<unsafe extern "C" fn(cpu: *mut CPUState)>,
#[doc = " @cpu_exec_exit: Callback for cpu_exec cleanup"]
pub cpu_exec_exit: ::std::option::Option<unsafe extern "C" fn(cpu: *mut CPUState)>,
#[doc = " @debug_excp_handler: Callback for handling debug exceptions"]
pub debug_excp_handler: ::std::option::Option<unsafe extern "C" fn(cpu: *mut CPUState)>,
#[doc = " @mmu_index: Callback for choosing softmmu mmu index"]
pub mmu_index: ::std::option::Option<
unsafe extern "C" fn(cpu: *mut CPUState, ifetch: bool) -> ::std::os::raw::c_int,
>,
#[doc = " @fake_user_interrupt: Callback for 'fake exception' handling.\n\n Simulate 'fake exception' which will be handled outside the\n cpu execution loop (hack for x86 user mode)."]
pub fake_user_interrupt: ::std::option::Option<unsafe extern "C" fn(cpu: *mut CPUState)>,
#[doc = " record_sigsegv:\n @cpu: cpu context\n @addr: faulting guest address\n @access_type: access was read/write/execute\n @maperr: true for invalid page, false for permission fault\n @ra: host pc for unwinding\n\n We are about to raise SIGSEGV with si_code set for @maperr,\n and si_addr set for @addr. Record anything further needed\n for the signal ucontext_t.\n\n If the emulated kernel does not provide anything to the signal\n handler with anything besides the user context registers, and\n the siginfo_t, then this hook need do nothing and may be omitted.\n Otherwise, record the data and return; the caller will raise\n the signal, unwind the cpu state, and return to the main loop.\n\n If it is simpler to re-use the sysemu tlb_fill code, @ra is provided\n so that a \"normal\" cpu exception can be raised. In this case,\n the signal must be raised by the architecture cpu_loop."]
pub record_sigsegv: ::std::option::Option<
unsafe extern "C" fn(
cpu: *mut CPUState,
addr: vaddr,
access_type: MMUAccessType,
maperr: bool,
ra: usize,
),
>,
#[doc = " record_sigbus:\n @cpu: cpu context\n @addr: misaligned guest address\n @access_type: access was read/write/execute\n @ra: host pc for unwinding\n\n We are about to raise SIGBUS with si_code BUS_ADRALN,\n and si_addr set for @addr. Record anything further needed\n for the signal ucontext_t.\n\n If the emulated kernel does not provide the signal handler with\n anything besides the user context registers, and the siginfo_t,\n then this hook need do nothing and may be omitted.\n Otherwise, record the data and return; the caller will raise\n the signal, unwind the cpu state, and return to the main loop.\n\n If it is simpler to re-use the sysemu do_unaligned_access code,\n @ra is provided so that a \"normal\" cpu exception can be raised.\n In this case, the signal must be raised by the architecture cpu_loop."]
pub record_sigbus: ::std::option::Option<
unsafe extern "C" fn(
cpu: *mut CPUState,
addr: vaddr,
access_type: MMUAccessType,
ra: usize,
),
>,
#[doc = " untagged_addr: Remove an ignored tag from an address\n @cpu: cpu context\n @addr: tagged guest address"]
pub untagged_addr:
::std::option::Option<unsafe extern "C" fn(cs: *mut CPUState, addr: vaddr) -> vaddr>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of TCGCPUOps"][::std::mem::size_of::<TCGCPUOps>() - 112usize];
["Alignment of TCGCPUOps"][::std::mem::align_of::<TCGCPUOps>() - 8usize];
["Offset of field: TCGCPUOps::mttcg_supported"]
[::std::mem::offset_of!(TCGCPUOps, mttcg_supported) - 0usize];
["Offset of field: TCGCPUOps::precise_smc"]
[::std::mem::offset_of!(TCGCPUOps, precise_smc) - 1usize];
["Offset of field: TCGCPUOps::guest_default_memory_order"]
[::std::mem::offset_of!(TCGCPUOps, guest_default_memory_order) - 4usize];
["Offset of field: TCGCPUOps::initialize"]
[::std::mem::offset_of!(TCGCPUOps, initialize) - 8usize];
["Offset of field: TCGCPUOps::translate_code"]
[::std::mem::offset_of!(TCGCPUOps, translate_code) - 16usize];
["Offset of field: TCGCPUOps::get_tb_cpu_state"]
[::std::mem::offset_of!(TCGCPUOps, get_tb_cpu_state) - 24usize];
["Offset of field: TCGCPUOps::synchronize_from_tb"]
[::std::mem::offset_of!(TCGCPUOps, synchronize_from_tb) - 32usize];
["Offset of field: TCGCPUOps::restore_state_to_opc"]
[::std::mem::offset_of!(TCGCPUOps, restore_state_to_opc) - 40usize];
["Offset of field: TCGCPUOps::cpu_exec_enter"]
[::std::mem::offset_of!(TCGCPUOps, cpu_exec_enter) - 48usize];
["Offset of field: TCGCPUOps::cpu_exec_exit"]
[::std::mem::offset_of!(TCGCPUOps, cpu_exec_exit) - 56usize];
["Offset of field: TCGCPUOps::debug_excp_handler"]
[::std::mem::offset_of!(TCGCPUOps, debug_excp_handler) - 64usize];
["Offset of field: TCGCPUOps::mmu_index"]
[::std::mem::offset_of!(TCGCPUOps, mmu_index) - 72usize];
["Offset of field: TCGCPUOps::fake_user_interrupt"]
[::std::mem::offset_of!(TCGCPUOps, fake_user_interrupt) - 80usize];
["Offset of field: TCGCPUOps::record_sigsegv"]
[::std::mem::offset_of!(TCGCPUOps, record_sigsegv) - 88usize];
["Offset of field: TCGCPUOps::record_sigbus"]
[::std::mem::offset_of!(TCGCPUOps, record_sigbus) - 96usize];
["Offset of field: TCGCPUOps::untagged_addr"]
[::std::mem::offset_of!(TCGCPUOps, untagged_addr) - 104usize];
};
impl Default for TCGCPUOps {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub static mut guest_base: usize;
}
pub type abi_ulong = target_ulong;
pub type abi_long = target_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RBNode {
pub rb_parent_color: usize,
pub rb_right: *mut RBNode,
pub rb_left: *mut RBNode,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of RBNode"][::std::mem::size_of::<RBNode>() - 24usize];
["Alignment of RBNode"][::std::mem::align_of::<RBNode>() - 8usize];
["Offset of field: RBNode::rb_parent_color"]
[::std::mem::offset_of!(RBNode, rb_parent_color) - 0usize];
["Offset of field: RBNode::rb_right"][::std::mem::offset_of!(RBNode, rb_right) - 8usize];
["Offset of field: RBNode::rb_left"][::std::mem::offset_of!(RBNode, rb_left) - 16usize];
};
impl Default for RBNode {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RBRoot {
pub rb_node: *mut RBNode,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of RBRoot"][::std::mem::size_of::<RBRoot>() - 8usize];
["Alignment of RBRoot"][::std::mem::align_of::<RBRoot>() - 8usize];
["Offset of field: RBRoot::rb_node"][::std::mem::offset_of!(RBRoot, rb_node) - 0usize];
};
impl Default for RBRoot {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RBRootLeftCached {
pub rb_root: RBRoot,
pub rb_leftmost: *mut RBNode,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of RBRootLeftCached"][::std::mem::size_of::<RBRootLeftCached>() - 16usize];
["Alignment of RBRootLeftCached"][::std::mem::align_of::<RBRootLeftCached>() - 8usize];
["Offset of field: RBRootLeftCached::rb_root"]
[::std::mem::offset_of!(RBRootLeftCached, rb_root) - 0usize];
["Offset of field: RBRootLeftCached::rb_leftmost"]
[::std::mem::offset_of!(RBRootLeftCached, rb_leftmost) - 8usize];
};
impl Default for RBRootLeftCached {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IntervalTreeNode {
pub rb: RBNode,
pub start: u64,
pub last: u64,
pub subtree_last: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IntervalTreeNode"][::std::mem::size_of::<IntervalTreeNode>() - 48usize];
["Alignment of IntervalTreeNode"][::std::mem::align_of::<IntervalTreeNode>() - 8usize];
["Offset of field: IntervalTreeNode::rb"]
[::std::mem::offset_of!(IntervalTreeNode, rb) - 0usize];
["Offset of field: IntervalTreeNode::start"]
[::std::mem::offset_of!(IntervalTreeNode, start) - 24usize];
["Offset of field: IntervalTreeNode::last"]
[::std::mem::offset_of!(IntervalTreeNode, last) - 32usize];
["Offset of field: IntervalTreeNode::subtree_last"]
[::std::mem::offset_of!(IntervalTreeNode, subtree_last) - 40usize];
};
impl Default for IntervalTreeNode {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type IntervalTreeRoot = RBRootLeftCached;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tb_tc {
pub ptr: *const ::std::os::raw::c_void,
pub size: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of tb_tc"][::std::mem::size_of::<tb_tc>() - 16usize];
["Alignment of tb_tc"][::std::mem::align_of::<tb_tc>() - 8usize];
["Offset of field: tb_tc::ptr"][::std::mem::offset_of!(tb_tc, ptr) - 0usize];
["Offset of field: tb_tc::size"][::std::mem::offset_of!(tb_tc, size) - 8usize];
};
impl Default for tb_tc {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TranslationBlock {
pub pc: vaddr,
pub cs_base: u64,
pub flags: u32,
pub cflags: u32,
pub size: u16,
pub icount: u16,
pub tc: tb_tc,
pub itree: IntervalTreeNode,
pub jmp_lock: QemuSpin,
pub jmp_reset_offset: [u16; 2usize],
pub jmp_insn_offset: [u16; 2usize],
pub jmp_target_addr: [usize; 2usize],
pub jmp_list_head: usize,
pub jmp_list_next: [usize; 2usize],
pub jmp_dest: [usize; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of TranslationBlock"][::std::mem::size_of::<TranslationBlock>() - 168usize];
["Alignment of TranslationBlock"][::std::mem::align_of::<TranslationBlock>() - 8usize];
["Offset of field: TranslationBlock::pc"]
[::std::mem::offset_of!(TranslationBlock, pc) - 0usize];
["Offset of field: TranslationBlock::cs_base"]
[::std::mem::offset_of!(TranslationBlock, cs_base) - 8usize];
["Offset of field: TranslationBlock::flags"]
[::std::mem::offset_of!(TranslationBlock, flags) - 16usize];
["Offset of field: TranslationBlock::cflags"]
[::std::mem::offset_of!(TranslationBlock, cflags) - 20usize];
["Offset of field: TranslationBlock::size"]
[::std::mem::offset_of!(TranslationBlock, size) - 24usize];
["Offset of field: TranslationBlock::icount"]
[::std::mem::offset_of!(TranslationBlock, icount) - 26usize];
["Offset of field: TranslationBlock::tc"]
[::std::mem::offset_of!(TranslationBlock, tc) - 32usize];
["Offset of field: TranslationBlock::itree"]
[::std::mem::offset_of!(TranslationBlock, itree) - 48usize];
["Offset of field: TranslationBlock::jmp_lock"]
[::std::mem::offset_of!(TranslationBlock, jmp_lock) - 96usize];
["Offset of field: TranslationBlock::jmp_reset_offset"]
[::std::mem::offset_of!(TranslationBlock, jmp_reset_offset) - 100usize];
["Offset of field: TranslationBlock::jmp_insn_offset"]
[::std::mem::offset_of!(TranslationBlock, jmp_insn_offset) - 104usize];
["Offset of field: TranslationBlock::jmp_target_addr"]
[::std::mem::offset_of!(TranslationBlock, jmp_target_addr) - 112usize];
["Offset of field: TranslationBlock::jmp_list_head"]
[::std::mem::offset_of!(TranslationBlock, jmp_list_head) - 128usize];
["Offset of field: TranslationBlock::jmp_list_next"]
[::std::mem::offset_of!(TranslationBlock, jmp_list_next) - 136usize];
["Offset of field: TranslationBlock::jmp_dest"]
[::std::mem::offset_of!(TranslationBlock, jmp_dest) - 152usize];
};
impl Default for TranslationBlock {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
#[doc = " page_check_range\n @start: first byte of range\n @len: length of range\n @flags: flags required for each page\n\n Return true if every page in [@start, @start+@len) has @flags set.\n Return false if any page is unmapped. Thus testing flags == 0 is\n equivalent to testing for flags == PAGE_VALID."]
pub fn page_check_range(start: vaddr, last: vaddr, flags: ::std::os::raw::c_int) -> bool;
}
unsafe extern "C" {
#[doc = " --- Begin LibAFL code ---"]
pub fn pageflags_get_root() -> *mut IntervalTreeRoot;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct image_info {
pub load_bias: abi_ulong,
pub load_addr: abi_ulong,
pub start_code: abi_ulong,
pub end_code: abi_ulong,
pub start_data: abi_ulong,
pub end_data: abi_ulong,
pub brk: abi_ulong,
pub start_stack: abi_ulong,
pub stack_limit: abi_ulong,
pub vdso: abi_ulong,
pub entry: abi_ulong,
pub code_offset: abi_ulong,
pub data_offset: abi_ulong,
pub saved_auxv: abi_ulong,
pub auxv_len: abi_ulong,
pub argc: abi_ulong,
pub argv: abi_ulong,
pub envc: abi_ulong,
pub envp: abi_ulong,
pub file_string: abi_ulong,
pub elf_flags: u32,
pub personality: ::std::os::raw::c_int,
pub exec_stack: bool,
pub arg_strings: abi_ulong,
pub env_strings: abi_ulong,
pub loadmap_addr: abi_ulong,
pub nsegs: u16,
pub loadsegs: *mut ::std::os::raw::c_void,
pub pt_dynamic_addr: abi_ulong,
pub interpreter_loadmap_addr: abi_ulong,
pub interpreter_pt_dynamic_addr: abi_ulong,
pub other_info: *mut image_info,
pub note_flags: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of image_info"][::std::mem::size_of::<image_info>() - 256usize];
["Alignment of image_info"][::std::mem::align_of::<image_info>() - 8usize];
["Offset of field: image_info::load_bias"]
[::std::mem::offset_of!(image_info, load_bias) - 0usize];
["Offset of field: image_info::load_addr"]
[::std::mem::offset_of!(image_info, load_addr) - 8usize];
["Offset of field: image_info::start_code"]
[::std::mem::offset_of!(image_info, start_code) - 16usize];
["Offset of field: image_info::end_code"]
[::std::mem::offset_of!(image_info, end_code) - 24usize];
["Offset of field: image_info::start_data"]
[::std::mem::offset_of!(image_info, start_data) - 32usize];
["Offset of field: image_info::end_data"]
[::std::mem::offset_of!(image_info, end_data) - 40usize];
["Offset of field: image_info::brk"][::std::mem::offset_of!(image_info, brk) - 48usize];
["Offset of field: image_info::start_stack"]
[::std::mem::offset_of!(image_info, start_stack) - 56usize];
["Offset of field: image_info::stack_limit"]
[::std::mem::offset_of!(image_info, stack_limit) - 64usize];
["Offset of field: image_info::vdso"][::std::mem::offset_of!(image_info, vdso) - 72usize];
["Offset of field: image_info::entry"][::std::mem::offset_of!(image_info, entry) - 80usize];
["Offset of field: image_info::code_offset"]
[::std::mem::offset_of!(image_info, code_offset) - 88usize];
["Offset of field: image_info::data_offset"]
[::std::mem::offset_of!(image_info, data_offset) - 96usize];
["Offset of field: image_info::saved_auxv"]
[::std::mem::offset_of!(image_info, saved_auxv) - 104usize];
["Offset of field: image_info::auxv_len"]
[::std::mem::offset_of!(image_info, auxv_len) - 112usize];
["Offset of field: image_info::argc"][::std::mem::offset_of!(image_info, argc) - 120usize];
["Offset of field: image_info::argv"][::std::mem::offset_of!(image_info, argv) - 128usize];
["Offset of field: image_info::envc"][::std::mem::offset_of!(image_info, envc) - 136usize];
["Offset of field: image_info::envp"][::std::mem::offset_of!(image_info, envp) - 144usize];
["Offset of field: image_info::file_string"]
[::std::mem::offset_of!(image_info, file_string) - 152usize];
["Offset of field: image_info::elf_flags"]
[::std::mem::offset_of!(image_info, elf_flags) - 160usize];
["Offset of field: image_info::personality"]
[::std::mem::offset_of!(image_info, personality) - 164usize];
["Offset of field: image_info::exec_stack"]
[::std::mem::offset_of!(image_info, exec_stack) - 168usize];
["Offset of field: image_info::arg_strings"]
[::std::mem::offset_of!(image_info, arg_strings) - 176usize];
["Offset of field: image_info::env_strings"]
[::std::mem::offset_of!(image_info, env_strings) - 184usize];
["Offset of field: image_info::loadmap_addr"]
[::std::mem::offset_of!(image_info, loadmap_addr) - 192usize];
["Offset of field: image_info::nsegs"][::std::mem::offset_of!(image_info, nsegs) - 200usize];
["Offset of field: image_info::loadsegs"]
[::std::mem::offset_of!(image_info, loadsegs) - 208usize];
["Offset of field: image_info::pt_dynamic_addr"]
[::std::mem::offset_of!(image_info, pt_dynamic_addr) - 216usize];
["Offset of field: image_info::interpreter_loadmap_addr"]
[::std::mem::offset_of!(image_info, interpreter_loadmap_addr) - 224usize];
["Offset of field: image_info::interpreter_pt_dynamic_addr"]
[::std::mem::offset_of!(image_info, interpreter_pt_dynamic_addr) - 232usize];
["Offset of field: image_info::other_info"]
[::std::mem::offset_of!(image_info, other_info) - 240usize];
["Offset of field: image_info::note_flags"]
[::std::mem::offset_of!(image_info, note_flags) - 248usize];
};
impl Default for image_info {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub static mut exec_path: *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub static mut mmap_next_start: abi_ulong;
}
unsafe extern "C" {
pub fn target_mprotect(
start: abi_ulong,
len: abi_ulong,
prot: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn target_mmap(
start: abi_ulong,
len: abi_ulong,
prot: ::std::os::raw::c_int,
flags: ::std::os::raw::c_int,
fd: ::std::os::raw::c_int,
offset: off_t,
) -> abi_long;
}
unsafe extern "C" {
pub fn target_munmap(start: abi_ulong, len: abi_ulong) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
#[doc = " read_self_maps:\n\n Read /proc/self/maps and return a tree of MapInfo structures."]
pub fn read_self_maps() -> *mut IntervalTreeRoot;
}
unsafe extern "C" {
#[doc = " free_self_maps:\n @info: an interval tree\n\n Free a tree of MapInfo structures."]
pub fn free_self_maps(root: *mut IntervalTreeRoot);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_mapinfo {
pub start: u64,
pub end: u64,
pub offset: u64,
pub path: *const ::std::os::raw::c_char,
pub flags: ::std::os::raw::c_int,
pub is_priv: ::std::os::raw::c_int,
pub is_valid: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_mapinfo"][::std::mem::size_of::<libafl_mapinfo>() - 48usize];
["Alignment of libafl_mapinfo"][::std::mem::align_of::<libafl_mapinfo>() - 8usize];
["Offset of field: libafl_mapinfo::start"]
[::std::mem::offset_of!(libafl_mapinfo, start) - 0usize];
["Offset of field: libafl_mapinfo::end"][::std::mem::offset_of!(libafl_mapinfo, end) - 8usize];
["Offset of field: libafl_mapinfo::offset"]
[::std::mem::offset_of!(libafl_mapinfo, offset) - 16usize];
["Offset of field: libafl_mapinfo::path"]
[::std::mem::offset_of!(libafl_mapinfo, path) - 24usize];
["Offset of field: libafl_mapinfo::flags"]
[::std::mem::offset_of!(libafl_mapinfo, flags) - 32usize];
["Offset of field: libafl_mapinfo::is_priv"]
[::std::mem::offset_of!(libafl_mapinfo, is_priv) - 36usize];
["Offset of field: libafl_mapinfo::is_valid"]
[::std::mem::offset_of!(libafl_mapinfo, is_valid) - 40usize];
};
impl Default for libafl_mapinfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct libafl_qemu_sig_ctx {
pub in_qemu_sig_hdlr: bool,
pub is_target_signal: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_qemu_sig_ctx"][::std::mem::size_of::<libafl_qemu_sig_ctx>() - 2usize];
["Alignment of libafl_qemu_sig_ctx"][::std::mem::align_of::<libafl_qemu_sig_ctx>() - 1usize];
["Offset of field: libafl_qemu_sig_ctx::in_qemu_sig_hdlr"]
[::std::mem::offset_of!(libafl_qemu_sig_ctx, in_qemu_sig_hdlr) - 0usize];
["Offset of field: libafl_qemu_sig_ctx::is_target_signal"]
[::std::mem::offset_of!(libafl_qemu_sig_ctx, is_target_signal) - 1usize];
};
unsafe extern "C" {
pub static mut libafl_force_dfl: ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_native_signal_handler(
host_sig: ::std::os::raw::c_int,
info: *mut siginfo_t,
puc: *mut ::std::os::raw::c_void,
);
}
unsafe extern "C" {
pub fn libafl_qemu_signal_context() -> *mut libafl_qemu_sig_ctx;
}
unsafe extern "C" {
pub fn libafl_set_in_target_signal_ctx();
}
unsafe extern "C" {
pub fn libafl_set_in_host_signal_ctx();
}
unsafe extern "C" {
pub fn libafl_unset_in_signal_ctx();
}
unsafe extern "C" {
pub fn libafl_qemu_handle_crash(
host_sig: ::std::os::raw::c_int,
info: *mut siginfo_t,
puc: *mut ::std::os::raw::c_void,
);
}
unsafe extern "C" {
pub fn libafl_maps_first(map_info: *mut IntervalTreeRoot) -> *mut IntervalTreeNode;
}
unsafe extern "C" {
pub fn libafl_maps_next(
pageflags_maps_node: *mut IntervalTreeNode,
proc_maps_node: *mut IntervalTreeRoot,
ret: *mut libafl_mapinfo,
) -> *mut IntervalTreeNode;
}
unsafe extern "C" {
pub fn libafl_load_addr() -> u64;
}
unsafe extern "C" {
pub fn libafl_get_image_info() -> *mut image_info;
}
unsafe extern "C" {
pub fn libafl_get_initial_brk() -> u64;
}
unsafe extern "C" {
pub fn libafl_get_brk() -> u64;
}
unsafe extern "C" {
pub fn libafl_set_brk(new_brk: u64) -> u64;
}
unsafe extern "C" {
pub fn libafl_get_return_on_crash() -> bool;
}
unsafe extern "C" {
pub fn libafl_set_return_on_crash(return_on_crash: bool);
}
unsafe extern "C" {
pub fn libafl_qemu_init(argc: ::std::os::raw::c_int, argv: *mut *mut ::std::os::raw::c_char);
}
pub const qemu_plugin_mem_rw_QEMU_PLUGIN_MEM_R: qemu_plugin_mem_rw = qemu_plugin_mem_rw(1);
pub const qemu_plugin_mem_rw_QEMU_PLUGIN_MEM_W: qemu_plugin_mem_rw = qemu_plugin_mem_rw(2);
pub const qemu_plugin_mem_rw_QEMU_PLUGIN_MEM_RW: qemu_plugin_mem_rw = qemu_plugin_mem_rw(3);
impl ::std::ops::BitOr<qemu_plugin_mem_rw> for qemu_plugin_mem_rw {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
qemu_plugin_mem_rw(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for qemu_plugin_mem_rw {
#[inline]
fn bitor_assign(&mut self, rhs: qemu_plugin_mem_rw) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<qemu_plugin_mem_rw> for qemu_plugin_mem_rw {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
qemu_plugin_mem_rw(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for qemu_plugin_mem_rw {
#[inline]
fn bitand_assign(&mut self, rhs: qemu_plugin_mem_rw) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct qemu_plugin_mem_rw(pub ::std::os::raw::c_uint);
#[doc = " typedef qemu_plugin_meminfo_t - opaque memory transaction handle\n\n This can be further queried using the qemu_plugin_mem_* query\n functions."]
pub type qemu_plugin_meminfo_t = u32;
unsafe extern "C" {
#[doc = " qemu_plugin_get_hwaddr() - return handle for memory operation\n @info: opaque memory info structure\n @vaddr: the virtual address of the memory operation\n\n For system emulation returns a qemu_plugin_hwaddr handle to query\n details about the actual physical address backing the virtual\n address. For linux-user guests it just returns NULL.\n\n This handle is *only* valid for the duration of the callback. Any\n information about the handle should be recovered before the\n callback returns."]
pub fn qemu_plugin_get_hwaddr(
info: qemu_plugin_meminfo_t,
vaddr: u64,
) -> *mut qemu_plugin_hwaddr;
}
unsafe extern "C" {
#[doc = " qemu_plugin_hwaddr_phys_addr() - query physical address for memory operation\n @haddr: address handle from qemu_plugin_get_hwaddr()\n\n Returns the physical address associated with the memory operation\n\n Note that the returned physical address may not be unique if you are dealing\n with multiple address spaces."]
pub fn qemu_plugin_hwaddr_phys_addr(haddr: *const qemu_plugin_hwaddr) -> u64;
}
#[doc = " struct CPUPluginState - per-CPU state for plugins\n @event_mask: plugin event bitmap. Modified only via async work."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CPUPluginState {
pub event_mask: [::std::os::raw::c_ulong; 1usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of CPUPluginState"][::std::mem::size_of::<CPUPluginState>() - 8usize];
["Alignment of CPUPluginState"][::std::mem::align_of::<CPUPluginState>() - 8usize];
["Offset of field: CPUPluginState::event_mask"]
[::std::mem::offset_of!(CPUPluginState, event_mask) - 0usize];
};
pub const TCGReg_TCG_REG_EAX: TCGReg = TCGReg(0);
pub const TCGReg_TCG_REG_ECX: TCGReg = TCGReg(1);
pub const TCGReg_TCG_REG_EDX: TCGReg = TCGReg(2);
pub const TCGReg_TCG_REG_EBX: TCGReg = TCGReg(3);
pub const TCGReg_TCG_REG_ESP: TCGReg = TCGReg(4);
pub const TCGReg_TCG_REG_EBP: TCGReg = TCGReg(5);
pub const TCGReg_TCG_REG_ESI: TCGReg = TCGReg(6);
pub const TCGReg_TCG_REG_EDI: TCGReg = TCGReg(7);
pub const TCGReg_TCG_REG_R8: TCGReg = TCGReg(8);
pub const TCGReg_TCG_REG_R9: TCGReg = TCGReg(9);
pub const TCGReg_TCG_REG_R10: TCGReg = TCGReg(10);
pub const TCGReg_TCG_REG_R11: TCGReg = TCGReg(11);
pub const TCGReg_TCG_REG_R12: TCGReg = TCGReg(12);
pub const TCGReg_TCG_REG_R13: TCGReg = TCGReg(13);
pub const TCGReg_TCG_REG_R14: TCGReg = TCGReg(14);
pub const TCGReg_TCG_REG_R15: TCGReg = TCGReg(15);
pub const TCGReg_TCG_REG_XMM0: TCGReg = TCGReg(16);
pub const TCGReg_TCG_REG_XMM1: TCGReg = TCGReg(17);
pub const TCGReg_TCG_REG_XMM2: TCGReg = TCGReg(18);
pub const TCGReg_TCG_REG_XMM3: TCGReg = TCGReg(19);
pub const TCGReg_TCG_REG_XMM4: TCGReg = TCGReg(20);
pub const TCGReg_TCG_REG_XMM5: TCGReg = TCGReg(21);
pub const TCGReg_TCG_REG_XMM6: TCGReg = TCGReg(22);
pub const TCGReg_TCG_REG_XMM7: TCGReg = TCGReg(23);
pub const TCGReg_TCG_REG_XMM8: TCGReg = TCGReg(24);
pub const TCGReg_TCG_REG_XMM9: TCGReg = TCGReg(25);
pub const TCGReg_TCG_REG_XMM10: TCGReg = TCGReg(26);
pub const TCGReg_TCG_REG_XMM11: TCGReg = TCGReg(27);
pub const TCGReg_TCG_REG_XMM12: TCGReg = TCGReg(28);
pub const TCGReg_TCG_REG_XMM13: TCGReg = TCGReg(29);
pub const TCGReg_TCG_REG_XMM14: TCGReg = TCGReg(30);
pub const TCGReg_TCG_REG_XMM15: TCGReg = TCGReg(31);
pub const TCGReg_TCG_REG_RAX: TCGReg = TCGReg(0);
pub const TCGReg_TCG_REG_RCX: TCGReg = TCGReg(1);
pub const TCGReg_TCG_REG_RDX: TCGReg = TCGReg(2);
pub const TCGReg_TCG_REG_RBX: TCGReg = TCGReg(3);
pub const TCGReg_TCG_REG_RSP: TCGReg = TCGReg(4);
pub const TCGReg_TCG_REG_RBP: TCGReg = TCGReg(5);
pub const TCGReg_TCG_REG_RSI: TCGReg = TCGReg(6);
pub const TCGReg_TCG_REG_RDI: TCGReg = TCGReg(7);
pub const TCGReg_TCG_AREG0: TCGReg = TCGReg(5);
pub const TCGReg_TCG_REG_CALL_STACK: TCGReg = TCGReg(4);
impl ::std::ops::BitOr<TCGReg> for TCGReg {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
TCGReg(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for TCGReg {
#[inline]
fn bitor_assign(&mut self, rhs: TCGReg) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<TCGReg> for TCGReg {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
TCGReg(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for TCGReg {
#[inline]
fn bitand_assign(&mut self, rhs: TCGReg) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct TCGReg(pub ::std::os::raw::c_uint);
pub const TCGType_TCG_TYPE_I32: TCGType = TCGType(0);
pub const TCGType_TCG_TYPE_I64: TCGType = TCGType(1);
pub const TCGType_TCG_TYPE_I128: TCGType = TCGType(2);
pub const TCGType_TCG_TYPE_V64: TCGType = TCGType(3);
pub const TCGType_TCG_TYPE_V128: TCGType = TCGType(4);
pub const TCGType_TCG_TYPE_V256: TCGType = TCGType(5);
pub const TCGType_TCG_TYPE_REG: TCGType = TCGType(1);
pub const TCGType_TCG_TYPE_PTR: TCGType = TCGType(1);
impl ::std::ops::BitOr<TCGType> for TCGType {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
TCGType(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for TCGType {
#[inline]
fn bitor_assign(&mut self, rhs: TCGType) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<TCGType> for TCGType {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
TCGType(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for TCGType {
#[inline]
fn bitand_assign(&mut self, rhs: TCGType) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct TCGType(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TCGv_i64_d {
_unused: [u8; 0],
}
pub type TCGv_i64 = *mut TCGv_i64_d;
pub const TCGTempVal_TEMP_VAL_DEAD: TCGTempVal = TCGTempVal(0);
pub const TCGTempVal_TEMP_VAL_REG: TCGTempVal = TCGTempVal(1);
pub const TCGTempVal_TEMP_VAL_MEM: TCGTempVal = TCGTempVal(2);
pub const TCGTempVal_TEMP_VAL_CONST: TCGTempVal = TCGTempVal(3);
impl ::std::ops::BitOr<TCGTempVal> for TCGTempVal {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
TCGTempVal(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for TCGTempVal {
#[inline]
fn bitor_assign(&mut self, rhs: TCGTempVal) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<TCGTempVal> for TCGTempVal {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
TCGTempVal(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for TCGTempVal {
#[inline]
fn bitand_assign(&mut self, rhs: TCGTempVal) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct TCGTempVal(pub ::std::os::raw::c_uint);
pub const TCGTempKind_TEMP_EBB: TCGTempKind = TCGTempKind(0);
pub const TCGTempKind_TEMP_TB: TCGTempKind = TCGTempKind(1);
pub const TCGTempKind_TEMP_GLOBAL: TCGTempKind = TCGTempKind(2);
pub const TCGTempKind_TEMP_FIXED: TCGTempKind = TCGTempKind(3);
pub const TCGTempKind_TEMP_CONST: TCGTempKind = TCGTempKind(4);
impl ::std::ops::BitOr<TCGTempKind> for TCGTempKind {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
TCGTempKind(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for TCGTempKind {
#[inline]
fn bitor_assign(&mut self, rhs: TCGTempKind) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<TCGTempKind> for TCGTempKind {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
TCGTempKind(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for TCGTempKind {
#[inline]
fn bitand_assign(&mut self, rhs: TCGTempKind) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct TCGTempKind(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TCGTemp {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 6usize]>,
pub val: i64,
pub mem_base: *mut TCGTemp,
pub mem_offset: isize,
pub name: *const ::std::os::raw::c_char,
pub state: usize,
pub state_ptr: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of TCGTemp"][::std::mem::size_of::<TCGTemp>() - 56usize];
["Alignment of TCGTemp"][::std::mem::align_of::<TCGTemp>() - 8usize];
["Offset of field: TCGTemp::val"][::std::mem::offset_of!(TCGTemp, val) - 8usize];
["Offset of field: TCGTemp::mem_base"][::std::mem::offset_of!(TCGTemp, mem_base) - 16usize];
["Offset of field: TCGTemp::mem_offset"][::std::mem::offset_of!(TCGTemp, mem_offset) - 24usize];
["Offset of field: TCGTemp::name"][::std::mem::offset_of!(TCGTemp, name) - 32usize];
["Offset of field: TCGTemp::state"][::std::mem::offset_of!(TCGTemp, state) - 40usize];
["Offset of field: TCGTemp::state_ptr"][::std::mem::offset_of!(TCGTemp, state_ptr) - 48usize];
};
impl Default for TCGTemp {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl TCGTemp {
#[inline]
pub fn reg(&self) -> TCGReg {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
}
#[inline]
pub fn set_reg(&mut self, val: TCGReg) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn reg_raw(this: *const Self) -> TCGReg {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
0usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_reg_raw(this: *mut Self, val: TCGReg) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
0usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn val_type(&self) -> TCGTempVal {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) }
}
#[inline]
pub fn set_val_type(&mut self, val: TCGTempVal) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn val_type_raw(this: *const Self) -> TCGTempVal {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
8usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_val_type_raw(this: *mut Self, val: TCGTempVal) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
8usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn base_type(&self) -> TCGType {
unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) }
}
#[inline]
pub fn set_base_type(&mut self, val: TCGType) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(16usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn base_type_raw(this: *const Self) -> TCGType {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
16usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_base_type_raw(this: *mut Self, val: TCGType) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
16usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn type_(&self) -> TCGType {
unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) }
}
#[inline]
pub fn set_type(&mut self, val: TCGType) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(24usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn type__raw(this: *const Self) -> TCGType {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
24usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_type_raw(this: *mut Self, val: TCGType) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
24usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn kind(&self) -> TCGTempKind {
unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 3u8) as u32) }
}
#[inline]
pub fn set_kind(&mut self, val: TCGTempKind) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(32usize, 3u8, val as u64)
}
}
#[inline]
pub unsafe fn kind_raw(this: *const Self) -> TCGTempKind {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
32usize,
3u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_kind_raw(this: *mut Self, val: TCGTempKind) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
32usize,
3u8,
val as u64,
)
}
}
#[inline]
pub fn indirect_reg(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u32) }
}
#[inline]
pub fn set_indirect_reg(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(35usize, 1u8, val as u64)
}
}
#[inline]
pub unsafe fn indirect_reg_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
35usize,
1u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_indirect_reg_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
35usize,
1u8,
val as u64,
)
}
}
#[inline]
pub fn indirect_base(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u32) }
}
#[inline]
pub fn set_indirect_base(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(36usize, 1u8, val as u64)
}
}
#[inline]
pub unsafe fn indirect_base_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
36usize,
1u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_indirect_base_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
36usize,
1u8,
val as u64,
)
}
}
#[inline]
pub fn mem_coherent(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u32) }
}
#[inline]
pub fn set_mem_coherent(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(37usize, 1u8, val as u64)
}
}
#[inline]
pub unsafe fn mem_coherent_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
37usize,
1u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_mem_coherent_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
37usize,
1u8,
val as u64,
)
}
}
#[inline]
pub fn mem_allocated(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 1u8) as u32) }
}
#[inline]
pub fn set_mem_allocated(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(38usize, 1u8, val as u64)
}
}
#[inline]
pub unsafe fn mem_allocated_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
38usize,
1u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_mem_allocated_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
38usize,
1u8,
val as u64,
)
}
}
#[inline]
pub fn temp_allocated(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(39usize, 1u8) as u32) }
}
#[inline]
pub fn set_temp_allocated(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(39usize, 1u8, val as u64)
}
}
#[inline]
pub unsafe fn temp_allocated_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
39usize,
1u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_temp_allocated_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
39usize,
1u8,
val as u64,
)
}
}
#[inline]
pub fn temp_subindex(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 2u8) as u32) }
}
#[inline]
pub fn set_temp_subindex(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(40usize, 2u8, val as u64)
}
}
#[inline]
pub unsafe fn temp_subindex_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
40usize,
2u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_temp_subindex_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
40usize,
2u8,
val as u64,
)
}
}
#[inline]
pub fn new_bitfield_1(
reg: TCGReg,
val_type: TCGTempVal,
base_type: TCGType,
type_: TCGType,
kind: TCGTempKind,
indirect_reg: ::std::os::raw::c_uint,
indirect_base: ::std::os::raw::c_uint,
mem_coherent: ::std::os::raw::c_uint,
mem_allocated: ::std::os::raw::c_uint,
temp_allocated: ::std::os::raw::c_uint,
temp_subindex: ::std::os::raw::c_uint,
) -> __BindgenBitfieldUnit<[u8; 6usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 6usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let reg: u32 = unsafe { ::std::mem::transmute(reg) };
reg as u64
});
__bindgen_bitfield_unit.set(8usize, 8u8, {
let val_type: u32 = unsafe { ::std::mem::transmute(val_type) };
val_type as u64
});
__bindgen_bitfield_unit.set(16usize, 8u8, {
let base_type: u32 = unsafe { ::std::mem::transmute(base_type) };
base_type as u64
});
__bindgen_bitfield_unit.set(24usize, 8u8, {
let type_: u32 = unsafe { ::std::mem::transmute(type_) };
type_ as u64
});
__bindgen_bitfield_unit.set(32usize, 3u8, {
let kind: u32 = unsafe { ::std::mem::transmute(kind) };
kind as u64
});
__bindgen_bitfield_unit.set(35usize, 1u8, {
let indirect_reg: u32 = unsafe { ::std::mem::transmute(indirect_reg) };
indirect_reg as u64
});
__bindgen_bitfield_unit.set(36usize, 1u8, {
let indirect_base: u32 = unsafe { ::std::mem::transmute(indirect_base) };
indirect_base as u64
});
__bindgen_bitfield_unit.set(37usize, 1u8, {
let mem_coherent: u32 = unsafe { ::std::mem::transmute(mem_coherent) };
mem_coherent as u64
});
__bindgen_bitfield_unit.set(38usize, 1u8, {
let mem_allocated: u32 = unsafe { ::std::mem::transmute(mem_allocated) };
mem_allocated as u64
});
__bindgen_bitfield_unit.set(39usize, 1u8, {
let temp_allocated: u32 = unsafe { ::std::mem::transmute(temp_allocated) };
temp_allocated as u64
});
__bindgen_bitfield_unit.set(40usize, 2u8, {
let temp_subindex: u32 = unsafe { ::std::mem::transmute(temp_subindex) };
temp_subindex as u64
});
__bindgen_bitfield_unit
}
}
pub const TCGCallReturnKind_TCG_CALL_RET_NORMAL: TCGCallReturnKind = TCGCallReturnKind(0);
pub const TCGCallReturnKind_TCG_CALL_RET_BY_REF: TCGCallReturnKind = TCGCallReturnKind(1);
pub const TCGCallReturnKind_TCG_CALL_RET_BY_VEC: TCGCallReturnKind = TCGCallReturnKind(2);
impl ::std::ops::BitOr<TCGCallReturnKind> for TCGCallReturnKind {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
TCGCallReturnKind(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for TCGCallReturnKind {
#[inline]
fn bitor_assign(&mut self, rhs: TCGCallReturnKind) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<TCGCallReturnKind> for TCGCallReturnKind {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
TCGCallReturnKind(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for TCGCallReturnKind {
#[inline]
fn bitand_assign(&mut self, rhs: TCGCallReturnKind) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct TCGCallReturnKind(pub ::std::os::raw::c_uint);
pub const TCGCallArgumentKind_TCG_CALL_ARG_NORMAL: TCGCallArgumentKind = TCGCallArgumentKind(0);
pub const TCGCallArgumentKind_TCG_CALL_ARG_EVEN: TCGCallArgumentKind = TCGCallArgumentKind(1);
pub const TCGCallArgumentKind_TCG_CALL_ARG_EXTEND: TCGCallArgumentKind = TCGCallArgumentKind(2);
pub const TCGCallArgumentKind_TCG_CALL_ARG_EXTEND_U: TCGCallArgumentKind = TCGCallArgumentKind(3);
pub const TCGCallArgumentKind_TCG_CALL_ARG_EXTEND_S: TCGCallArgumentKind = TCGCallArgumentKind(4);
pub const TCGCallArgumentKind_TCG_CALL_ARG_BY_REF: TCGCallArgumentKind = TCGCallArgumentKind(5);
pub const TCGCallArgumentKind_TCG_CALL_ARG_BY_REF_N: TCGCallArgumentKind = TCGCallArgumentKind(6);
impl ::std::ops::BitOr<TCGCallArgumentKind> for TCGCallArgumentKind {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
TCGCallArgumentKind(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for TCGCallArgumentKind {
#[inline]
fn bitor_assign(&mut self, rhs: TCGCallArgumentKind) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<TCGCallArgumentKind> for TCGCallArgumentKind {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
TCGCallArgumentKind(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for TCGCallArgumentKind {
#[inline]
fn bitand_assign(&mut self, rhs: TCGCallArgumentKind) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct TCGCallArgumentKind(pub ::std::os::raw::c_uint);
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct TCGCallArgumentLoc {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of TCGCallArgumentLoc"][::std::mem::size_of::<TCGCallArgumentLoc>() - 4usize];
["Alignment of TCGCallArgumentLoc"][::std::mem::align_of::<TCGCallArgumentLoc>() - 4usize];
};
impl Default for TCGCallArgumentLoc {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl TCGCallArgumentLoc {
#[inline]
pub fn kind(&self) -> TCGCallArgumentKind {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
}
#[inline]
pub fn set_kind(&mut self, val: TCGCallArgumentKind) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn kind_raw(this: *const Self) -> TCGCallArgumentKind {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
0usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_kind_raw(this: *mut Self, val: TCGCallArgumentKind) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
0usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn arg_slot(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) }
}
#[inline]
pub fn set_arg_slot(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn arg_slot_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
8usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_arg_slot_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
8usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn ref_slot(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) }
}
#[inline]
pub fn set_ref_slot(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(16usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn ref_slot_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
16usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_ref_slot_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
16usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn arg_idx(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 4u8) as u32) }
}
#[inline]
pub fn set_arg_idx(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(24usize, 4u8, val as u64)
}
}
#[inline]
pub unsafe fn arg_idx_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
24usize,
4u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_arg_idx_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
24usize,
4u8,
val as u64,
)
}
}
#[inline]
pub fn tmp_subindex(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 2u8) as u32) }
}
#[inline]
pub fn set_tmp_subindex(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(28usize, 2u8, val as u64)
}
}
#[inline]
pub unsafe fn tmp_subindex_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
28usize,
2u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_tmp_subindex_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
28usize,
2u8,
val as u64,
)
}
}
#[inline]
pub fn new_bitfield_1(
kind: TCGCallArgumentKind,
arg_slot: ::std::os::raw::c_uint,
ref_slot: ::std::os::raw::c_uint,
arg_idx: ::std::os::raw::c_uint,
tmp_subindex: ::std::os::raw::c_uint,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let kind: u32 = unsafe { ::std::mem::transmute(kind) };
kind as u64
});
__bindgen_bitfield_unit.set(8usize, 8u8, {
let arg_slot: u32 = unsafe { ::std::mem::transmute(arg_slot) };
arg_slot as u64
});
__bindgen_bitfield_unit.set(16usize, 8u8, {
let ref_slot: u32 = unsafe { ::std::mem::transmute(ref_slot) };
ref_slot as u64
});
__bindgen_bitfield_unit.set(24usize, 4u8, {
let arg_idx: u32 = unsafe { ::std::mem::transmute(arg_idx) };
arg_idx as u64
});
__bindgen_bitfield_unit.set(28usize, 2u8, {
let tmp_subindex: u32 = unsafe { ::std::mem::transmute(tmp_subindex) };
tmp_subindex as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TCGHelperInfo {
pub func: *mut ::std::os::raw::c_void,
pub name: *const ::std::os::raw::c_char,
pub init: usize,
pub _bitfield_align_1: [u32; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
pub in_: [TCGCallArgumentLoc; 14usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of TCGHelperInfo"][::std::mem::size_of::<TCGHelperInfo>() - 88usize];
["Alignment of TCGHelperInfo"][::std::mem::align_of::<TCGHelperInfo>() - 8usize];
["Offset of field: TCGHelperInfo::func"][::std::mem::offset_of!(TCGHelperInfo, func) - 0usize];
["Offset of field: TCGHelperInfo::name"][::std::mem::offset_of!(TCGHelperInfo, name) - 8usize];
["Offset of field: TCGHelperInfo::init"][::std::mem::offset_of!(TCGHelperInfo, init) - 16usize];
["Offset of field: TCGHelperInfo::in_"][::std::mem::offset_of!(TCGHelperInfo, in_) - 32usize];
};
impl Default for TCGHelperInfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl TCGHelperInfo {
#[inline]
pub fn typemask(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 32u8) as u32) }
}
#[inline]
pub fn set_typemask(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 32u8, val as u64)
}
}
#[inline]
pub unsafe fn typemask_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
0usize,
32u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_typemask_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
0usize,
32u8,
val as u64,
)
}
}
#[inline]
pub fn flags(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) }
}
#[inline]
pub fn set_flags(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(32usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn flags_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
32usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_flags_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
32usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn nr_in(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u32) }
}
#[inline]
pub fn set_nr_in(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(40usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn nr_in_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
40usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_nr_in_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
40usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn nr_out(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 8u8) as u32) }
}
#[inline]
pub fn set_nr_out(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(48usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn nr_out_raw(this: *const Self) -> ::std::os::raw::c_uint {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
48usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_nr_out_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
48usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn out_kind(&self) -> TCGCallReturnKind {
unsafe { ::std::mem::transmute(self._bitfield_1.get(56usize, 8u8) as u32) }
}
#[inline]
pub fn set_out_kind(&mut self, val: TCGCallReturnKind) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(56usize, 8u8, val as u64)
}
}
#[inline]
pub unsafe fn out_kind_raw(this: *const Self) -> TCGCallReturnKind {
unsafe {
::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(
::std::ptr::addr_of!((*this)._bitfield_1),
56usize,
8u8,
) as u32)
}
}
#[inline]
pub unsafe fn set_out_kind_raw(this: *mut Self, val: TCGCallReturnKind) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(
::std::ptr::addr_of_mut!((*this)._bitfield_1),
56usize,
8u8,
val as u64,
)
}
}
#[inline]
pub fn new_bitfield_1(
typemask: ::std::os::raw::c_uint,
flags: ::std::os::raw::c_uint,
nr_in: ::std::os::raw::c_uint,
nr_out: ::std::os::raw::c_uint,
out_kind: TCGCallReturnKind,
) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 32u8, {
let typemask: u32 = unsafe { ::std::mem::transmute(typemask) };
typemask as u64
});
__bindgen_bitfield_unit.set(32usize, 8u8, {
let flags: u32 = unsafe { ::std::mem::transmute(flags) };
flags as u64
});
__bindgen_bitfield_unit.set(40usize, 8u8, {
let nr_in: u32 = unsafe { ::std::mem::transmute(nr_in) };
nr_in as u64
});
__bindgen_bitfield_unit.set(48usize, 8u8, {
let nr_out: u32 = unsafe { ::std::mem::transmute(nr_out) };
nr_out as u64
});
__bindgen_bitfield_unit.set(56usize, 8u8, {
let out_kind: u32 = unsafe { ::std::mem::transmute(out_kind) };
out_kind as u64
});
__bindgen_bitfield_unit
}
}
pub type TCGv = TCGv_i64;
#[doc = " struct qemu_plugin_hwaddr - opaque hw address handle"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct qemu_plugin_hwaddr {
pub is_io: bool,
pub is_store: bool,
pub phys_addr: hwaddr,
pub mr: *mut MemoryRegion,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of qemu_plugin_hwaddr"][::std::mem::size_of::<qemu_plugin_hwaddr>() - 24usize];
["Alignment of qemu_plugin_hwaddr"][::std::mem::align_of::<qemu_plugin_hwaddr>() - 8usize];
["Offset of field: qemu_plugin_hwaddr::is_io"]
[::std::mem::offset_of!(qemu_plugin_hwaddr, is_io) - 0usize];
["Offset of field: qemu_plugin_hwaddr::is_store"]
[::std::mem::offset_of!(qemu_plugin_hwaddr, is_store) - 1usize];
["Offset of field: qemu_plugin_hwaddr::phys_addr"]
[::std::mem::offset_of!(qemu_plugin_hwaddr, phys_addr) - 8usize];
["Offset of field: qemu_plugin_hwaddr::mr"]
[::std::mem::offset_of!(qemu_plugin_hwaddr, mr) - 16usize];
};
impl Default for qemu_plugin_hwaddr {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
#[doc = " tlb_plugin_lookup: query last TLB lookup\n @cpu: cpu environment\n\n This function can be used directly after a memory operation to\n query information about the access. It is used by the plugin\n infrastructure to expose more information about the address.\n\n It would only fail if not called from an instrumented memory access\n which would be an abuse of the API."]
pub fn tlb_plugin_lookup(
cpu: *mut CPUState,
addr: vaddr,
mmu_idx: ::std::os::raw::c_int,
is_store: bool,
data: *mut qemu_plugin_hwaddr,
) -> bool;
}
unsafe extern "C" {
pub fn libafl_page_from_addr(addr: vaddr) -> vaddr;
}
unsafe extern "C" {
pub fn libafl_qemu_get_cpu(cpu_index: ::std::os::raw::c_int) -> *mut CPUState;
}
unsafe extern "C" {
pub fn libafl_qemu_num_cpus() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_current_cpu() -> *mut CPUState;
}
unsafe extern "C" {
pub fn libafl_qemu_cpu_index(arg1: *mut CPUState) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_write_reg(
cpu: *mut CPUState,
reg: ::std::os::raw::c_int,
val: *mut u8,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_read_reg(
cpu: *mut CPUState,
reg: ::std::os::raw::c_int,
val: *mut u8,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_num_regs(cpu: *mut CPUState) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_flush_jit();
}
unsafe extern "C" {
pub fn libafl_breakpoint_invalidate(cpu: *mut CPUState, pc: vaddr);
}
unsafe extern "C" {
pub fn libafl_qemu_main() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_run() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_set_qemu_env(env: *mut CPUArchState);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_custom_gdb_cmd {
pub callback: ::std::option::Option<
unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut u8, arg3: usize) -> bool,
>,
pub data: *mut ::std::os::raw::c_void,
pub next: *mut libafl_custom_gdb_cmd,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_custom_gdb_cmd"][::std::mem::size_of::<libafl_custom_gdb_cmd>() - 24usize];
["Alignment of libafl_custom_gdb_cmd"]
[::std::mem::align_of::<libafl_custom_gdb_cmd>() - 8usize];
["Offset of field: libafl_custom_gdb_cmd::callback"]
[::std::mem::offset_of!(libafl_custom_gdb_cmd, callback) - 0usize];
["Offset of field: libafl_custom_gdb_cmd::data"]
[::std::mem::offset_of!(libafl_custom_gdb_cmd, data) - 8usize];
["Offset of field: libafl_custom_gdb_cmd::next"]
[::std::mem::offset_of!(libafl_custom_gdb_cmd, next) - 16usize];
};
impl Default for libafl_custom_gdb_cmd {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn libafl_qemu_add_gdb_cmd(
callback: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: *mut u8,
arg3: usize,
) -> bool,
>,
data: *mut ::std::os::raw::c_void,
);
}
unsafe extern "C" {
pub fn libafl_qemu_gdb_reply(buf: *const u8, len: usize);
}
unsafe extern "C" {
pub fn libafl_qemu_gdb_exec() -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_breakpoint {
pub addr: vaddr,
pub next: *mut libafl_breakpoint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_breakpoint"][::std::mem::size_of::<libafl_breakpoint>() - 16usize];
["Alignment of libafl_breakpoint"][::std::mem::align_of::<libafl_breakpoint>() - 8usize];
["Offset of field: libafl_breakpoint::addr"]
[::std::mem::offset_of!(libafl_breakpoint, addr) - 0usize];
["Offset of field: libafl_breakpoint::next"]
[::std::mem::offset_of!(libafl_breakpoint, next) - 8usize];
};
impl Default for libafl_breakpoint {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const libafl_exit_reason_kind_INTERNAL: libafl_exit_reason_kind = libafl_exit_reason_kind(0);
pub const libafl_exit_reason_kind_BREAKPOINT: libafl_exit_reason_kind = libafl_exit_reason_kind(1);
pub const libafl_exit_reason_kind_CUSTOM_INSN: libafl_exit_reason_kind = libafl_exit_reason_kind(2);
pub const libafl_exit_reason_kind_CRASH: libafl_exit_reason_kind = libafl_exit_reason_kind(3);
pub const libafl_exit_reason_kind_TIMEOUT: libafl_exit_reason_kind = libafl_exit_reason_kind(4);
impl ::std::ops::BitOr<libafl_exit_reason_kind> for libafl_exit_reason_kind {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
libafl_exit_reason_kind(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for libafl_exit_reason_kind {
#[inline]
fn bitor_assign(&mut self, rhs: libafl_exit_reason_kind) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<libafl_exit_reason_kind> for libafl_exit_reason_kind {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
libafl_exit_reason_kind(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for libafl_exit_reason_kind {
#[inline]
fn bitand_assign(&mut self, rhs: libafl_exit_reason_kind) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct libafl_exit_reason_kind(pub ::std::os::raw::c_uint);
pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_UNDEFINED: libafl_custom_insn_kind =
libafl_custom_insn_kind(0);
pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_LIBAFL: libafl_custom_insn_kind =
libafl_custom_insn_kind(1);
pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_NYX: libafl_custom_insn_kind =
libafl_custom_insn_kind(2);
impl ::std::ops::BitOr<libafl_custom_insn_kind> for libafl_custom_insn_kind {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
libafl_custom_insn_kind(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for libafl_custom_insn_kind {
#[inline]
fn bitor_assign(&mut self, rhs: libafl_custom_insn_kind) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<libafl_custom_insn_kind> for libafl_custom_insn_kind {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
libafl_custom_insn_kind(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for libafl_custom_insn_kind {
#[inline]
fn bitand_assign(&mut self, rhs: libafl_custom_insn_kind) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct libafl_custom_insn_kind(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_exit_reason_internal {
pub cause: ShutdownCause,
pub signal: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_exit_reason_internal"]
[::std::mem::size_of::<libafl_exit_reason_internal>() - 8usize];
["Alignment of libafl_exit_reason_internal"]
[::std::mem::align_of::<libafl_exit_reason_internal>() - 4usize];
["Offset of field: libafl_exit_reason_internal::cause"]
[::std::mem::offset_of!(libafl_exit_reason_internal, cause) - 0usize];
["Offset of field: libafl_exit_reason_internal::signal"]
[::std::mem::offset_of!(libafl_exit_reason_internal, signal) - 4usize];
};
impl Default for libafl_exit_reason_internal {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct libafl_exit_reason_breakpoint {
pub addr: vaddr,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_exit_reason_breakpoint"]
[::std::mem::size_of::<libafl_exit_reason_breakpoint>() - 8usize];
["Alignment of libafl_exit_reason_breakpoint"]
[::std::mem::align_of::<libafl_exit_reason_breakpoint>() - 8usize];
["Offset of field: libafl_exit_reason_breakpoint::addr"]
[::std::mem::offset_of!(libafl_exit_reason_breakpoint, addr) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_exit_reason_custom_insn {
pub kind: libafl_custom_insn_kind,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_exit_reason_custom_insn"]
[::std::mem::size_of::<libafl_exit_reason_custom_insn>() - 4usize];
["Alignment of libafl_exit_reason_custom_insn"]
[::std::mem::align_of::<libafl_exit_reason_custom_insn>() - 4usize];
["Offset of field: libafl_exit_reason_custom_insn::kind"]
[::std::mem::offset_of!(libafl_exit_reason_custom_insn, kind) - 0usize];
};
impl Default for libafl_exit_reason_custom_insn {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct libafl_exit_reason_crash {}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_exit_reason_crash"]
[::std::mem::size_of::<libafl_exit_reason_crash>() - 0usize];
["Alignment of libafl_exit_reason_crash"]
[::std::mem::align_of::<libafl_exit_reason_crash>() - 1usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct libafl_exit_reason_timeout {}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_exit_reason_timeout"]
[::std::mem::size_of::<libafl_exit_reason_timeout>() - 0usize];
["Alignment of libafl_exit_reason_timeout"]
[::std::mem::align_of::<libafl_exit_reason_timeout>() - 1usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct libafl_exit_reason {
pub kind: libafl_exit_reason_kind,
pub cpu: *mut CPUState,
pub next_pc: vaddr,
pub data: libafl_exit_reason__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union libafl_exit_reason__bindgen_ty_1 {
pub internal: libafl_exit_reason_internal,
pub breakpoint: libafl_exit_reason_breakpoint,
pub custom_insn: libafl_exit_reason_custom_insn,
pub crash: libafl_exit_reason_crash,
pub timeout: libafl_exit_reason_timeout,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_exit_reason__bindgen_ty_1"]
[::std::mem::size_of::<libafl_exit_reason__bindgen_ty_1>() - 8usize];
["Alignment of libafl_exit_reason__bindgen_ty_1"]
[::std::mem::align_of::<libafl_exit_reason__bindgen_ty_1>() - 8usize];
["Offset of field: libafl_exit_reason__bindgen_ty_1::internal"]
[::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, internal) - 0usize];
["Offset of field: libafl_exit_reason__bindgen_ty_1::breakpoint"]
[::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, breakpoint) - 0usize];
["Offset of field: libafl_exit_reason__bindgen_ty_1::custom_insn"]
[::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, custom_insn) - 0usize];
["Offset of field: libafl_exit_reason__bindgen_ty_1::crash"]
[::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, crash) - 0usize];
["Offset of field: libafl_exit_reason__bindgen_ty_1::timeout"]
[::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, timeout) - 0usize];
};
impl Default for libafl_exit_reason__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for libafl_exit_reason__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "libafl_exit_reason__bindgen_ty_1 {{ union }}")
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_exit_reason"][::std::mem::size_of::<libafl_exit_reason>() - 32usize];
["Alignment of libafl_exit_reason"][::std::mem::align_of::<libafl_exit_reason>() - 8usize];
["Offset of field: libafl_exit_reason::kind"]
[::std::mem::offset_of!(libafl_exit_reason, kind) - 0usize];
["Offset of field: libafl_exit_reason::cpu"]
[::std::mem::offset_of!(libafl_exit_reason, cpu) - 8usize];
["Offset of field: libafl_exit_reason::next_pc"]
[::std::mem::offset_of!(libafl_exit_reason, next_pc) - 16usize];
["Offset of field: libafl_exit_reason::data"]
[::std::mem::offset_of!(libafl_exit_reason, data) - 24usize];
};
impl Default for libafl_exit_reason {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for libafl_exit_reason {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"libafl_exit_reason {{ kind: {:?}, cpu: {:?}, data: {:?} }}",
self.kind, self.cpu, self.data
)
}
}
unsafe extern "C" {
pub fn libafl_qemu_set_breakpoint(pc: vaddr) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_breakpoint(pc: vaddr) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_trigger_breakpoint(cpu: *mut CPUState);
}
unsafe extern "C" {
pub fn libafl_qemu_breakpoint_run(pc_next: vaddr);
}
unsafe extern "C" {
pub fn libafl_last_exit_cpu() -> *mut CPUState;
}
unsafe extern "C" {
pub fn libafl_exit_signal_vm_start();
}
unsafe extern "C" {
pub fn libafl_exit_asap() -> bool;
}
unsafe extern "C" {
pub fn libafl_sync_exit_cpu();
}
unsafe extern "C" {
pub fn libafl_exit_request_internal(
cpu: *mut CPUState,
pc: u64,
cause: ShutdownCause,
signal: ::std::os::raw::c_int,
);
}
unsafe extern "C" {
pub fn libafl_exit_request_breakpoint(cpu: *mut CPUState, pc: vaddr);
}
unsafe extern "C" {
pub fn libafl_exit_request_custom_insn(
cpu: *mut CPUState,
pc: vaddr,
kind: libafl_custom_insn_kind,
);
}
unsafe extern "C" {
pub fn libafl_exit_request_crash(cpu: *mut CPUState);
}
unsafe extern "C" {
pub fn libafl_exit_request_timeout();
}
unsafe extern "C" {
pub fn libafl_get_exit_reason() -> *mut libafl_exit_reason;
}
unsafe extern "C" {
pub fn libafl_jit_trace_edge_hitcount(data: u64, id: u64) -> usize;
}
unsafe extern "C" {
pub fn libafl_jit_trace_edge_single(data: u64, id: u64) -> usize;
}
unsafe extern "C" {
pub fn libafl_jit_trace_block_hitcount(data: u64, id: u64) -> usize;
}
unsafe extern "C" {
pub fn libafl_jit_trace_block_single(data: u64, id: u64) -> usize;
}
unsafe extern "C" {
pub fn libafl_qemu_host_page_size() -> usize;
}
unsafe extern "C" {
pub fn libafl_tcg_gen_asan(addr: *mut TCGTemp, size: usize);
}
pub type libafl_backdoor_exec_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, cpu: *mut CPUArchState, pc: vaddr)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_backdoor_hook {
pub data: u64,
pub num: usize,
pub helper_info: TCGHelperInfo,
pub next: *mut libafl_backdoor_hook,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_backdoor_hook"][::std::mem::size_of::<libafl_backdoor_hook>() - 112usize];
["Alignment of libafl_backdoor_hook"][::std::mem::align_of::<libafl_backdoor_hook>() - 8usize];
["Offset of field: libafl_backdoor_hook::data"]
[::std::mem::offset_of!(libafl_backdoor_hook, data) - 0usize];
["Offset of field: libafl_backdoor_hook::num"]
[::std::mem::offset_of!(libafl_backdoor_hook, num) - 8usize];
["Offset of field: libafl_backdoor_hook::helper_info"]
[::std::mem::offset_of!(libafl_backdoor_hook, helper_info) - 16usize];
["Offset of field: libafl_backdoor_hook::next"]
[::std::mem::offset_of!(libafl_backdoor_hook, next) - 104usize];
};
impl Default for libafl_backdoor_hook {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn libafl_add_backdoor_hook(exec_cb: libafl_backdoor_exec_cb, data: u64) -> usize;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_backdoor_hook(
num: usize,
invalidate: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_hook_backdoor_run(pc_next: vaddr);
}
pub type libafl_block_pre_gen_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, pc: vaddr) -> u64>;
pub type libafl_block_post_gen_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, pc: vaddr, block_length: vaddr)>;
pub type libafl_block_exec_cb = ::std::option::Option<unsafe extern "C" fn(data: u64, id: u64)>;
pub type libafl_block_jit_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, id: u64) -> usize>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_block_hook {
pub pre_gen_cb: libafl_block_pre_gen_cb,
pub post_gen_cb: libafl_block_post_gen_cb,
pub jit_cb: libafl_block_jit_cb,
pub data: u64,
pub num: usize,
pub helper_info: TCGHelperInfo,
pub next: *mut libafl_block_hook,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_block_hook"][::std::mem::size_of::<libafl_block_hook>() - 136usize];
["Alignment of libafl_block_hook"][::std::mem::align_of::<libafl_block_hook>() - 8usize];
["Offset of field: libafl_block_hook::pre_gen_cb"]
[::std::mem::offset_of!(libafl_block_hook, pre_gen_cb) - 0usize];
["Offset of field: libafl_block_hook::post_gen_cb"]
[::std::mem::offset_of!(libafl_block_hook, post_gen_cb) - 8usize];
["Offset of field: libafl_block_hook::jit_cb"]
[::std::mem::offset_of!(libafl_block_hook, jit_cb) - 16usize];
["Offset of field: libafl_block_hook::data"]
[::std::mem::offset_of!(libafl_block_hook, data) - 24usize];
["Offset of field: libafl_block_hook::num"]
[::std::mem::offset_of!(libafl_block_hook, num) - 32usize];
["Offset of field: libafl_block_hook::helper_info"]
[::std::mem::offset_of!(libafl_block_hook, helper_info) - 40usize];
["Offset of field: libafl_block_hook::next"]
[::std::mem::offset_of!(libafl_block_hook, next) - 128usize];
};
impl Default for libafl_block_hook {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn libafl_add_block_hook(
pre_gen_cb: libafl_block_pre_gen_cb,
post_gen_cb: libafl_block_post_gen_cb,
exec_cb: libafl_block_exec_cb,
data: u64,
) -> usize;
}
unsafe extern "C" {
pub fn libafl_qemu_block_hook_set_jit(num: usize, jit_cb: libafl_block_jit_cb) -> bool;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_block_hook(
num: usize,
invalidate: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_hook_block_pre_run(pc: vaddr);
}
unsafe extern "C" {
pub fn libafl_qemu_hook_block_post_run(tb: *mut TranslationBlock, pc: vaddr);
}
pub type libafl_cmp_gen_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, pc: vaddr, size: usize) -> u64>;
pub type libafl_cmp_exec1_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, id: u64, v0: u8, v1: u8)>;
pub type libafl_cmp_exec2_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, id: u64, v0: u16, v1: u16)>;
pub type libafl_cmp_exec4_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, id: u64, v0: u32, v1: u32)>;
pub type libafl_cmp_exec8_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, id: u64, v0: u64, v1: u64)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_cmp_hook {
pub gen_cb: libafl_cmp_gen_cb,
pub data: u64,
pub num: usize,
pub helper_info1: TCGHelperInfo,
pub helper_info2: TCGHelperInfo,
pub helper_info4: TCGHelperInfo,
pub helper_info8: TCGHelperInfo,
pub next: *mut libafl_cmp_hook,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_cmp_hook"][::std::mem::size_of::<libafl_cmp_hook>() - 384usize];
["Alignment of libafl_cmp_hook"][::std::mem::align_of::<libafl_cmp_hook>() - 8usize];
["Offset of field: libafl_cmp_hook::gen_cb"]
[::std::mem::offset_of!(libafl_cmp_hook, gen_cb) - 0usize];
["Offset of field: libafl_cmp_hook::data"]
[::std::mem::offset_of!(libafl_cmp_hook, data) - 8usize];
["Offset of field: libafl_cmp_hook::num"]
[::std::mem::offset_of!(libafl_cmp_hook, num) - 16usize];
["Offset of field: libafl_cmp_hook::helper_info1"]
[::std::mem::offset_of!(libafl_cmp_hook, helper_info1) - 24usize];
["Offset of field: libafl_cmp_hook::helper_info2"]
[::std::mem::offset_of!(libafl_cmp_hook, helper_info2) - 112usize];
["Offset of field: libafl_cmp_hook::helper_info4"]
[::std::mem::offset_of!(libafl_cmp_hook, helper_info4) - 200usize];
["Offset of field: libafl_cmp_hook::helper_info8"]
[::std::mem::offset_of!(libafl_cmp_hook, helper_info8) - 288usize];
["Offset of field: libafl_cmp_hook::next"]
[::std::mem::offset_of!(libafl_cmp_hook, next) - 376usize];
};
impl Default for libafl_cmp_hook {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn libafl_gen_cmp(pc: vaddr, op0: TCGv, op1: TCGv, ot: MemOp);
}
unsafe extern "C" {
pub fn libafl_add_cmp_hook(
gen_cb: libafl_cmp_gen_cb,
exec1_cb: libafl_cmp_exec1_cb,
exec2_cb: libafl_cmp_exec2_cb,
exec4_cb: libafl_cmp_exec4_cb,
exec8_cb: libafl_cmp_exec8_cb,
data: u64,
) -> usize;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_cmp_hook(
num: usize,
invalidate: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
pub type libafl_edge_gen_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, src: vaddr, dst: vaddr) -> u64>;
pub type libafl_edge_exec_cb = ::std::option::Option<unsafe extern "C" fn(data: u64, id: u64)>;
pub type libafl_edge_jit_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, id: u64) -> usize>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_edge_hook {
pub gen_cb: libafl_edge_gen_cb,
pub jit_cb: libafl_edge_jit_cb,
pub data: u64,
pub num: usize,
pub cur_id: u64,
pub helper_info: TCGHelperInfo,
pub next: *mut libafl_edge_hook,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_edge_hook"][::std::mem::size_of::<libafl_edge_hook>() - 136usize];
["Alignment of libafl_edge_hook"][::std::mem::align_of::<libafl_edge_hook>() - 8usize];
["Offset of field: libafl_edge_hook::gen_cb"]
[::std::mem::offset_of!(libafl_edge_hook, gen_cb) - 0usize];
["Offset of field: libafl_edge_hook::jit_cb"]
[::std::mem::offset_of!(libafl_edge_hook, jit_cb) - 8usize];
["Offset of field: libafl_edge_hook::data"]
[::std::mem::offset_of!(libafl_edge_hook, data) - 16usize];
["Offset of field: libafl_edge_hook::num"]
[::std::mem::offset_of!(libafl_edge_hook, num) - 24usize];
["Offset of field: libafl_edge_hook::cur_id"]
[::std::mem::offset_of!(libafl_edge_hook, cur_id) - 32usize];
["Offset of field: libafl_edge_hook::helper_info"]
[::std::mem::offset_of!(libafl_edge_hook, helper_info) - 40usize];
["Offset of field: libafl_edge_hook::next"]
[::std::mem::offset_of!(libafl_edge_hook, next) - 128usize];
};
impl Default for libafl_edge_hook {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn libafl_gen_edge(
cpu: *mut CPUState,
src_block: vaddr,
dst_block: vaddr,
exit_n: ::std::os::raw::c_int,
s: TCGTBCPUState,
) -> *mut TranslationBlock;
}
unsafe extern "C" {
pub fn libafl_add_edge_hook(
gen_cb: libafl_edge_gen_cb,
exec_cb: libafl_edge_exec_cb,
data: u64,
) -> usize;
}
unsafe extern "C" {
pub fn libafl_qemu_edge_hook_set_jit(num: usize, jit_cb: libafl_edge_jit_cb) -> bool;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_edge_hook(
num: usize,
invalidate: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_hook_edge_gen(src_block: vaddr, dst_block: vaddr) -> bool;
}
unsafe extern "C" {
pub fn libafl_qemu_hook_edge_run();
}
pub type libafl_instruction_cb = ::std::option::Option<unsafe extern "C" fn(data: u64, pc: vaddr)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_instruction_hook {
pub data: u64,
pub num: usize,
pub addr: vaddr,
pub helper_info: TCGHelperInfo,
pub next: *mut libafl_instruction_hook,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_instruction_hook"]
[::std::mem::size_of::<libafl_instruction_hook>() - 120usize];
["Alignment of libafl_instruction_hook"]
[::std::mem::align_of::<libafl_instruction_hook>() - 8usize];
["Offset of field: libafl_instruction_hook::data"]
[::std::mem::offset_of!(libafl_instruction_hook, data) - 0usize];
["Offset of field: libafl_instruction_hook::num"]
[::std::mem::offset_of!(libafl_instruction_hook, num) - 8usize];
["Offset of field: libafl_instruction_hook::addr"]
[::std::mem::offset_of!(libafl_instruction_hook, addr) - 16usize];
["Offset of field: libafl_instruction_hook::helper_info"]
[::std::mem::offset_of!(libafl_instruction_hook, helper_info) - 24usize];
["Offset of field: libafl_instruction_hook::next"]
[::std::mem::offset_of!(libafl_instruction_hook, next) - 112usize];
};
impl Default for libafl_instruction_hook {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn libafl_qemu_add_instruction_hooks(
pc: vaddr,
callback: libafl_instruction_cb,
data: u64,
invalidate: ::std::os::raw::c_int,
) -> usize;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_instruction_hook(
num: usize,
invalidate: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_instruction_hooks_at(
addr: vaddr,
invalidate: ::std::os::raw::c_int,
) -> usize;
}
unsafe extern "C" {
pub fn libafl_search_instruction_hook(addr: vaddr) -> *mut libafl_instruction_hook;
}
unsafe extern "C" {
pub fn libafl_qemu_hook_instruction_run(pc_next: vaddr);
}
pub type libafl_rw_gen_cb = ::std::option::Option<
unsafe extern "C" fn(data: u64, pc: vaddr, addr: *mut TCGTemp, oi: MemOpIdx) -> u64,
>;
pub type libafl_rw_exec_cb =
::std::option::Option<unsafe extern "C" fn(data: u64, id: u64, pc: vaddr, addr: vaddr)>;
pub type libafl_rw_execN_cb = ::std::option::Option<
unsafe extern "C" fn(data: u64, id: u64, pc: vaddr, addr: vaddr, size: usize),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_rw_hook {
pub gen_cb: libafl_rw_gen_cb,
pub data: u64,
pub num: usize,
pub helper_info1: TCGHelperInfo,
pub helper_info2: TCGHelperInfo,
pub helper_info4: TCGHelperInfo,
pub helper_info8: TCGHelperInfo,
pub helper_infoN: TCGHelperInfo,
pub next: *mut libafl_rw_hook,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_rw_hook"][::std::mem::size_of::<libafl_rw_hook>() - 472usize];
["Alignment of libafl_rw_hook"][::std::mem::align_of::<libafl_rw_hook>() - 8usize];
["Offset of field: libafl_rw_hook::gen_cb"]
[::std::mem::offset_of!(libafl_rw_hook, gen_cb) - 0usize];
["Offset of field: libafl_rw_hook::data"]
[::std::mem::offset_of!(libafl_rw_hook, data) - 8usize];
["Offset of field: libafl_rw_hook::num"][::std::mem::offset_of!(libafl_rw_hook, num) - 16usize];
["Offset of field: libafl_rw_hook::helper_info1"]
[::std::mem::offset_of!(libafl_rw_hook, helper_info1) - 24usize];
["Offset of field: libafl_rw_hook::helper_info2"]
[::std::mem::offset_of!(libafl_rw_hook, helper_info2) - 112usize];
["Offset of field: libafl_rw_hook::helper_info4"]
[::std::mem::offset_of!(libafl_rw_hook, helper_info4) - 200usize];
["Offset of field: libafl_rw_hook::helper_info8"]
[::std::mem::offset_of!(libafl_rw_hook, helper_info8) - 288usize];
["Offset of field: libafl_rw_hook::helper_infoN"]
[::std::mem::offset_of!(libafl_rw_hook, helper_infoN) - 376usize];
["Offset of field: libafl_rw_hook::next"]
[::std::mem::offset_of!(libafl_rw_hook, next) - 464usize];
};
impl Default for libafl_rw_hook {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn libafl_gen_read(pc: *mut TCGTemp, addr: *mut TCGTemp, oi: MemOpIdx);
}
unsafe extern "C" {
pub fn libafl_gen_write(pc: *mut TCGTemp, addr: *mut TCGTemp, oi: MemOpIdx);
}
unsafe extern "C" {
pub fn libafl_add_read_hook(
gen_cb: libafl_rw_gen_cb,
exec1_cb: libafl_rw_exec_cb,
exec2_cb: libafl_rw_exec_cb,
exec4_cb: libafl_rw_exec_cb,
exec8_cb: libafl_rw_exec_cb,
execN_cb: libafl_rw_execN_cb,
data: u64,
) -> usize;
}
unsafe extern "C" {
pub fn libafl_add_write_hook(
gen_cb: libafl_rw_gen_cb,
exec1_cb: libafl_rw_exec_cb,
exec2_cb: libafl_rw_exec_cb,
exec4_cb: libafl_rw_exec_cb,
exec8_cb: libafl_rw_exec_cb,
execN_cb: libafl_rw_execN_cb,
data: u64,
) -> usize;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_read_hook(
num: usize,
invalidate: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_write_hook(
num: usize,
invalidate: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
pub type libafl_cpu_run_fn =
::std::option::Option<unsafe extern "C" fn(data: u64, cpu: *mut CPUState)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_cpu_run_hook {
pub pre_cpu_run: libafl_cpu_run_fn,
pub post_cpu_run: libafl_cpu_run_fn,
pub data: u64,
pub num: usize,
pub next: *mut libafl_cpu_run_hook,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_cpu_run_hook"][::std::mem::size_of::<libafl_cpu_run_hook>() - 40usize];
["Alignment of libafl_cpu_run_hook"][::std::mem::align_of::<libafl_cpu_run_hook>() - 8usize];
["Offset of field: libafl_cpu_run_hook::pre_cpu_run"]
[::std::mem::offset_of!(libafl_cpu_run_hook, pre_cpu_run) - 0usize];
["Offset of field: libafl_cpu_run_hook::post_cpu_run"]
[::std::mem::offset_of!(libafl_cpu_run_hook, post_cpu_run) - 8usize];
["Offset of field: libafl_cpu_run_hook::data"]
[::std::mem::offset_of!(libafl_cpu_run_hook, data) - 16usize];
["Offset of field: libafl_cpu_run_hook::num"]
[::std::mem::offset_of!(libafl_cpu_run_hook, num) - 24usize];
["Offset of field: libafl_cpu_run_hook::next"]
[::std::mem::offset_of!(libafl_cpu_run_hook, next) - 32usize];
};
impl Default for libafl_cpu_run_hook {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn libafl_hook_cpu_run_add(
pre_cpu_run: libafl_cpu_run_fn,
post_cpu_run: libafl_cpu_run_fn,
data: u64,
) -> usize;
}
unsafe extern "C" {
pub fn libafl_hook_cpu_run_remove(num: usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_cpu_run_hook(num: usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_hook_cpu_run_pre_exec(cpu: *mut CPUState);
}
unsafe extern "C" {
pub fn libafl_hook_cpu_run_post_exec(cpu: *mut CPUState);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_new_thread_hook {
pub callback: ::std::option::Option<
unsafe extern "C" fn(data: u64, cpu: *mut CPUArchState, tid: u32) -> bool,
>,
pub data: u64,
pub num: usize,
pub next: *mut libafl_new_thread_hook,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_new_thread_hook"][::std::mem::size_of::<libafl_new_thread_hook>() - 32usize];
["Alignment of libafl_new_thread_hook"]
[::std::mem::align_of::<libafl_new_thread_hook>() - 8usize];
["Offset of field: libafl_new_thread_hook::callback"]
[::std::mem::offset_of!(libafl_new_thread_hook, callback) - 0usize];
["Offset of field: libafl_new_thread_hook::data"]
[::std::mem::offset_of!(libafl_new_thread_hook, data) - 8usize];
["Offset of field: libafl_new_thread_hook::num"]
[::std::mem::offset_of!(libafl_new_thread_hook, num) - 16usize];
["Offset of field: libafl_new_thread_hook::next"]
[::std::mem::offset_of!(libafl_new_thread_hook, next) - 24usize];
};
impl Default for libafl_new_thread_hook {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn libafl_add_new_thread_hook(
callback: ::std::option::Option<
unsafe extern "C" fn(data: u64, env: *mut CPUArchState, tid: u32) -> bool,
>,
data: u64,
) -> usize;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_new_thread_hook(num: usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_hook_new_thread_run(env: *mut CPUArchState, tid: u32) -> bool;
}
pub const libafl_syshook_ret_tag_LIBAFL_SYSHOOK_RUN: libafl_syshook_ret_tag =
libafl_syshook_ret_tag(0);
pub const libafl_syshook_ret_tag_LIBAFL_SYSHOOK_SKIP: libafl_syshook_ret_tag =
libafl_syshook_ret_tag(1);
impl ::std::ops::BitOr<libafl_syshook_ret_tag> for libafl_syshook_ret_tag {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
libafl_syshook_ret_tag(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for libafl_syshook_ret_tag {
#[inline]
fn bitor_assign(&mut self, rhs: libafl_syshook_ret_tag) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<libafl_syshook_ret_tag> for libafl_syshook_ret_tag {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
libafl_syshook_ret_tag(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for libafl_syshook_ret_tag {
#[inline]
fn bitand_assign(&mut self, rhs: libafl_syshook_ret_tag) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct libafl_syshook_ret_tag(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Copy, Clone)]
pub struct libafl_syshook_ret {
pub tag: libafl_syshook_ret_tag,
pub __bindgen_anon_1: libafl_syshook_ret__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union libafl_syshook_ret__bindgen_ty_1 {
pub syshook_skip_retval: target_ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_syshook_ret__bindgen_ty_1"]
[::std::mem::size_of::<libafl_syshook_ret__bindgen_ty_1>() - 8usize];
["Alignment of libafl_syshook_ret__bindgen_ty_1"]
[::std::mem::align_of::<libafl_syshook_ret__bindgen_ty_1>() - 8usize];
["Offset of field: libafl_syshook_ret__bindgen_ty_1::syshook_skip_retval"]
[::std::mem::offset_of!(libafl_syshook_ret__bindgen_ty_1, syshook_skip_retval) - 0usize];
};
impl Default for libafl_syshook_ret__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for libafl_syshook_ret__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "libafl_syshook_ret__bindgen_ty_1 {{ union }}")
}
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_syshook_ret"][::std::mem::size_of::<libafl_syshook_ret>() - 16usize];
["Alignment of libafl_syshook_ret"][::std::mem::align_of::<libafl_syshook_ret>() - 8usize];
["Offset of field: libafl_syshook_ret::tag"]
[::std::mem::offset_of!(libafl_syshook_ret, tag) - 0usize];
};
impl Default for libafl_syshook_ret {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl ::std::fmt::Debug for libafl_syshook_ret {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"libafl_syshook_ret {{ tag: {:?}, __bindgen_anon_1: {:?} }}",
self.tag, self.__bindgen_anon_1
)
}
}
pub type libafl_pre_syscall_cb = ::std::option::Option<
unsafe extern "C" fn(
data: u64,
sys_num: ::std::os::raw::c_int,
arg0: target_ulong,
arg1: target_ulong,
arg2: target_ulong,
arg3: target_ulong,
arg4: target_ulong,
arg5: target_ulong,
arg6: target_ulong,
arg7: target_ulong,
) -> libafl_syshook_ret,
>;
pub type libafl_post_syscall_cb = ::std::option::Option<
unsafe extern "C" fn(
data: u64,
ret: target_ulong,
sys_num: ::std::os::raw::c_int,
arg0: target_ulong,
arg1: target_ulong,
arg2: target_ulong,
arg3: target_ulong,
arg4: target_ulong,
arg5: target_ulong,
arg6: target_ulong,
arg7: target_ulong,
) -> target_ulong,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_pre_syscall_hook {
pub callback: libafl_pre_syscall_cb,
pub data: u64,
pub num: usize,
pub next: *mut libafl_pre_syscall_hook,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_pre_syscall_hook"][::std::mem::size_of::<libafl_pre_syscall_hook>() - 32usize];
["Alignment of libafl_pre_syscall_hook"]
[::std::mem::align_of::<libafl_pre_syscall_hook>() - 8usize];
["Offset of field: libafl_pre_syscall_hook::callback"]
[::std::mem::offset_of!(libafl_pre_syscall_hook, callback) - 0usize];
["Offset of field: libafl_pre_syscall_hook::data"]
[::std::mem::offset_of!(libafl_pre_syscall_hook, data) - 8usize];
["Offset of field: libafl_pre_syscall_hook::num"]
[::std::mem::offset_of!(libafl_pre_syscall_hook, num) - 16usize];
["Offset of field: libafl_pre_syscall_hook::next"]
[::std::mem::offset_of!(libafl_pre_syscall_hook, next) - 24usize];
};
impl Default for libafl_pre_syscall_hook {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libafl_post_syscall_hook {
pub callback: libafl_post_syscall_cb,
pub data: u64,
pub num: usize,
pub next: *mut libafl_post_syscall_hook,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of libafl_post_syscall_hook"]
[::std::mem::size_of::<libafl_post_syscall_hook>() - 32usize];
["Alignment of libafl_post_syscall_hook"]
[::std::mem::align_of::<libafl_post_syscall_hook>() - 8usize];
["Offset of field: libafl_post_syscall_hook::callback"]
[::std::mem::offset_of!(libafl_post_syscall_hook, callback) - 0usize];
["Offset of field: libafl_post_syscall_hook::data"]
[::std::mem::offset_of!(libafl_post_syscall_hook, data) - 8usize];
["Offset of field: libafl_post_syscall_hook::num"]
[::std::mem::offset_of!(libafl_post_syscall_hook, num) - 16usize];
["Offset of field: libafl_post_syscall_hook::next"]
[::std::mem::offset_of!(libafl_post_syscall_hook, next) - 24usize];
};
impl Default for libafl_post_syscall_hook {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn libafl_add_pre_syscall_hook(callback: libafl_pre_syscall_cb, data: u64) -> usize;
}
unsafe extern "C" {
pub fn libafl_add_post_syscall_hook(callback: libafl_post_syscall_cb, data: u64) -> usize;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_pre_syscall_hook(num: usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_post_syscall_hook(num: usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_hook_syscall_pre_run(
env: *mut CPUArchState,
num: ::std::os::raw::c_int,
arg1: abi_long,
arg2: abi_long,
arg3: abi_long,
arg4: abi_long,
arg5: abi_long,
arg6: abi_long,
arg7: abi_long,
arg8: abi_long,
ret: *mut abi_long,
) -> bool;
}
unsafe extern "C" {
pub fn libafl_qemu_set_hw_breakpoint(addr: target_ulong) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_qemu_remove_hw_breakpoint(addr: target_ulong) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn libafl_load_qemu_snapshot(name: *mut ::std::os::raw::c_char, sync: bool);
pub fn libafl_save_qemu_snapshot(name: *mut ::std::os::raw::c_char, sync: bool);
pub fn qemu_cleanup(code: ::std::os::raw::c_int);
pub fn libafl_qemu_current_paging_id(cpu: *mut CPUState) -> u64;
}
unsafe extern "C" {
pub fn libafl_hook_syscall_post_run(
num: ::std::os::raw::c_int,
arg1: abi_long,
arg2: abi_long,
arg3: abi_long,
arg4: abi_long,
arg5: abi_long,
arg6: abi_long,
arg7: abi_long,
arg8: abi_long,
ret: *mut abi_long,
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_dirty_gfn {
pub _address: u8,
}