4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-31 19:40:33 +08:00

arc: libc: Add support of 16-entry register file

ARC supports a restricted register file with 16 registers.
However, optimized routines support only a full register
file. Thus, fallback on default implementation in case
of 16-entry register file.

Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
This commit is contained in:
Claudiu Zissulescu 2024-05-21 10:56:45 +01:00 committed by Jeff Johnston
parent f84fed5291
commit d85bb55f45
28 changed files with 84 additions and 56 deletions

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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. */

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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. */

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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. */

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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. */

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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. */

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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. */

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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__)) \

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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. */

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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. */

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2015, Synopsys, Inc. All rights reserved.
Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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"