diff --git a/components/riscv/include/riscv/rvruntime-frames.h b/components/riscv/include/riscv/rvruntime-frames.h index 1ef8934f14..4a53320b29 100644 --- a/components/riscv/include/riscv/rvruntime-frames.h +++ b/components/riscv/include/riscv/rvruntime-frames.h @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed 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. +/* + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef __RVRUNTIME_FRAMES_H__ #define __RVRUNTIME_FRAMES_H__ @@ -26,10 +18,18 @@ #endif #if defined(_ASMLANGUAGE) || defined(__ASSEMBLER__) +#ifdef __clang__ +#define STRUCT_BEGIN .set RV_STRUCT_OFFSET, 0 +#define STRUCT_FIELD(ctype,size,asname,name) .set asname, RV_STRUCT_OFFSET; .set RV_STRUCT_OFFSET, asname + size +#define STRUCT_AFIELD(ctype,size,asname,name,n) .set asname, RV_STRUCT_OFFSET;\ + .set RV_STRUCT_OFFSET, asname + (size)*(n); +#define STRUCT_END(sname) .set sname##Size, RV_STRUCT_OFFSET; +#else // __clang__ #define STRUCT_BEGIN .pushsection .text; .struct 0 #define STRUCT_FIELD(ctype,size,asname,name) asname: .space size #define STRUCT_AFIELD(ctype,size,asname,name,n) asname: .space (size)*(n) #define STRUCT_END(sname) sname##Size:; .popsection +#endif // __clang__ #else #define STRUCT_BEGIN typedef struct { #define STRUCT_FIELD(ctype,size,asname,name) ctype name; diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 3af655d041..56300f8917 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -837,7 +837,6 @@ components/pthread/test/test_pthread_local_storage.c components/riscv/include/riscv/csr.h components/riscv/include/riscv/encoding.h components/riscv/include/riscv/instruction_decode.h -components/riscv/include/riscv/rvruntime-frames.h components/riscv/instruction_decode.c components/sdmmc/sdmmc_common.c components/sdmmc/sdmmc_common.h