+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,
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))
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), \