[patch 07/12] Sparc create asm.h

Mathieu Desnoyers
2009-09-24T14:42:53Z

[-- Attachment #1: sparc64-create-asm-h.patch --]
[-- Type: text/plain, Size: 1245 bytes --]

Create a assembly compatibility header for sparc32/64.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: David S. Miller <davem@davemloft.net>
---
arch/sparc/include/asm/asm.h | 11 +++++++++++
1 file changed, 11 insertions(+)

Index: linux-2.6-lttng/arch/sparc/include/asm/asm.h
===================================================================
--- linux-2.6-lttng.orig/arch/sparc/include/asm/asm.h 2009-09-24 08:42:17.000000000 -0400
+++ linux-2.6-lttng/arch/sparc/include/asm/asm.h 2009-09-24 08:49:13.000000000 -0400
@@ -18,6 +18,7 @@
brnz,PREDICT REG, DEST
#define BRANCH_REG_NOT_ZERO_ANNUL(PREDICT, REG, DEST) \
brnz,a,PREDICT REG, DEST
+#define __ASM_SEL(a, b) __ASM_FORM(b)
#else
#define BRANCH32(TYPE, PREDICT, DEST) \
TYPE DEST
@@ -35,6 +36,16 @@
#define BRANCH_REG_NOT_ZERO_ANNUL(PREDICT, REG, DEST) \
cmp REG, 0; \
bne,a DEST
+#define __ASM_SEL(a, b) __ASM_FORM(a)
#endif

+#ifdef __ASSEMBLY__
+#define __ASM_FORM(x) x
+#else
+#define __ASM_FORM(x) " " #x " "
+#endif
+
+#define _ASM_PTR __ASM_SEL(.word, .xword)
+#define _ASM_UAPTR __ASM_SEL(.uaword, .uaxword)
+
#endif /* _SPARC_ASM_H */