Skip to main content

luaur_code_gen/records/
assembly_builder_a_64.rs

1use crate::enums::kind::Kind;
2use crate::records::address_a_64::AddressA64;
3use crate::records::label::Label;
4use crate::records::patch::Patch;
5use crate::records::register_a_64::RegisterA64;
6use alloc::string::String;
7use alloc::vec::Vec;
8
9#[derive(Debug, Clone)]
10#[repr(C)]
11pub struct AssemblyBuilderA64 {
12    // `data`/`code`/`text` are the public observable output in the C++
13    // AssemblyBuilderA64 (tests read `build.code`); the X64 builder already
14    // exposes them `pub`.
15    pub data: Vec<u8>,
16    pub code: Vec<u32>,
17    pub text: String,
18    pub(crate) log_text: bool,
19    pub(crate) features: u32,
20    pub(crate) next_label: u32,
21    pub(crate) pending_labels: Vec<Patch>,
22    pub(crate) label_locations: Vec<u32>,
23    pub(crate) finalized: bool,
24    pub(crate) overflowed: bool,
25    pub(crate) data_pos: usize,
26    pub(crate) code_pos: *mut u32,
27    pub(crate) code_end: *mut u32,
28}