summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-09-02 20:30:14 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-09-02 20:30:14 +0000
commit3190571c334d57bae7417ab3c38667c5d7e12ec1 (patch)
tree1edfdd6a055d5c3074c2baaed6f2316e13f9145d /sys
parent40cbc6d357f8b1929379c22772d51dc1cac3786e (diff)
Make profiling actually work on hppa.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa/include/asm.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/sys/arch/hppa/include/asm.h b/sys/arch/hppa/include/asm.h
index 8c2997db31b..c5f9f9cefb1 100644
--- a/sys/arch/hppa/include/asm.h
+++ b/sys/arch/hppa/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.16 2010/10/01 05:02:19 guenther Exp $ */
+/* $OpenBSD: asm.h,v 1.17 2012/09/02 20:30:13 kettenis Exp $ */
/*
* Copyright (c) 1990,1991,1994 The University of Utah and
@@ -227,11 +227,25 @@ tf4 .reg %fr8
#ifdef PROF
#define _PROF_PROLOGUE !\
- stw rp, HPPA_FRAME_CRP(sr0,sp) !\
- ldil L%_mcount,r1 !\
- ble R%_mcount(sr0,r1) !\
- ldo HPPA_FRAME_SIZE(sp),sp !\
- ldw HPPA_FRAME_CRP(sr0,sp),rp
+1: !\
+ stw rp, HPPA_FRAME_CRP(sr0,sp) !\
+ stw arg0, HPPA_FRAME_ARG(0)(sr0,sp) !\
+ stw arg1, HPPA_FRAME_ARG(1)(sr0,sp) !\
+ stw arg2, HPPA_FRAME_ARG(2)(sr0,sp) !\
+ stw arg3, HPPA_FRAME_ARG(3)(sr0,sp) !\
+ ldo HPPA_FRAME_SIZE(sp), sp !\
+ copy rp, arg0 !\
+ bl 2f, arg1 !\
+ depi 0, 31, 2, arg1 !\
+2: !\
+ bl _mcount, rp !\
+ ldo 1b - 2b(arg1), arg1 !\
+ ldo -HPPA_FRAME_SIZE(sp), sp !\
+ ldw HPPA_FRAME_ARG(3)(sr0,sp), arg3 !\
+ ldw HPPA_FRAME_ARG(2)(sr0,sp), arg2 !\
+ ldw HPPA_FRAME_ARG(1)(sr0,sp), arg1 !\
+ ldw HPPA_FRAME_ARG(0)(sr0,sp), arg0 !\
+ ldw HPPA_FRAME_CRP(sr0,sp) ,rp
#else
#define _PROF_PROLOGUE
#endif