[1/3] libc: arc: Exclude strchr.S from targets with 16-entry regfile

Message ID 20260312225330.2903392-2-ykolerov@synopsys.com
State New
Headers
Series A series of fixes for ARC Classic |

Commit Message

Yuriy Kolerov March 12, 2026, 10:53 p.m. UTC
  An optimized version of strchr for ARC Classic is incompatible
with targets with 16-entry register file.

Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
---
 newlib/libc/machine/arc/strchr.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/newlib/libc/machine/arc/strchr.S b/newlib/libc/machine/arc/strchr.S
index 1bf6db97d..eed6278f7 100644
--- a/newlib/libc/machine/arc/strchr.S
+++ b/newlib/libc/machine/arc/strchr.S
@@ -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"