gcc/
* config/nds32/nds32.c (nds32_legitimate_address_p): For LO_SUM,
we need to look into its operand to determine whether it is a valid
address.
From-SVN: r217904
+2014-11-21 Chung-Ju Wu <jasonwucj@gmail.com>
+
+ * config/nds32/nds32.c (nds32_legitimate_address_p): For LO_SUM,
+ we need to look into its operand to determine if it is a valid
+ address.
+
2014-11-21 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_emit_stack_push_multiple): Add new
return false;
case LO_SUM:
- if (!TARGET_GP_DIRECT)
- return true;
+ /* (mem (lo_sum (reg) (symbol_ref))) */
+ /* (mem (lo_sum (reg) (const))) */
+ gcc_assert (REG_P (XEXP (x, 0)));
+ if (GET_CODE (XEXP (x, 1)) == SYMBOL_REF
+ || GET_CODE (XEXP (x, 1)) == CONST)
+ return nds32_legitimate_address_p (mode, XEXP (x, 1), strict);
+ else
+ return false;
default:
return false;