From: Richard Sandiford Date: Tue, 15 Nov 2016 18:30:31 +0000 (+0000) Subject: Fix instances of gen_rtx_REG (VOIDmode, ...) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=240930c41f1fe616923083ca2ef0d21b3a075017;p=gcc.git Fix instances of gen_rtx_REG (VOIDmode, ...) Several definitions of INCOMING_RETURN_ADDR_RTX used gen_rtx_REG (VOIDmode, ...), which with later patches would trip an assert. This patch converts them to use Pmode instead. gcc/ 2016-11-15 Richard Sandiford Alan Hayward David Sherwood * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use Pmode instead of VOIDmode. * config/ia64/ia64.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/iq2000/iq2000.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/m68k/m68k.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/microblaze/microblaze.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/mips/mips.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/mn10300/mn10300.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/nios2/nios2.h (INCOMING_RETURN_ADDR_RTX): Likewise. Co-Authored-By: Alan Hayward Co-Authored-By: David Sherwood From-SVN: r242447 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd61f70413e..fa71c3b135e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2016-11-15 Richard Sandiford + Alan Hayward + David Sherwood + + * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use Pmode instead + of VOIDmode. + * config/ia64/ia64.h (INCOMING_RETURN_ADDR_RTX): Likewise. + * config/iq2000/iq2000.h (INCOMING_RETURN_ADDR_RTX): Likewise. + * config/m68k/m68k.h (INCOMING_RETURN_ADDR_RTX): Likewise. + * config/microblaze/microblaze.h (INCOMING_RETURN_ADDR_RTX): Likewise. + * config/mips/mips.h (INCOMING_RETURN_ADDR_RTX): Likewise. + * config/mn10300/mn10300.h (INCOMING_RETURN_ADDR_RTX): Likewise. + * config/nios2/nios2.h (INCOMING_RETURN_ADDR_RTX): Likewise. + 2016-11-15 Richard Sandiford Alan Hayward David Sherwood diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index add7a64778f..fdaf423513d 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2176,7 +2176,7 @@ extern int const x86_64_ms_sysv_extra_clobbered_registers[12]; /* Before the prologue, RA is at 0(%esp). */ #define INCOMING_RETURN_ADDR_RTX \ - gen_rtx_MEM (VOIDmode, gen_rtx_REG (VOIDmode, STACK_POINTER_REGNUM)) + gen_rtx_MEM (Pmode, gen_rtx_REG (Pmode, STACK_POINTER_REGNUM)) /* After the prologue, RA is at -4(AP) in the current frame. */ #define RETURN_ADDR_RTX(COUNT, FRAME) \ diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index ac0cb864209..c79e20b8660 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -896,7 +896,7 @@ enum reg_class RTL is either a `REG', indicating that the return value is saved in `REG', or a `MEM' representing a location in the stack. This enables DWARF2 unwind info for C++ EH. */ -#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, BR_REG (0)) +#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, BR_REG (0)) /* A C expression whose value is an integer giving the offset, in bytes, from the value of the stack pointer register to the top of the stack frame at the diff --git a/gcc/config/iq2000/iq2000.h b/gcc/config/iq2000/iq2000.h index 3b9dceb6904..e79c9a744f2 100644 --- a/gcc/config/iq2000/iq2000.h +++ b/gcc/config/iq2000/iq2000.h @@ -258,7 +258,7 @@ enum reg_class : (rtx) 0) /* Before the prologue, RA lives in r31. */ -#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, GP_REG_FIRST + 31) +#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, GP_REG_FIRST + 31) /* Register That Address the Stack Frame. */ diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 2aa858fa23b..7b63bd2e773 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -768,7 +768,7 @@ do { if (cc_prev_status.flags & CC_IN_68881) \ /* Before the prologue, RA is at 0(%sp). */ #define INCOMING_RETURN_ADDR_RTX \ - gen_rtx_MEM (VOIDmode, gen_rtx_REG (VOIDmode, STACK_POINTER_REGNUM)) + gen_rtx_MEM (Pmode, gen_rtx_REG (Pmode, STACK_POINTER_REGNUM)) /* After the prologue, RA is at 4(AP) in the current frame. */ #define RETURN_ADDR_RTX(COUNT, FRAME) \ diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h index dbfb6522c7c..849fab9353f 100644 --- a/gcc/config/microblaze/microblaze.h +++ b/gcc/config/microblaze/microblaze.h @@ -182,7 +182,7 @@ extern enum pipeline_type microblaze_pipe; NOTE: GDB has a workaround and expects this incorrect value. If this is fixed, a corresponding fix to GDB is needed. */ #define INCOMING_RETURN_ADDR_RTX \ - gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM) + gen_rtx_REG (Pmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM) /* Use DWARF 2 debugging information by default. */ #define DWARF2_DEBUGGING_INFO diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 81862a97f45..12662a7ea39 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1469,7 +1469,7 @@ FP_ASM_SPEC "\ #define DWARF_FRAME_RETURN_COLUMN RETURN_ADDR_REGNUM /* Before the prologue, RA lives in r31. */ -#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, RETURN_ADDR_REGNUM) +#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, RETURN_ADDR_REGNUM) /* Describe how we implement __builtin_eh_return. */ #define EH_RETURN_DATA_REGNO(N) \ diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h index 714c6a0f900..9fd3d4be38b 100644 --- a/gcc/config/mn10300/mn10300.h +++ b/gcc/config/mn10300/mn10300.h @@ -516,7 +516,7 @@ struct cum_arg /* The return address is saved both in the stack and in MDR. Using the stack location is handiest for what unwinding needs. */ #define INCOMING_RETURN_ADDR_RTX \ - gen_rtx_MEM (VOIDmode, gen_rtx_REG (VOIDmode, STACK_POINTER_REGNUM)) + gen_rtx_MEM (Pmode, gen_rtx_REG (Pmode, STACK_POINTER_REGNUM)) /* Maximum number of registers that can appear in a valid memory address. */ diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h index abc676f4249..e539c8f49bc 100644 --- a/gcc/config/nios2/nios2.h +++ b/gcc/config/nios2/nios2.h @@ -265,7 +265,7 @@ enum reg_class #define FIRST_PARM_OFFSET(FUNDECL) 0 /* Before the prologue, RA lives in r31. */ -#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, RA_REGNO) +#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, RA_REGNO) #define RETURN_ADDR_RTX(C,F) nios2_get_return_address (C) #define DWARF_FRAME_RETURN_COLUMN RA_REGNO