summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/include/asm.h
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1998-08-29 01:11:06 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1998-08-29 01:11:06 +0000
commit195a42fc1519ce4b248b47589d745cd333ebd397 (patch)
treef72ea66b7207be5f7821578c44570563e4bcc3ef /sys/arch/hppa/include/asm.h
parentb5dff1689d8ea7ea96c3d63d15396191745985ae (diff)
fix entry/exit macros
add profiling support s/ptov/hptmask/ fix comments
Diffstat (limited to 'sys/arch/hppa/include/asm.h')
-rw-r--r--sys/arch/hppa/include/asm.h59
1 files changed, 42 insertions, 17 deletions
diff --git a/sys/arch/hppa/include/asm.h b/sys/arch/hppa/include/asm.h
index 48dec59f33e..ecb52da9d7f 100644
--- a/sys/arch/hppa/include/asm.h
+++ b/sys/arch/hppa/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.2 1998/07/07 21:32:37 mickey Exp $ */
+/* $OpenBSD: asm.h,v 1.3 1998/08/29 01:11:05 mickey Exp $ */
/*
* Copyright (c) 1990,1991,1994 The University of Utah and
@@ -22,8 +22,11 @@
* Utah $Hdr: asm.h 1.8 94/12/14$
*/
+#ifndef _HPPA_ASM_H_
+#define _HPPA_ASM_H_
+
/*
- * hp800 assembler definitions
+ * hppa assembler definitions
*/
/*
@@ -162,7 +165,7 @@ isr .reg %cr20
ior .reg %cr21
ipsw .reg %cr22
eirr .reg %cr23
-ptov .reg %cr24
+hptmask .reg %cr24
tr0 .reg %cr24
vtop .reg %cr25
tr1 .reg %cr25
@@ -174,6 +177,16 @@ tr6 .reg %cr30
tr7 .reg %cr31
/*
+ * CPU-secific additional control registers
+ */
+#define dtlb_reg 8
+#define dtlb_size_even 26
+#define dtlb_size_odd 27
+#define itlb_reg 9
+#define itlb_size_even 24
+#define itlb_size_odd 25
+
+/*
* Calling Convention
*/
rp .reg %r2
@@ -225,7 +238,6 @@ tf4 .reg %fr8
/*
* Frame offsets to procedure status save and return areas
- * (should use genassym to get these offsets)
*/
#define FM_PSP -4
#define FM_EP -8
@@ -265,6 +277,12 @@ tf4 .reg %fr8
#define VA_ARG12 -FM_SIZE-52
#define VA_ARG13 -FM_SIZE-56
+#ifdef __STDC__
+#define __CONCAT(a,b) a ## b
+#else
+#define __CONCAT(a,b) a/**/b
+#endif
+
/*
* Standard space and subspace definitions.
*/
@@ -296,27 +314,34 @@ tf4 .reg %fr8
#ifdef PROF
-
-/* XXX need profiling versions */
-
+#define _PROF_PROLOGUE !\
+ stw rp, FM_CRP(sr0,sp) !\
+ ldil L%_mcount,r1 !\
+ ble R%_mcount(sr0,r1) !\
+ ldo FM_SIZE(sp),sp !\
+ ldw FM_CRP(sr0,sp),rp
#else
-#define ENTRY(x) \
-/**/ .space $TEXT$ !\
- .subspa $CODE$ !\
+#define _PROF_PROLOGUE
+#endif
+
+#define ENTRY(x) !\
+ .space $text$ !\
+ .subspa $code$ !\
.export x,entry !\
.label x !\
.proc !\
.callinfo no_calls !\
- .entry
+ .entry !\
+ _PROF_PROLOGUE
-#define ALTENTRY(x) \
-/**/ .export x,entry !\
+#define ALTENTRY(x) !\
+ .export x,entry !\
.label x
-#define EXIT(x) \
-/**/ bv,n r0(rp) !\
+#define EXIT(x) !\
+ bv,n r0(rp) !\
+ nop !\
.exit !\
.procend
-#endif
-
+#endif /* _HPPA_ASM_H_ */