diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2016-10-27 16:13:19 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2016-10-27 16:13:19 +0000 |
commit | 959c1e20455870ffb01ec67d50b88918a74e9e85 (patch) | |
tree | c7d0815bffb9c7fe33a7b4744bbf7c0bef22a000 | |
parent | 93f90bec31ba60f78a1242fe2c3544c1d7ac3469 (diff) | |
download | gcc-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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/builtins.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 73d3004..ce103ab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-10-27 Aldy Hernandez <aldyh@redhat.com> + + * builtins.c (expand_builtin_nonlocal_goto): Avoid evaluating + PIC_OFFSET_TABLE_REGNUM twice. + 2016-10-27 Bin Cheng <bin.cheng@arm.com> * match.pd ((convert (op:s (convert@2 @0) (convert?@3 @1)))): Add 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); |