-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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:
- https://github.com/bytecodealliance/wasmtime/blob/809bd7e72d80bf9e20b235d770b890ed63c2410e/cranelift/codegen/src/isa/x64/abi.rs#L94
- https://github.com/rust-lang/rustc_codegen_cranelift/blob/f4bb7d1de119964e63a7090c1e143cdab13143fa/src/abi/pass_mode.rs#L112-L122
- https://github.com/NationalSecurityAgency/ghidra/blob/master/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/VariableStorage.java
Metadata
Metadata
Assignees
Labels
No labels