+2020-04-13 Jozef Lawrynowicz <jozef.l@mittosystems.com>
+
+ * config/msp430/msp430.c (msp430_print_operand): Don't add offsets to
+ memory references in %B, %C and %D operand selectors when the inner
+ operand is a post increment address.
+
2020-04-13 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.c (msp430_print_operand): Offset a %C memory
switch (GET_CODE (op))
{
case MEM:
- op = adjust_address (op, Pmode, 2);
+ /* We don't need to adjust the address for post_inc. */
+ op = adjust_address (op, Pmode,
+ (GET_CODE (XEXP (op, 0)) == POST_INC) ? 0 : 2);
break;
case REG:
op = gen_rtx_REG (Pmode, REGNO (op) + 1);
switch (GET_CODE (op))
{
case MEM:
- op = adjust_address (op, Pmode, 4);
+ op = adjust_address (op, Pmode,
+ (GET_CODE (XEXP (op, 0)) == POST_INC) ? 0 : 4);
break;
case REG:
op = gen_rtx_REG (Pmode, REGNO (op) + 2);
switch (GET_CODE (op))
{
case MEM:
- op = adjust_address (op, Pmode, 6);
+ op = adjust_address (op, Pmode,
+ (GET_CODE (XEXP (op, 0)) == POST_INC) ? 0 : 6);
break;
case REG:
op = gen_rtx_REG (Pmode, REGNO (op) + 3);