aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2016-10-27 16:13:19 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2016-10-27 16:13:19 +0000
commit959c1e20455870ffb01ec67d50b88918a74e9e85 (patch)
treec7d0815bffb9c7fe33a7b4744bbf7c0bef22a000 /gcc/builtins.c
parent93f90bec31ba60f78a1242fe2c3544c1d7ac3469 (diff)
downloadgcc-959c1e20455870ffb01ec67d50b88918a74e9e85.zip
gcc-959c1e20455870ffb01ec67d50b88918a74e9e85.tar.gz
gcc-959c1e20455870ffb01ec67d50b88918a74e9e85.tar.bz2
builtins.c (expand_builtin_nonlocal_goto): Avoid evaluating PIC_OFFSET_TABLE_REGNUM twice.
* builtins.c (expand_builtin_nonlocal_goto): Avoid evaluating PIC_OFFSET_TABLE_REGNUM twice. From-SVN: r241625
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 997c0e8..cc711a0 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -1140,8 +1140,8 @@ expand_builtin_nonlocal_goto (tree exp)
to targets with a nonlocal_goto pattern; they are free
to implement it in their own way. Note also that this is
a no-op if the GP register is a global invariant.) */
- if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
- && fixed_regs[PIC_OFFSET_TABLE_REGNUM])
+ unsigned regnum = PIC_OFFSET_TABLE_REGNUM;
+ if (regnum != INVALID_REGNUM && fixed_regs[regnum])
emit_use (pic_offset_table_rtx);
emit_indirect_jump (r_label);