+2015-11-03 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/configure.in: Check for __ARM_ARCH_8A__.
+ * libc/machine/arm/memcpy.S: Handle __ARM_ARCH_8A__.
+ * libc/machine/arm/Makefile.am: Consider HAVE_ARMV8A in memcpy
+ selection.
+ * libc/machine/arm/Makefile.in: Regenerate.
+ * libc/machine/arm/configure: Regenerate.
+
2015-11-02 Jon Turney <jon.turney@dronecode.org.uk>
* HOWTO: Update.
MEMCPY_SRC=
MEMCPY_OBJ=
else
+if HAVE_ARMV8A
+MEMCPY_SRC=memcpy.S
+MEMCPY_OBJ=$(lpfx)memcpy.o
+else
if HAVE_ARMV7A
MEMCPY_SRC=memcpy.S
MEMCPY_OBJ=$(lpfx)memcpy.o
MEMCPY_OBJ=
endif !HAVE_ARMV7M
endif !HAVE_ARMV7A
+endif !HAVE_ARMV8A
endif !OPT_SIZE
lib_a_SOURCES = setjmp.S access.c strcmp.S strcpy.c \
@HAVE_THUMB1_FALSE@am__DEPENDENCIES_1 = $(lpfx)strlen.o
@HAVE_THUMB1_TRUE@@OPT_SIZE_TRUE@am__DEPENDENCIES_1 = $(lpfx)strlen.o
@HAVE_ARMV7_TRUE@am__DEPENDENCIES_2 = $(lpfx)memchr.o
-@HAVE_ARMV7A_FALSE@@HAVE_ARMV7M_TRUE@@OPT_SIZE_FALSE@am__DEPENDENCIES_3 = $(lpfx)memcpy.o
-@HAVE_ARMV7A_TRUE@@OPT_SIZE_FALSE@am__DEPENDENCIES_3 = \
-@HAVE_ARMV7A_TRUE@@OPT_SIZE_FALSE@ $(lpfx)memcpy.o
-@HAVE_ARMV7A_FALSE@@HAVE_ARMV7M_TRUE@@OPT_SIZE_FALSE@am__objects_1 = lib_a-memcpy.$(OBJEXT)
-@HAVE_ARMV7A_TRUE@@OPT_SIZE_FALSE@am__objects_1 = \
-@HAVE_ARMV7A_TRUE@@OPT_SIZE_FALSE@ lib_a-memcpy.$(OBJEXT)
+@HAVE_ARMV7A_FALSE@@HAVE_ARMV7M_TRUE@@HAVE_ARMV8A_FALSE@@OPT_SIZE_FALSE@am__DEPENDENCIES_3 = $(lpfx)memcpy.o
+@HAVE_ARMV7A_TRUE@@HAVE_ARMV8A_FALSE@@OPT_SIZE_FALSE@am__DEPENDENCIES_3 = $(lpfx)memcpy.o
+@HAVE_ARMV8A_TRUE@@OPT_SIZE_FALSE@am__DEPENDENCIES_3 = \
+@HAVE_ARMV8A_TRUE@@OPT_SIZE_FALSE@ $(lpfx)memcpy.o
+@HAVE_ARMV7A_FALSE@@HAVE_ARMV7M_TRUE@@HAVE_ARMV8A_FALSE@@OPT_SIZE_FALSE@am__objects_1 = lib_a-memcpy.$(OBJEXT)
+@HAVE_ARMV7A_TRUE@@HAVE_ARMV8A_FALSE@@OPT_SIZE_FALSE@am__objects_1 = lib_a-memcpy.$(OBJEXT)
+@HAVE_ARMV8A_TRUE@@OPT_SIZE_FALSE@am__objects_1 = \
+@HAVE_ARMV8A_TRUE@@OPT_SIZE_FALSE@ lib_a-memcpy.$(OBJEXT)
@HAVE_ARMV7_TRUE@am__objects_2 = lib_a-memchr.$(OBJEXT)
@HAVE_THUMB1_FALSE@am__objects_3 = lib_a-strlen.$(OBJEXT)
@HAVE_THUMB1_TRUE@@OPT_SIZE_TRUE@am__objects_3 = \
@HAVE_ARMV7_TRUE@MEMCHR_SRC = memchr.S
@HAVE_ARMV7_FALSE@MEMCHR_OBJ =
@HAVE_ARMV7_TRUE@MEMCHR_OBJ = $(lpfx)memchr.o
-@HAVE_ARMV7A_FALSE@@HAVE_ARMV7M_FALSE@@OPT_SIZE_FALSE@MEMCPY_SRC =
-@HAVE_ARMV7A_FALSE@@HAVE_ARMV7M_TRUE@@OPT_SIZE_FALSE@MEMCPY_SRC = memcpy.S
-@HAVE_ARMV7A_TRUE@@OPT_SIZE_FALSE@MEMCPY_SRC = memcpy.S
+@HAVE_ARMV7A_FALSE@@HAVE_ARMV7M_FALSE@@HAVE_ARMV8A_FALSE@@OPT_S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${as_lineno-$LINENO}: checking whether armv8a processor is supported" >&5
+$as_echo_n "checking whether armv8a processor is supported... " >&6; }
+if ${acnewlib_cv_armv8a_processor+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+
+#if defined (__ARM_ARCH_8A__) && defined (__ARM_FEATURE_UNALIGNED)
+ #define HAVE_ARMV8A
+ #else
+ #error "ARMV8A is not supported."
+#endif
+int main () {
+ return 0;
+}
+EOF
+if { ac_try='${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
+ 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then
+ acnewlib_cv_armv8a_processor=yes;
+else
+ acnewlib_cv_armv8a_processor=no;
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acnewlib_cv_armv8a_processor" >&5
+$as_echo "$acnewlib_cv_armv8a_processor" >&6; }
+
+ if test x"$acnewlib_cv_armv8a_processor" = x"yes"; then
+ HAVE_ARMV8A_TRUE=
+ HAVE_ARMV8A_FALSE='#'
+else
+ HAVE_ARMV8A_TRUE='#'
+ HAVE_ARMV8A_FALSE=
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether armv7m processor is supported" >&5
$as_echo_n "checking whether armv7m processor is supported... " >&6; }
if ${acnewlib_cv_armv7m_processor+:} false; then :
as_fn_error $? "conditional \"HAVE_ARMV7A\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_ARMV8A_TRUE}" && test -z "${HAVE_ARMV8A_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_ARMV8A\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_ARMV7M_TRUE}" && test -z "${HAVE_ARMV7M_FALSE}"; then
as_fn_error $? "conditional \"HAVE_ARMV7M\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
AM_CONDITIONAL(HAVE_ARMV7A, test x"$acnewlib_cv_armv7a_processor" = x"yes")
+dnl Check for whether ARM_ARCH_8A is defined.
+AC_CACHE_CHECK(whether armv8a processor is supported,
+ acnewlib_cv_armv8a_processor, [dnl
+cat > conftest.c <<EOF
+
+#if defined (__ARM_ARCH_8A__) && defined (__ARM_FEATURE_UNALIGNED)
+ #define HAVE_ARMV8A
+ #else
+ #error "ARMV8A is not supported."
+#endif
+int main () {
+ return 0;
+}
+EOF
+if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
+ 1>&AS_MESSAGE_LOG_FD])
+then
+ acnewlib_cv_armv8a_processor=yes;
+else
+ acnewlib_cv_armv8a_processor=no;
+fi
+rm -f conftest*])
+
+AM_CONDITIONAL(HAVE_ARMV8A, test x"$acnewlib_cv_armv8a_processor" = x"yes")
+
dnl Check for whether ARM_ARCH_7M is defined.
AC_CACHE_CHECK(whether armv7m processor is supported,
acnewlib_cv_armv7m_processor, [dnl
/*
- * Copyright (c) 2013 ARM Ltd
+ * Copyright (c) 2013-2015 ARM Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
lib_a-memcpy.o to be generated.
*/
-#elif defined (__ARM_ARCH_7A__) && defined (__ARM_FEATURE_UNALIGNED)
+#elif (__ARM_ARCH >= 7 && __ARM_ARCH_PROFILE == 'A' \
+ && defined (__ARM_FEATURE_UNALIGNED))
#include "memcpy-armv7a.S"
#elif defined (__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__)