PERFORCE change 29958 for review
Juli Mallett
jmallett at FreeBSD.org
Mon Apr 28 11:38:09 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=29958
Change 29958 by jmallett at jmallett_dalek on 2003/04/28 11:37:37
Support macros for NetBSD.
Affected files ...
.. //depot/projects/mips/sys/mips/include/asm.h#6 edit
Differences ...
==== //depot/projects/mips/sys/mips/include/asm.h#6 (text+ko) ====
@@ -74,14 +74,24 @@
#define _LEAF(x) \
.globl x; .ent x; x: ; .frame sp, 0, ra;
+#define _EXPORT(x) \
+ .globl x; x:
+
#define _END(x) \
.end x
+#define _NESTED(x, fsize, retpc) \
+ .globl x; .ent x; x:; .frame sp, fsize, retpc;
+
#define GLOBAL(y) _GLOBAL(CNAME(y))
#define ENTRY(y) _ENTRY(CNAME(y)); _PROF_PROLOGUE
-#define XLEAF(y) _XLEAF(CNAME(y));
+#define XLEAF(y) _XLEAF(CNAME(y))
#define LEAF(y) _LEAF(CNAME(y)); _PROF_PROLOGUE
+#define LEAF_NOPROFILE(y) _LEAF(CNAME(y))
+#define EXPORT(y) _EXPORT(CNAME(y))
#define END(y) _END(CNAME(y))
+#define NESTED(y,f,r) _NESTED(CNAME(y), f, r); _PROF_PROLOGUE
+#define NESTED_NOPROFILE(y,f,r) _NESTED(CNAME(y), f, r)
#define ASMSTR .asciz
@@ -106,6 +116,26 @@
#endif /* __STDC__ */
/*
+ * Macros to panic and printf from assembly language.
+ */
+#define PANIC(msg) \
+ la a0, 9f; \
+ jal _C_LABEL(panic); \
+ nop; \
+ MSG(msg)
+
+#define PRINTF(msg) \
+ la a0, 9f; \
+ jal _C_LABEL(printf); \
+ nop; \
+ MSG(msg)
+
+#define MSG(msg) \
+ .rdata; \
+9: .asciiz msg; \
+ .text
+
+/*
* standard callframe {
* register_t cf_args[4]; arg0 - arg3
* register_t cf_sp; frame pointer
More information about the p4-projects
mailing list