From: Richard Sandiford Date: Tue, 19 May 2015 07:10:15 +0000 (+0000) Subject: caller-save.c (init_caller_save): Use word_mode and FIRST_PSEUDO_REGISTER when creati... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d2446b1ed3a1b5342eebc4bc6da93740c400428;p=gcc.git caller-save.c (init_caller_save): Use word_mode and FIRST_PSEUDO_REGISTER when creating temporary rtxes. gcc/ * caller-save.c (init_caller_save): Use word_mode and FIRST_PSEUDO_REGISTER when creating temporary rtxes. * expr.c (init_expr_target): Likewise. * ira.c (setup_prohibited_mode_move_regs): Likewise. * postreload.c (reload_cse_regs_1): Likewise. From-SVN: r223340 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac4591dcfe4..f2ce42bd115 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-05-19 Richard Sandiford + + * caller-save.c (init_caller_save): Use word_mode and + FIRST_PSEUDO_REGISTER when creating temporary rtxes. + * expr.c (init_expr_target): Likewise. + * ira.c (setup_prohibited_mode_move_regs): Likewise. + * postreload.c (reload_cse_regs_1): Likewise. + 2015-05-19 Richard Sandiford * rtl.def (REG): Change format to "r". diff --git a/gcc/caller-save.c b/gcc/caller-save.c index 923cfa1d277..fcc36488bca 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -287,8 +287,8 @@ init_caller_save (void) To avoid lots of unnecessary RTL allocation, we construct all the RTL once, then modify the memory and register operands in-place. */ - test_reg = gen_rtx_REG (VOIDmode, 0); - test_mem = gen_rtx_MEM (VOIDmode, address); + test_reg = gen_rtx_REG (word_mode, FIRST_PSEUDO_REGISTER); + test_mem = gen_rtx_MEM (word_mode, address); savepat = gen_rtx_SET (test_mem, test_reg); restpat = gen_rtx_SET (test_reg, test_mem); diff --git a/gcc/expr.c b/gcc/expr.c index 6694fc184d4..80e6350d2d5 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -202,12 +202,12 @@ init_expr_target (void) /* Try indexing by frame ptr and try by stack ptr. It is known that on the Convex the stack ptr isn't a valid index. With luck, one or the other is valid on any machine. */ - mem = gen_rtx_MEM (VOIDmode, stack_pointer_rtx); - mem1 = gen_rtx_MEM (VOIDmode, frame_pointer_rtx); + mem = gen_rtx_MEM (word_mode, stack_pointer_rtx); + mem1 = gen_rtx_MEM (word_mode, frame_pointer_rtx); /* A scratch register we can modify in-place below to avoid useless RTL allocations. */ - reg = gen_rtx_REG (VOIDmode, -1); + reg = gen_rtx_REG (word_mode, FIRST_PSEUDO_REGISTER); insn = rtx_alloc (INSN); pat = gen_rtx_SET (NULL_RTX, NULL_RTX); diff --git a/gcc/ira.c b/gcc/ira.c index a4108872c28..0c7c6ac1f29 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -1767,8 +1767,8 @@ setup_prohibited_mode_move_regs (void) if (ira_prohibited_mode_move_regs_initialized_p) return; ira_prohibited_mode_move_regs_initialized_p = true; - test_reg1 = gen_rtx_REG (VOIDmode, 0); - test_reg2 = gen_rtx_REG (VOIDmode, 0); + test_reg1 = gen_rtx_REG (word_mode, FIRST_PSEUDO_REGISTER); + test_reg2 = gen_rtx_REG (word_mode, FIRST_PSEUDO_REGISTER); move_pat = gen_rtx_SET (test_reg1, test_reg2); move_insn = gen_rtx_INSN (VOIDmode, 0, 0, 0, move_pat, 0, -1, 0); for (i = 0; i < NUM_MACHINE_MODES; i++) diff --git a/gcc/postreload.c b/gcc/postreload.c index e2790ee9ed7..a0026db0f50 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -234,7 +234,7 @@ reload_cse_regs_1 (void) bool cfg_changed = false; basic_block bb; rtx_insn *insn; - rtx testreg = gen_rtx_REG (VOIDmode, -1); + rtx testreg = gen_rtx_REG (word_mode, FIRST_PSEUDO_REGISTER); cselib_init (CSELIB_RECORD_MEMORY); init_alias_analysis ();