| Submitter | Nick Clifton |
|---|---|
| Date | Jan. 28, 2013, 10:06 a.m. |
| Message ID | <87k3qxhbaf.fsf@redhat.com> |
| Download | mbox | patch |
| Permalink | /patch/216152/ |
| State | New |
| Headers | show |
Comments
> 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!
Patch
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);