For software that is not designed to use the BWX extension, the intended sequence for storing an unaligned word R5 at X is:
LDA | R6, X(R11) | ; R6<2:0> = (X mod 8) = 5 | |||
LDQ_U | R2, X+1(R11) | ; Ignores va<2:0>, R2 = yBAx xxxx | |||
LDQ_U | R1, X(R11) | ; Ignores va<2:0>, R1 = yBAx xxxx | |||
INSWH | R5, R6, R4 | ; R4 = | 0000 | 0000 | |
INSWL | R5, R6, R3 | ; R3 = | 0BA0 0000 | ||
MSKWH | R2, R6, R2 | ; R2 | = | yBAx xxxx | |
MSKWL | R1, R6, R1 | ; R1 | = | y00x xxxx | |
OR | R2, R4, R2 | ; R2 | = | yBAx xxxx | |
OR | R1, R3, R1 | ; R1 | = | yBAx xxxx | |
STQ_U | R2, X+1(R11) | ; Must store high then low for | |||
STQ_U | R1, X(R11) | ; degenerate case of aligned |
For software that is not designed to use the BWX extension, the intended sequence for storing a byte R5 at X is:
LDA | R6, X(R11) | ; R6<2:0> = (X mod 8) = 5 | |
LDQ_U | R1, X(R11) | ; Ignores va<2:0>, R1 = yyAx xxxx | |
INSBL | R5, R6, R3 | ; R3 | = 00A0 0000 |
MSKBL | R1, R6, R1 | ; R1 | = yy0x xxxx |
OR | R1, R3, R1 | ; R1 | = yyAx xxxx |
STQ_U | R1, X(R11) | ; |
|
Instruction Descriptions