Commit 9259db42 by Yufeng Zhang Committed by Yufeng Zhang

[AArch64, ILP32] 6/6 Add support for "wsp" register.

gcc/

	* config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Also return
	true for SP_REGNUM if mode == ptr_mode.
	* config/aarch64/aarch64.h (ADDITIONAL_REGISTER_NAMES): Add "wsp"
	with value R0_REGNUM + 31.

From-SVN: r201170
parent 407a0fa3
2013-07-23 Yufeng Zhang <yufeng.zhang@arm.com>
* config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Also return
true for SP_REGNUM if mode == ptr_mode.
* config/aarch64/aarch64.h (ADDITIONAL_REGISTER_NAMES): Add "wsp"
with value R0_REGNUM + 31.
2013-07-23 Yufeng Zhang <yufeng.zhang@arm.com>
* config/aarch64/aarch64.c (aarch64_pad_arg_upward): In big-endian,
pad pointer-typed argument downward.
......
......@@ -382,8 +382,13 @@ aarch64_hard_regno_mode_ok (unsigned regno, enum machine_mode mode)
if (GET_MODE_CLASS (mode) == MODE_CC)
return regno == CC_REGNUM;
if (regno == SP_REGNUM || regno == FRAME_POINTER_REGNUM
|| regno == ARG_POINTER_REGNUM)
if (regno == SP_REGNUM)
/* The purpose of comparing with ptr_mode is to support the
global register variable associated with the stack pointer
register via the syntax of asm ("wsp") in ILP32. */
return mode == Pmode || mode == ptr_mode;
if (regno == FRAME_POINTER_REGNUM || regno == ARG_POINTER_REGNUM)
return mode == Pmode;
if (GP_REGNUM_P (regno) && ! aarch64_vect_struct_mode_p (mode))
......
......@@ -278,7 +278,7 @@ extern unsigned long aarch64_tune_flags;
R_ALIASES(16), R_ALIASES(17), R_ALIASES(18), R_ALIASES(19), \
R_ALIASES(20), R_ALIASES(21), R_ALIASES(22), R_ALIASES(23), \
R_ALIASES(24), R_ALIASES(25), R_ALIASES(26), R_ALIASES(27), \
R_ALIASES(28), R_ALIASES(29), R_ALIASES(30), /* 31 omitted */ \
R_ALIASES(28), R_ALIASES(29), R_ALIASES(30), {"wsp", R0_REGNUM + 31}, \
V_ALIASES(0), V_ALIASES(1), V_ALIASES(2), V_ALIASES(3), \
V_ALIASES(4), V_ALIASES(5), V_ALIASES(6), V_ALIASES(7), \
V_ALIASES(8), V_ALIASES(9), V_ALIASES(10), V_ALIASES(11), \
......
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