sign_extend

Function sign_extend 

Source
pub(crate) fn sign_extend(
    form: &SubwordForm,
    word: Unsigned36Bit,
    quarter_activity: QuarterActivity,
) -> Unsigned36Bit
Expand description

Perform sign extension. From User Handbook, figure 13-14, “The sign bit of an active quarter of a partially-active subword is extended to the left until an active quarter is again met, this must be interpreted in terms of the possible partially active subwords”. I don’t know what the second part of this sentence means. The accompanying diagram shows the sign bit being extended into quarters that are to the right of an active quarter (in order words the leftward extension wraps after it hits q4).