public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RFA: RL78: Allow SP to be used as a base register
@ 2013-01-28 10:10 Nick Clifton
  2013-01-28 18:35 ` DJ Delorie
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Clifton @ 2013-01-28 10:10 UTC (permalink / raw)
  To: dj; +Cc: gcc-patches

Hi DJ,

  Please may I apply the patch below.  It fixes the RL78 backend so that
  the stack register can be used as a base address register.

  Tested with no regressions on an rl78-elf toolchain.

Cheers
  Nick

PS.  I am currently investigating allow r8-r15 to be used as base
registers.

gcc/ChangeLog
2013-01-28  Nick Clifton  <nickc@redhat.com>

	* config/rl78/rl78.c (rl78_regno_mode_code_ok_for_base_p): Allow
	SP_REG. 

Index: gcc/config/rl78/rl78.c
===================================================================
--- gcc/config/rl78/rl78.c	(revision 195461)
+++ gcc/config/rl78/rl78.c	(working copy)
@@ -769,7 +769,7 @@
 				    addr_space_t address_space ATTRIBUTE_UNUSED,
 				    int outer_code ATTRIBUTE_UNUSED, int index_code)
 {
-  if (regno < 24 && regno >= 16)
+  if (regno <= SP_REG && regno >= 16)
     return true;
   if (index_code == REG)
     return (regno == HL_REG);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RFA: RL78: Allow SP to be used as a base register
  2013-01-28 10:10 RFA: RL78: Allow SP to be used as a base register Nick Clifton
@ 2013-01-28 18:35 ` DJ Delorie
  0 siblings, 0 replies; 2+ messages in thread
From: DJ Delorie @ 2013-01-28 18:35 UTC (permalink / raw)
  To: Nick Clifton; +Cc: gcc-patches


>   Please may I apply the patch below.  It fixes the RL78 backend so that
>   the stack register can be used as a base address register.

Yes, please.  Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-28 18:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-28 10:10 RFA: RL78: Allow SP to be used as a base register Nick Clifton
2013-01-28 18:35 ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).