diff --git a/libs/libc/machine/x86_64/CMakeLists.txt b/libs/libc/machine/x86_64/CMakeLists.txt index 2dfd0a9607d..918b95d6032 100644 --- a/libs/libc/machine/x86_64/CMakeLists.txt +++ b/libs/libc/machine/x86_64/CMakeLists.txt @@ -20,8 +20,6 @@ # # ############################################################################## -add_subdirectory(gnu) - set(SRCS) if(CONFIG_LIBC_ARCH_ELF) @@ -32,4 +30,52 @@ if(CONFIG_ARCH_SETJMP_H) list(APPEND SRCS arch_setjmp_x86_64.S) endif() +if(CONFIG_X86_64_MEMCMP) + list(APPEND SRCS arch_memcmp.S) +endif() + +if(CONFIG_X86_64_MEMMOVE) + list(APPEND SRCS arch_memmove.S) +endif() + +if(CONFIG_X86_64_MEMSET) + if(CONFIG_ARCH_X86_64_AVX) + list(APPEND SRCS arch_memset_avx2.S) + else() + list(APPEND SRCS arch_memset_sse2.S) + endif() +endif() + +if(CONFIG_X86_64_STPCPY) + list(APPEND SRCS arch_stpcpy.S) +endif() + +if(CONFIG_X86_64_STPNCPY) + list(APPEND SRCS arch_stpncpy.S) +endif() + +if(CONFIG_X86_64_STRCAT) + list(APPEND SRCS arch_strcat.S) +endif() + +if(CONFIG_X86_64_STRCMP) + list(APPEND SRCS arch_strcmp.S) +endif() + +if(CONFIG_X86_64_STRCPY) + list(APPEND SRCS arch_strcpy.S) +endif() + +if(CONFIG_X86_64_STRLEN) + list(APPEND SRCS arch_strlen.S) +endif() + +if(CONFIG_X86_64_STRNCPY) + list(APPEND SRCS arch_strncpy.S) +endif() + +if(CONFIG_X86_64_STRNCMP) + list(APPEND SRCS arch_strncmp.S) +endif() + target_sources(c PRIVATE ${SRCS}) diff --git a/libs/libc/machine/x86_64/Make.defs b/libs/libc/machine/x86_64/Make.defs index 2e7c4b03808..339f041aab9 100644 --- a/libs/libc/machine/x86_64/Make.defs +++ b/libs/libc/machine/x86_64/Make.defs @@ -27,6 +27,7 @@ endif ifeq ($(CONFIG_ARCH_SETJMP_H),y) ASRCS += arch_setjmp_x86_64.S endif + ifeq ($(CONFIG_X86_64_MEMCMP),y) ASRCS += arch_memcmp.S endif @@ -75,10 +76,5 @@ ifeq ($(CONFIG_X86_64_STRNCMP),y) ASRCS += arch_strncmp.S endif -ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y) -DEPPATH += --dep-path machine/x86_64/gnu -VPATH += :machine/x86_64/gnu -endif - DEPPATH += --dep-path machine/x86_64 VPATH += :machine/x86_64 diff --git a/libs/libc/machine/x86_64/gnu/arch_memcmp.S b/libs/libc/machine/x86_64/arch_memcmp.S similarity index 99% rename from libs/libc/machine/x86_64/gnu/arch_memcmp.S rename to libs/libc/machine/x86_64/arch_memcmp.S index 236326040d0..d2cfc05b32b 100644 --- a/libs/libc/machine/x86_64/gnu/arch_memcmp.S +++ b/libs/libc/machine/x86_64/arch_memcmp.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_memcmp.S + * libs/libc/machine/x86_64/arch_memcmp.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_memmove.S b/libs/libc/machine/x86_64/arch_memmove.S similarity index 99% rename from libs/libc/machine/x86_64/gnu/arch_memmove.S rename to libs/libc/machine/x86_64/arch_memmove.S index 93c368eb59b..c1e95446c48 100644 --- a/libs/libc/machine/x86_64/gnu/arch_memmove.S +++ b/libs/libc/machine/x86_64/arch_memmove.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_memmove.S + * libs/libc/machine/x86_64/arch_memmove.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_memset_avx2.S b/libs/libc/machine/x86_64/arch_memset_avx2.S similarity index 98% rename from libs/libc/machine/x86_64/gnu/arch_memset_avx2.S rename to libs/libc/machine/x86_64/arch_memset_avx2.S index c293b15717b..1d2fbbcf458 100644 --- a/libs/libc/machine/x86_64/gnu/arch_memset_avx2.S +++ b/libs/libc/machine/x86_64/arch_memset_avx2.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_memset_avx2.S + * libs/libc/machine/x86_64/arch_memset_avx2.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_memset_sse2.S b/libs/libc/machine/x86_64/arch_memset_sse2.S similarity index 98% rename from libs/libc/machine/x86_64/gnu/arch_memset_sse2.S rename to libs/libc/machine/x86_64/arch_memset_sse2.S index 3341aed23e5..597f3ed03f6 100644 --- a/libs/libc/machine/x86_64/gnu/arch_memset_sse2.S +++ b/libs/libc/machine/x86_64/arch_memset_sse2.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_memset_sse2.S + * libs/libc/machine/x86_64/arch_memset_sse2.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_stpcpy.S b/libs/libc/machine/x86_64/arch_stpcpy.S similarity index 97% rename from libs/libc/machine/x86_64/gnu/arch_stpcpy.S rename to libs/libc/machine/x86_64/arch_stpcpy.S index 2d3189800da..053aa3080e8 100644 --- a/libs/libc/machine/x86_64/gnu/arch_stpcpy.S +++ b/libs/libc/machine/x86_64/arch_stpcpy.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_stpcpy.S + * libs/libc/machine/x86_64/arch_stpcpy.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_stpncpy.S b/libs/libc/machine/x86_64/arch_stpncpy.S similarity index 97% rename from libs/libc/machine/x86_64/gnu/arch_stpncpy.S rename to libs/libc/machine/x86_64/arch_stpncpy.S index f478623cf6d..34e9fc03862 100644 --- a/libs/libc/machine/x86_64/gnu/arch_stpncpy.S +++ b/libs/libc/machine/x86_64/arch_stpncpy.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_strpcpy.S + * libs/libc/machine/x86_64/arch_strpcpy.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_strcat.S b/libs/libc/machine/x86_64/arch_strcat.S similarity index 98% rename from libs/libc/machine/x86_64/gnu/arch_strcat.S rename to libs/libc/machine/x86_64/arch_strcat.S index 6ca704ba568..5e4a12e2326 100644 --- a/libs/libc/machine/x86_64/gnu/arch_strcat.S +++ b/libs/libc/machine/x86_64/arch_strcat.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_strcat.S + * libs/libc/machine/x86_64/arch_strcat.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_strcmp.S b/libs/libc/machine/x86_64/arch_strcmp.S similarity index 99% rename from libs/libc/machine/x86_64/gnu/arch_strcmp.S rename to libs/libc/machine/x86_64/arch_strcmp.S index 60ffc396520..75722639d61 100644 --- a/libs/libc/machine/x86_64/gnu/arch_strcmp.S +++ b/libs/libc/machine/x86_64/arch_strcmp.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_strcmp.S + * libs/libc/machine/x86_64/arch_strcmp.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_strcpy.S b/libs/libc/machine/x86_64/arch_strcpy.S similarity index 99% rename from libs/libc/machine/x86_64/gnu/arch_strcpy.S rename to libs/libc/machine/x86_64/arch_strcpy.S index d628762a356..3768b8f0d3e 100644 --- a/libs/libc/machine/x86_64/gnu/arch_strcpy.S +++ b/libs/libc/machine/x86_64/arch_strcpy.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_strcpy.S + * libs/libc/machine/x86_64/arch_strcpy.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_strlen.S b/libs/libc/machine/x86_64/arch_strlen.S similarity index 99% rename from libs/libc/machine/x86_64/gnu/arch_strlen.S rename to libs/libc/machine/x86_64/arch_strlen.S index 157e97735ee..1a88c17adf0 100644 --- a/libs/libc/machine/x86_64/gnu/arch_strlen.S +++ b/libs/libc/machine/x86_64/arch_strlen.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_strlen.S + * libs/libc/machine/x86_64/arch_strlen.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_strncmp.S b/libs/libc/machine/x86_64/arch_strncmp.S similarity index 97% rename from libs/libc/machine/x86_64/gnu/arch_strncmp.S rename to libs/libc/machine/x86_64/arch_strncmp.S index b17877cf2a5..6ea2803f929 100644 --- a/libs/libc/machine/x86_64/gnu/arch_strncmp.S +++ b/libs/libc/machine/x86_64/arch_strncmp.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_strncmp.S + * libs/libc/machine/x86_64/arch_strncmp.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/arch_strncpy.S b/libs/libc/machine/x86_64/arch_strncpy.S similarity index 97% rename from libs/libc/machine/x86_64/gnu/arch_strncpy.S rename to libs/libc/machine/x86_64/arch_strncpy.S index e87851a7daa..4cbcc038595 100644 --- a/libs/libc/machine/x86_64/gnu/arch_strncpy.S +++ b/libs/libc/machine/x86_64/arch_strncpy.S @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/arch_strncpy.S + * libs/libc/machine/x86_64/arch_strncpy.S * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/cache.h b/libs/libc/machine/x86_64/cache.h similarity index 98% rename from libs/libc/machine/x86_64/gnu/cache.h rename to libs/libc/machine/x86_64/cache.h index 3ff2433b677..f2fd61360e8 100644 --- a/libs/libc/machine/x86_64/gnu/cache.h +++ b/libs/libc/machine/x86_64/cache.h @@ -1,5 +1,5 @@ /********************************************************************************* - * libs/libc/machine/x86_64/gnu/cache.h + * libs/libc/machine/x86_64/cache.h * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2014, Intel Corporation diff --git a/libs/libc/machine/x86_64/gnu/CMakeLists.txt b/libs/libc/machine/x86_64/gnu/CMakeLists.txt deleted file mode 100644 index 7d0715d9a2d..00000000000 --- a/libs/libc/machine/x86_64/gnu/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -# ############################################################################## -# libs/libc/machine/x86_64/gnu/CMakeLists.txt -# -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. The ASF licenses this -# file to you under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# ############################################################################## - -set(SRCS) - -if(CONFIG_X86_64_MEMCMP) - list(APPEND SRCS arch_memcmp.S) -endif() - -if(CONFIG_X86_64_MEMMOVE) - list(APPEND SRCS arch_memmove.S) -endif() - -if(CONFIG_X86_64_MEMSET) - if(CONFIG_ARCH_X86_64_AVX) - list(APPEND SRCS arch_memset_avx2.S) - else() - list(APPEND SRCS arch_memset_sse2.S) - endif() -endif() - -if(CONFIG_X86_64_STPCPY) - list(APPEND SRCS arch_stpcpy.S) -endif() - -if(CONFIG_X86_64_STPNCPY) - list(APPEND SRCS arch_stpncpy.S) -endif() - -if(CONFIG_X86_64_STRCAT) - list(APPEND SRCS arch_strcat.S) -endif() - -if(CONFIG_X86_64_STRCMP) - list(APPEND SRCS arch_strcmp.S) -endif() - -if(CONFIG_X86_64_STRCPY) - list(APPEND SRCS arch_strcpy.S) -endif() - -if(CONFIG_X86_64_STRLEN) - list(APPEND SRCS arch_strlen.S) -endif() - -if(CONFIG_X86_64_STRNCPY) - list(APPEND SRCS arch_strncpy.S) -endif() - -if(CONFIG_X86_64_STRNCMP) - list(APPEND SRCS arch_strncmp.S) -endif() - -target_sources(c PRIVATE ${SRCS})