Commit 34425025 by Chung-Ju Wu Committed by Chung-Ju Wu

[NDS32] Look into LO_SUM's operand to determine whether it is a valid address.

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
parent 47e0e7d2
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
vaarg_p argument and create correct CFI info.
(nds32_expand_prologue): Pass true or false to
......@@ -2041,8 +2041,14 @@ nds32_legitimate_address_p (machine_mode mode, rtx x, bool strict)
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment