Enum cretonne::prelude::GlobalValueData[][src]

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

Information about a global value declaration.

Variants

Value is the address of a field in the VM context struct, a constant offset from the VM context pointer.

Fields of VMContext

Offset from the vmctx pointer.

Value is pointed to by another global value.

The base global value is assumed to contain a pointer. This global value is computed by loading from memory at that pointer value, and then adding an offset. The memory must be accessible, and naturally aligned to hold a pointer value.

Fields of Deref

The base pointer global value.

Byte offset to be added to the loaded value.

Value is 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 symbol 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 GlobalValueData
[src]

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

Trait Implementations

impl Clone for GlobalValueData
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Display for GlobalValueData
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations