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