summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ast/libast/sparcv9/FEATURE/align
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/ast/libast/sparcv9/FEATURE/align')
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/align32
1 files changed, 32 insertions, 0 deletions
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/align b/usr/src/cmd/ast/libast/sparcv9/FEATURE/align
new file mode 100644
index 0000000000..228de042de
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/align
@@ -0,0 +1,32 @@
+/* : : generated from contrib/ast/src/lib/libast/features/align.c by iffe version 2012-07-17 : : */
+#ifndef _def_align_ast
+#define _def_align_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+
+#define ALIGN_CHUNK 8192
+#define ALIGN_INTEGRAL uintptr_t
+#define ALIGN_INTEGER(x) ((char*)(x)-(char*)0)
+#define ALIGN_POINTER(x) ((char*)(x))
+#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
+
+#define ALIGN_BOUND ALIGN_BOUND2
+#define ALIGN_ALIGN(x) ALIGN_ALIGN2(x)
+#define ALIGN_TRUNC(x) ALIGN_TRUNC2(x)
+
+#define ALIGN_BIT1 0x1
+#define ALIGN_BOUND1 ALIGN_BOUND2
+#define ALIGN_ALIGN1(x) ALIGN_ALIGN2(x)
+#define ALIGN_TRUNC1(x) ALIGN_TRUNC2(x)
+#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffe)
+#define ALIGN_SETBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x1)
+#define ALIGN_TSTBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x1)
+
+#define ALIGN_BIT2 0x2
+#define ALIGN_BOUND2 16
+#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+15)
+#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffff0)
+#define ALIGN_CLRBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffd)
+#define ALIGN_SETBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x2)
+#define ALIGN_TSTBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x2)
+
+#endif