PERFORCE change 132343 for review
Warner Losh
imp at FreeBSD.org
Wed Jan 2 14:25:36 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=132343
Change 132343 by imp at imp_paco-paco on 2008/01/02 22:25:19
More asm macros.
Affected files ...
.. //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#5 edit
Differences ...
==== //depot/projects/mips2-jnpr/src/sys/mips/include/asm.h#5 (text+ko) ====
@@ -142,6 +142,59 @@
#endif /* __ELF__ */
/*
+ * These are temp registers whose names can be used in either the old
+ * or new ABI, although they map to different physical registers. In
+ * the old ABI, they map to t4-t7, and in the new ABI, they map to a4-a7.
+ *
+ * Because they overlap with the last 4 arg regs in the new ABI, ta0-ta3
+ * should be used only when we need more than t0-t3.
+ */
+#if defined(__mips_n32) || defined(__mips_n64)
+#define ta0 $8
+#define ta1 $9
+#define ta2 $10
+#define ta3 $11
+#else
+#define ta0 $12
+#define ta1 $13
+#define ta2 $14
+#define ta3 $15
+#endif /* __mips_n32 || __mips_n64 */
+
+#ifdef __ELF__
+# define _C_LABEL(x) x
+#else
+# ifdef __STDC__
+# define _C_LABEL(x) _ ## x
+# else
+# define _C_LABEL(x) _/**/x
+# endif
+#endif
+
+/*
+ * WEAK_ALIAS: create a weak alias.
+ */
+#define WEAK_ALIAS(alias,sym) \
+ .weak alias; \
+ alias = sym
+
+/*
+ * STRONG_ALIAS: create a strong alias.
+ */
+#define STRONG_ALIAS(alias,sym) \
+ .globl alias; \
+ alias = sym
+
+#define GLOBAL(sym) \
+ .globl sym; sym:
+
+#define ENTRY(sym) \
+ .text; .globl sym; .ent sym; sym:
+
+#define ASM_ENTRY(sym) \
+ .text; .globl sym; .type sym, at function; sym:
+
+/*
* LEAF
* A leaf routine does
* - call no other function,
More information about the p4-projects
mailing list