+2018-02-01 Renlin Li <renlin.li@arm.com>
+
+ PR target/83370
+ * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
+ TAILCALL_ADDR_REGS.
+ (aarch64_register_move_cost): Likewise.
+ * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
+ TAILCALL_ADDR_REGS.
+ (REG_CLASS_NAMES): Likewise.
+ (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
+ TAILCALL_ADDR_REGS. Remove IP registers.
+ * config/aarch64/aarch64.md (Ucs): Update register constraint.
+
2018-02-01 Richard Biener <rguenther@suse.de>
* domwalk.h (dom_walker::dom_walker): Add additional constructor
unsigned int nregs;
switch (regclass)
{
- case CALLER_SAVE_REGS:
+ case TAILCALL_ADDR_REGS:
case POINTER_REGS:
case GENERAL_REGS:
case ALL_REGS:
= aarch64_tune_params.regmove_cost;
/* Caller save and pointer regs are equivalent to GENERAL_REGS. */
- if (to == CALLER_SAVE_REGS || to == POINTER_REGS)
+ if (to == TAILCALL_ADDR_REGS || to == POINTER_REGS)
to = GENERAL_REGS;
- if (from == CALLER_SAVE_REGS || from == POINTER_REGS)
+ if (from == TAILCALL_ADDR_REGS || from == POINTER_REGS)
from = GENERAL_REGS;
/* Moving between GPR and stack cost is the same as GP2GP. */
enum reg_class
{
NO_REGS,
- CALLER_SAVE_REGS,
+ TAILCALL_ADDR_REGS,
GENERAL_REGS,
STACK_REG,
POINTER_REGS,
#define REG_CLASS_NAMES \
{ \
"NO_REGS", \
- "CALLER_SAVE_REGS", \
+ "TAILCALL_ADDR_REGS", \
"GENERAL_REGS", \
"STACK_REG", \
"POINTER_REGS", \
#define REG_CLASS_CONTENTS \
{ \
{ 0x00000000, 0x00000000, 0x00000000 }, /* NO_REGS */ \
- { 0x0007ffff, 0x00000000, 0x00000000 }, /* CALLER_SAVE_REGS */ \
+ { 0x0004ffff, 0x00000000, 0x00000000 }, /* TAILCALL_ADDR_REGS */\
{ 0x7fffffff, 0x00000000, 0x00000003 }, /* GENERAL_REGS */ \
{ 0x80000000, 0x00000000, 0x00000000 }, /* STACK_REG */ \
{ 0xffffffff, 0x00000000, 0x00000003 }, /* POINTER_REGS */ \
(define_register_constraint "k" "STACK_REG"
"@internal The stack register.")
-(define_register_constraint "Ucs" "CALLER_SAVE_REGS"
- "@internal The caller save registers.")
+(define_register_constraint "Ucs" "TAILCALL_ADDR_REGS"
+ "@internal Registers suitable for an indirect tail call")
(define_register_constraint "w" "FP_REGS"
"Floating point and SIMD vector registers.")
+2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR target/83370
+ * gcc.target/aarch64/pr83370.c: New.
+
2018-02-01 Richard Biener <rguenther@suse.de>
* gcc.dg/graphite/pr35356-1.c: Adjust.
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+typedef void (*fun) (void);
+
+void __attribute__ ((noipa))
+f (fun x1)
+{
+ register fun x2 asm ("x16");
+ int arr[5000];
+ int *volatile ptr = arr;
+ asm ("mov %0, %1" : "=r" (x2) : "r" (x1));
+ x2 ();
+}
+
+void g (void) {}
+
+int
+main (void)
+{
+ f (g);
+}