Currently, the operators for post-incremented or offset source operands
associated with various memory access instructions are separators
rather than components of the operand. As a result, inferred references
split the register and the operator when rendered in the listing, making
it easy to overlook the operator. For example:
lpm R0,Z=>DAT_code_000455+
This patch mimics logic already in place for the st and std
instructions, which include the post-increment operator or offset as
part of the operand. For example:
st X+=>DAT_mem_0100,R0
When Z & 0x1 == 1, the dereferenced data must be right-shifted 8 bits
before assigning val:1 to the target register.
When Z & 0x0 == 0, val:1 is assigned to the target register straight
away.
In short, we can reduce these conditions to:
tmp:2 = *[code]:2 (ptr >> 1);
val:2 = (tmp >> (8 * (Z & 0x1)));
R0 = val:1;
NOTE: Author's original commit was modified to address conflicts and a necessary rebase. -ryanmkurtz