Skip to content

Support composite function member locations #45

@emesare

Description

@emesare

warp/type.fbs

Lines 164 to 166 in c9cfe5b

union LocationClass {
// TODO: Register can have multiple fields?
RegisterLocation,

Describes a set of locations that represent a composite location.

table LocationPiece {
    location: LocationClass; 
    width: BitSize; 
    storage_offset: BitOffset;
    location_offset: BitOffset;
}

table CompositeLocation {
    pieces: [LocationPiece];
}

union LocationClass {
    RegisterLocation,
    StackLocation,
    CompositeLocation,
}

Something like this seems reasonable, storage_offset describes the offset into the data, whereas location_offset describes the offset into the location. We need storage_offset to match the pieces with the parts of the data they refer to, and we need location_offset to pack multiple pieces into a given location.

Some semi relevant links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions