summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-29 09:00:35 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-29 09:00:35 +0000
commitf716766f09e4b0979da21017af1aed99069f85ca (patch)
treeacf96cd30ed20d2a680a8f694b50c01883d9a371 /gcc
parenta4a43c62219e4b016382658fc1715879fed521ab (diff)
downloadgcc-f716766f09e4b0979da21017af1aed99069f85ca.tar.gz
* config/rl78/rl78.c (rl78_regno_mode_code_ok_for_base_p): Allow
SP_REG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195530 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rl78/rl78.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2b2e540819e..bf77fb0d1d0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-29 Nick Clifton <nickc@redhat.com>
+
+ * config/rl78/rl78.c (rl78_regno_mode_code_ok_for_base_p): Allow
+ SP_REG.
+
2013-01-28 Leif Ekblad <leif@rdos.net>
* config.gcc (i[34567]86-*-rdos*, x86_64-*-rdos*): New targets.
diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index ff8fd78eb9d..895d7db9a44 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -769,7 +769,7 @@ rl78_regno_mode_code_ok_for_base_p (int regno, enum machine_mode mode ATTRIBUTE_
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);