| 1 |
# Partial-Element Getter |
| 2 |
|
| 3 |
This function extracts a portion of an integer value from a [`PartialElement`]. |
| 4 |
The `BitField` implementations call it as they assemble a complete integer. It |
| 5 |
performs the following steps: |
| 6 |
|
| 7 |
1. the `PartialElement` is loaded (and masked to discard unused bits), |
| 8 |
1. the loaded value is then shifted to abut the LSedge of the stack local, |
| 9 |
1. and then `resize`d into a `U` value. |
| 10 |
|
| 11 |
## Type Parameters |
| 12 |
|
| 13 |
- `O` and `T` are the type parameters of the `PartialElement` argument. |
| 14 |
- `U` is the destination integer type. |
| 15 |
|
| 16 |
## Parameters |
| 17 |
|
| 18 |
- `elem`: A `PartialElement` containing a value segment. |
| 19 |
- `shamt`: The distance by which to right-shift the value loaded from `elem` so |
| 20 |
that it abuts the LSedge. |
| 21 |
|
| 22 |
## Returns |
| 23 |
|
| 24 |
The segment of an integer stored in `elem`. |
| 25 |
|
| 26 |
[`PartialElement`]: crate::domain::PartialElement |