summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/z_Linux_asm.s
diff options
context:
space:
mode:
authorAndrey Churbanov <Andrey.Churbanov@intel.com>2015-04-29 16:42:24 +0000
committerAndrey Churbanov <Andrey.Churbanov@intel.com>2015-04-29 16:42:24 +0000
commitd7d088f815f53f403505e3ea64858376cbc6a0c3 (patch)
treeab580416a0d1a9b2e8a3340300d577b8729917ae /openmp/runtime/src/z_Linux_asm.s
parent9dd4e4e63a53813ba519281ec5c35e678b837d5d (diff)
downloadbcm5719-llvm-d7d088f815f53f403505e3ea64858376cbc6a0c3.tar.gz
bcm5719-llvm-d7d088f815f53f403505e3ea64858376cbc6a0c3.zip
These are the actual changes in the runtime to issue OMPT-related functions. All of them are surrounded by #if OMPT_SUPPORT and can be disabled (which is the default).
llvm-svn: 236122
Diffstat (limited to 'openmp/runtime/src/z_Linux_asm.s')
-rw-r--r--openmp/runtime/src/z_Linux_asm.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/openmp/runtime/src/z_Linux_asm.s b/openmp/runtime/src/z_Linux_asm.s
index c33c817bf48..ebbd18f0075 100644
--- a/openmp/runtime/src/z_Linux_asm.s
+++ b/openmp/runtime/src/z_Linux_asm.s
@@ -598,6 +598,12 @@ __kmp_unnamed_critical_addr:
// temp: -8(%ebp)
//
pushl %ebx // save %ebx to use during this routine
+ //
+#if OMPT_SUPPORT
+ movl 28(%ebp),%ebx // get exit_frame address
+ movl %ebp,(%ebx) // save exit_frame
+#endif
+
movl 20(%ebp),%ebx // Stack alignment - # args
addl $2,%ebx // #args +2 Always pass at least 2 args (gtid and tid)
shll $2,%ebx // Number of bytes used on stack: (#args+2)*4
@@ -1221,6 +1227,7 @@ KMP_LABEL(invoke_3):
// %edx: tid
// %ecx: argc
// %r8: p_argv
+// %r9: &exit_frame
//
// locals:
// __gtid: gtid parm pushed on stack so can pass &gtid to pkfn
@@ -1250,6 +1257,11 @@ __tid = -24
KMP_CFI_OFFSET rbp,-16
movq %rsp,%rbp // establish the base pointer for this routine.
KMP_CFI_REGISTER rbp
+
+#if OMPT_SUPPORT
+ movq %rbp, (%r9) // save exit_frame
+#endif
+
pushq %rbx // %rbx is callee-saved register
pushq %rsi // Put gtid on stack so can pass &tgid to pkfn
pushq %rdx // Put tid on stack so can pass &tid to pkfn
OpenPOWER on IntegriCloud