aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2018-02-10 23:15:53 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2018-02-10 23:15:53 +0000
commit123eaa467145a5a5749aba150e07cf254fd8c69a (patch)
treef85c1341c8a68eeabe3aa7bd266b220ce0f2f099 /gcc
parent950ab3f1419619d6e4bec7d2f029b9aff00813e9 (diff)
downloadgcc-123eaa467145a5a5749aba150e07cf254fd8c69a.zip
gcc-123eaa467145a5a5749aba150e07cf254fd8c69a.tar.gz
gcc-123eaa467145a5a5749aba150e07cf254fd8c69a.tar.bz2
pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as function label.
* config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as function label. From-SVN: r257554
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/pa/pa.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9e4682e..677c316 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2018-02-10 John David Anglin <danglin@gcc.gnu.org>
+
+ * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
+ function label.
+
2018-02-10 Alan Modra <amodra@gmail.com>
PR target/84300
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 0809a79..13d5777 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -4578,13 +4578,17 @@ hppa_profile_hook (int label_no)
lcla2 and load_offset_label_address insn patterns. */
rtx reg = gen_reg_rtx (SImode);
rtx_code_label *label_rtx = gen_label_rtx ();
- rtx mcount = gen_rtx_MEM (Pmode, gen_rtx_SYMBOL_REF (Pmode, "_mcount"));
int reg_parm_stack_space = REG_PARM_STACK_SPACE (NULL_TREE);
- rtx arg_bytes, begin_label_rtx;
+ rtx arg_bytes, begin_label_rtx, mcount, sym;
rtx_insn *call_insn;
char begin_label_name[16];
bool use_mcount_pcrel_call;
+ /* Set up call destination. */
+ sym = gen_rtx_SYMBOL_REF (Pmode, "_mcount");
+ pa_encode_label (sym);
+ mcount = gen_rtx_MEM (Pmode, sym);
+
/* If we can reach _mcount with a pc-relative call, we can optimize
loading the address of the current function. This requires linker
long branch stub support. */