Commit 93c75052 by Chung-Ju Wu Committed by Chung-Ju Wu

[NDS32] Have nds32_spilt_doubleword to split POST_INC.

gcc/
	* config/nds32/nds32-md-auxiliary.c (nds32_spilt_doubleword): Support
	to split POST_INC.

From-SVN: r268738
parent 22cdea54
2019-02-10 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-md-auxiliary.c (nds32_spilt_doubleword): Support
to split POST_INC.
2019-02-09 Jan Hubicka <hubicka@ucw.cz>
* ipa-visibility.c (localize_node): Also do not localize
......
......@@ -3163,16 +3163,30 @@ nds32_spilt_doubleword (rtx *operands, bool load_p)
/* generate low_part and high_part memory format:
low_part: (post_modify ((reg) (plus (reg) (const 4)))
high_part: (post_modify ((reg) (plus (reg) (const -12))) */
low_part[mem] = gen_frame_mem (SImode,
gen_rtx_POST_MODIFY (Pmode, sub_mem,
gen_rtx_PLUS (Pmode,
sub_mem,
GEN_INT (4))));
high_part[mem] = gen_frame_mem (SImode,
gen_rtx_POST_MODIFY (Pmode, sub_mem,
gen_rtx_PLUS (Pmode,
sub_mem,
GEN_INT (-12))));
low_part[mem] = gen_rtx_MEM (SImode,
gen_rtx_POST_MODIFY (Pmode, sub_mem,
gen_rtx_PLUS (Pmode,
sub_mem,
GEN_INT (4))));
high_part[mem] = gen_rtx_MEM (SImode,
gen_rtx_POST_MODIFY (Pmode, sub_mem,
gen_rtx_PLUS (Pmode,
sub_mem,
GEN_INT (-12))));
}
else if (GET_CODE (sub_mem) == POST_INC)
{
/* memory format is (post_inc (reg)),
so that extract (reg) from the (post_inc (reg)) pattern. */
sub_mem = XEXP (sub_mem, 0);
/* generate low_part and high_part memory format:
low_part: (post_inc (reg))
high_part: (post_inc (reg)) */
low_part[mem] = gen_rtx_MEM (SImode,
gen_rtx_POST_INC (Pmode, sub_mem));
high_part[mem] = gen_rtx_MEM (SImode,
gen_rtx_POST_INC (Pmode, sub_mem));
}
else if (GET_CODE (sub_mem) == POST_MODIFY)
{
......@@ -3189,14 +3203,14 @@ nds32_spilt_doubleword (rtx *operands, bool load_p)
/* Generate low_part and high_part memory format:
low_part: (post_modify ((reg) (plus (reg) (const)))
high_part: ((plus (reg) (const 4))) */
low_part[mem] = gen_frame_mem (SImode,
gen_rtx_POST_MODIFY (Pmode, post_mem,
gen_rtx_PLUS (Pmode,
post_mem,
post_val)));
high_part[mem] = gen_frame_mem (SImode, plus_constant (Pmode,
post_mem,
4));
low_part[mem] = gen_rtx_MEM (SImode,
gen_rtx_POST_MODIFY (Pmode, post_mem,
gen_rtx_PLUS (Pmode,
post_mem,
post_val)));
high_part[mem] = gen_rtx_MEM (SImode, plus_constant (Pmode,
post_mem,
4));
}
else
{
......
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