From d36c43d159d39a847ef8728e5da201bb29e747f5 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Fri, 3 Feb 2012 11:21:00 +0000 Subject: * config/open-axiom.m4 (OPENAXIOM_ALIGNAS_SPECIFIER): New. (OPENAXIOM_CHECK_MISC): Use it. src/ * utils/vm.H: Add more VM data structures. * utils/vm.cc (BasicContext::make_operator): Define. * algebra/Makefile.in (SPADFILES): Include syntax.spad and spad-parser.spad. --- config/open-axiom.m4 | 22 +++++++++++++++++++++- config/openaxiom-c-macros.h.in | 3 +++ 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/open-axiom.m4 b/config/open-axiom.m4 index f8e632f9..f3c8afd5 100644 --- a/config/open-axiom.m4 +++ b/config/open-axiom.m4 @@ -1006,12 +1006,31 @@ AC_COMPILE_IFELSE([int a = __alignof(int);], [oa_alignment="__alignof"], [AC_COMPILE_IFELSE([int a = alignof(int);], [oa_alignment="alignof"], - [AC_MSG_ERROR([C/C++ compiler does not support alignment query operator])])]) + [AC_MSG_ERROR([C++ compiler does not support alignment query operator])])]) AC_DEFINE_UNQUOTED([openaxiom_alignment],[$oa_alignment], [Alignment query operator]) AC_MSG_RESULT([$oa_alignment]) ]) +dnl --------------------------------- +dnl -- OPENAXIOM_ALIGNAS_SPECIFIER -- +dnl --------------------------------- +dnl check for alignment specifier support. +dnl Vendor lock-ins are of the attribute form. +AC_DEFUN([OPENAXIOM_ALIGNAS_SPECIFIER],[ +AC_MSG_CHECKING([alignment boundary specifier syntax]) +oa_alignas= +AC_COMPILE_IFELSE([alignas(16) int a = 42;], + [oa_alignas="alignas(N)"], + [AC_COMPILE_IFELSE([__attribute__((__aligned__(16))) int a = 42;], + [oa_alignas="__attribute__((__aligned__(N)))"], + [AC_MSG_ERROR([C++ compiler does not support alignment specifier])])]) +AC_DEFINE_UNQUOTED([openaxiom_alignas(N)],[$oa_alignas], + [Alignment specifier operator]) +AC_MSG_RESULT([$oa_alignas]) +]) + + dnl ------------------------- dnl -- OPENAXIOM_CHECK_GMP -- dnl ------------------------- @@ -1025,6 +1044,7 @@ dnl -- OPENAXIOM_CHECK_MISC -- dnl -------------------------- AC_DEFUN([OPENAXIOM_CHECK_MISC],[ OPENAXIOM_ALIGNMENT_OPERATOR +OPENAXIOM_ALIGNAS_SPECIFIER case $oa_gnu_compiler in yes) CFLAGS="$CFLAGS -O2 -Wall" diff --git a/config/openaxiom-c-macros.h.in b/config/openaxiom-c-macros.h.in index 1f9f1bc8..41805ba4 100644 --- a/config/openaxiom-c-macros.h.in +++ b/config/openaxiom-c-macros.h.in @@ -274,6 +274,9 @@ if such a type exists, and if the system does not define it. */ #undef intptr_t +/* Alignment specifier operator */ +#undef openaxiom_alignas + /* Alignment query operator */ #undef openaxiom_alignment -- cgit v1.2.3