Skip to content

Commit

Permalink
[ARC] Enable building for RF16.
Browse files Browse the repository at this point in the history
When we have RF16 option on, fallback on default implementation.

newlib/
2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>

	* libc/machine/arc/memcmp-bs-norm.S: Fallback on default routines
	when RF16 is enabled.
	* libc/machine/arc/memcmp-stub.c: Likewise.
	* libc/machine/arc/memcmp.S: Likewise.
	* libc/machine/arc/memcpy-archs.S: Likewise.
	* libc/machine/arc/memcpy-bs.S: Likewise.
	* libc/machine/arc/memcpy-stub.c: Likewise.
	* libc/machine/arc/memcpy.S: Likewise.
	* libc/machine/arc/memset-archs.S: Likewise.
	* libc/machine/arc/memset-bs.S: Likewise.
	* libc/machine/arc/memset-stub.c: Likewise.
	* libc/machine/arc/memset.S: Likewise.
	* libc/machine/arc/strchr-bs-norm.S: Likewise.
	* libc/machine/arc/strchr-bs.S: Likewise.
	* libc/machine/arc/strchr-stub.c: Likewise.
	* libc/machine/arc/strcmp-archs.S: Likewise.
	* libc/machine/arc/strcmp-stub.c: Likewise.
	* libc/machine/arc/strcmp.S: Likewise.
	* libc/machine/arc/strcpy-bs-arc600.S: Likewise.
	* libc/machine/arc/strcpy-bs.S: Likewise.
	* libc/machine/arc/strcpy-stub.c: Likewise.
	* libc/machine/arc/strcpy.S: Likewise.
	* libc/machine/arc/strlen-bs-norm.S: Likewise.
	* libc/machine/arc/strlen-bs.S: Likewise.
	* libc/machine/arc/strlen-stub.c: Likewise.
	* libc/machine/arc/strlen.S: Likewise.
	* libc/machine/arc/strncpy-bs.S: Likewise.
	* libc/machine/arc/strncpy-stub.c: Likewise.
	* libc/machine/arc/strncpy.S: Likewise.
  • Loading branch information
claziss authored and anthony-kolesov committed Oct 31, 2017
1 parent 58dac28 commit 637f118
Show file tree
Hide file tree
Showing 28 changed files with 56 additions and 28 deletions.
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memcmp-bs-norm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/memcmp.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memcmp-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/


#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) \
|| defined (__ARC_RF16__)
# include "../../string/memcmp.c"
#else
/* See memcmp-*.S. */
Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memcmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/memcmp.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memcpy-archs.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/memcpy.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memcpy-bs.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/memcpy.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memcpy-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/


#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) \
|| defined (__ARC_RF16__)
# include "../../string/memcpy.c"
#else
/* See memcpy-*.S. */
Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memcpy.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/memcpy.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memset-archs.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/memset.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memset-bs.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/memset.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memset-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/


#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) \
|| defined (__ARC_RF16__)
# include "../../string/memset.c"
#else
/* See memset-*.S. */
Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/memset.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/memset.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strchr-bs-norm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strchr.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

/* ARC700 has a relatively long pipeline and branch prediction, so we want
to avoid branches that are hard to predict. On the other hand, the
Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strchr-bs.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strchr.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strchr-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/


#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) \
|| defined (__ARC_RF16__)
# include "../../string/strchr.c"
#else
/* See strchr-*.S. */
Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strcmp-archs.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strcmp.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strcmp-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/


#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) \
|| defined (__ARC_RF16__)
# include "../../string/strcmp.c"
#else
/* See strcmp-*.S. */
Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strcmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strcmp.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strcpy-bs-arc600.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strcpy.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strcpy-bs.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strcpy.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strcpy-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/


#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) \
|| defined (__ARC_RF16__)
# include "../../string/strcpy.c"
#else
/* See strcpy-*.S. */
Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strcpy.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strcpy.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strlen-bs-norm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strlen.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"
#if (defined (__ARC700__) || defined (__ARCEM__) || defined (__ARCHS__)) \
Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strlen-bs.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strlen.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strlen-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/


#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) \
|| defined (__ARC_RF16__)
# include "../../string/strlen.c"
#else
/* See strlen-*.S. */
Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strlen.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strlen.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strncpy-bs.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strncpy.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strncpy-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/


#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) \
|| defined (__ARC_RF16__)
# include "../../string/strncpy.c"
#else
/* See strncpy-*.S. */
Expand Down
3 changes: 2 additions & 1 deletion newlib/libc/machine/arc/strncpy.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/* This implementation is optimized for performance. For code size a generic
implementation of this function from newlib/libc/string/strncpy.c will be
used. */
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
&& !defined (__ARC_RF16__)

#include "asm.h"

Expand Down

0 comments on commit 637f118

Please sign in to comment.