Enum cretonne_codegen::ir::GlobalVarData [] [src]

pub enum GlobalVarData {
    VMContext {
        offset: Offset32,
    },
    Deref {
        base: GlobalVar,
        offset: Offset32,
    },
    Sym {
        name: ExternalName,
        colocated: bool,
    },
}

Information about a global variable declaration.

Variants

Variable is part of the VM context struct, it's address is a constant offset from the VM context pointer.

Fields of VMContext

Offset from the vmctx pointer to this global.

Variable is part of a struct pointed to by another global variable.

The base global variable is assumed to contain a pointer to a struct. This global variable lives at an offset into the struct. The memory must be accessible, and naturally aligned to hold a pointer value.

Fields of Deref

The base pointer global variable.

Byte offset to be added to the pointer loaded from base.

Variable is at an address identified by a symbolic name. Cretonne itself does not interpret this name; it's used by embedders to link with other data structures.

Fields of Sym

The symbolic name.

Will this variable be defined nearby, such that it will always be a certain distance away, after linking? If so, references to it can avoid going through a GOT. Note that symbols meant to be preemptible cannot be colocated.

Methods

impl GlobalVarData
[src]

[src]

Assume that self is an GlobalVarData::Sym and return its name.

Trait Implementations

impl Clone for GlobalVarData
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Display for GlobalVarData
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for GlobalVarData

impl Sync for GlobalVarData