libc/machine/x86_64: Move all source files out of gnu folder

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2025-06-22 13:56:52 +08:00 committed by Donny(董九柱)
parent e0ba2efdca
commit 1177ac8ee4
16 changed files with 62 additions and 93 deletions

View file

@ -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})

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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})