summaryrefslogtreecommitdiff
path: root/sys/arch/arc/include
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>1997-05-02 08:38:46 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>1997-05-02 08:38:46 +0000
commit5bf0012e01a85064ad686d1943c5db4202b2730a (patch)
tree7b2d4d5883a2e97830c1f60b0a6175c0dde683a3 /sys/arch/arc/include
parentbc76e956cbb98625c1f78603cc0873e5997e737f (diff)
One step towards working profiling
Diffstat (limited to 'sys/arch/arc/include')
-rw-r--r--sys/arch/arc/include/asm.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/sys/arch/arc/include/asm.h b/sys/arch/arc/include/asm.h
index 2a882d34eca..049ee04e0d3 100644
--- a/sys/arch/arc/include/asm.h
+++ b/sys/arch/arc/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.4 1996/08/26 10:54:54 pefo Exp $ */
+/* $OpenBSD: asm.h,v 1.5 1997/05/02 08:38:45 pefo Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -92,13 +92,19 @@
*/
#if defined(GPROF) || defined(PROF)
#define MCOUNT \
- .set noreorder; \
- .set noat; \
- move $1,$31; \
- jal _mcount; \
- subu sp,sp,8; \
+ subu sp, sp, 32; \
+ .cprestore 16; \
+ sw ra, 28(sp); \
+ sw gp, 24(sp); \
+ .set noat; \
+ .set noreorder; \
+ move AT, ra; \
+ jal _mcount; \
+ subu sp, sp, 8; \
+ lw ra, 28(sp); \
+ addu sp, sp, 32; \
.set reorder; \
- .set at;
+ .set at;
#else
#define MCOUNT
#endif