summaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm.c
diff options
context:
space:
mode:
authordougkwan <dougkwan@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-25 07:18:01 +0000
committerdougkwan <dougkwan@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-25 07:18:01 +0000
commit3e0af6912be76613ebcfe22b17967a2a42d4397b (patch)
tree50dd6fbd4b2edde3d4062bcac20c1bb32f2d8b91 /gcc/config/arm/arm.c
parent95e9d9cdaae16c7f2852fa176b5ad0899096eb27 (diff)
downloadgcc-3e0af6912be76613ebcfe22b17967a2a42d4397b.tar.gz
2009-02-24 Julian Brown <julian@codesourcery.com>
PR target/35965 * config/arm/arm.c (require_pic_register): Only set cfun->machine->pic_reg once per function. Patch commited by Doug Kwan <dougkwan@google.com> git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144424 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r--gcc/config/arm/arm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index c25fc29e411..662e7de1e49 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3563,7 +3563,8 @@ require_pic_register (void)
gcc_assert (can_create_pseudo_p ());
if (arm_pic_register != INVALID_REGNUM)
{
- cfun->machine->pic_reg = gen_rtx_REG (Pmode, arm_pic_register);
+ if (!cfun->machine->pic_reg)
+ cfun->machine->pic_reg = gen_rtx_REG (Pmode, arm_pic_register);
/* Play games to avoid marking the function as needing pic
if we are being called as part of the cost-estimation
@@ -3575,7 +3576,8 @@ require_pic_register (void)
{
rtx seq;
- cfun->machine->pic_reg = gen_reg_rtx (Pmode);
+ if (!cfun->machine->pic_reg)
+ cfun->machine->pic_reg = gen_reg_rtx (Pmode);
/* Play games to avoid marking the function as needing pic
if we are being called as part of the cost-estimation