This is an automated email from the ASF dual-hosted git repository.
ligd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 7acb0df84f4 arch/arm: Add the macro definitions for CFI instructions
for greenhills compiler
7acb0df84f4 is described below
commit 7acb0df84f4da8b43de00f19dfb11a8a04373eca
Author: pangzhen1 <[email protected]>
AuthorDate: Thu Feb 20 21:07:41 2025 +0800
arch/arm: Add the macro definitions for CFI instructions for greenhills
compiler
Add the macro definitions for CFI instructions for greenhills compiler
Signed-off-by: pangzhen1 <[email protected]>
---
arch/arm/src/armv7-m/arm_exception.S | 1 +
arch/arm/src/armv7-m/ghs_compat.S | 48 ++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/arch/arm/src/armv7-m/arm_exception.S
b/arch/arm/src/armv7-m/arm_exception.S
index c2053a59e17..67661583bd1 100644
--- a/arch/arm/src/armv7-m/arm_exception.S
+++ b/arch/arm/src/armv7-m/arm_exception.S
@@ -46,6 +46,7 @@
#include "chip.h"
#include "exc_return.h"
+#include "ghs_compat.S"
/****************************************************************************
* Pre-processor Definitions
diff --git a/arch/arm/src/armv7-m/ghs_compat.S
b/arch/arm/src/armv7-m/ghs_compat.S
new file mode 100644
index 00000000000..74688879499
--- /dev/null
+++ b/arch/arm/src/armv7-m/ghs_compat.S
@@ -0,0 +1,48 @@
+/****************************************************************************
+ * arch/arm/src/armv7-m/ghs_compat.S
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifdef __ghs__
+ .macro .cfi_sections section
+ .endm
+
+ .macro .cfi_startproc
+ .endm
+
+ .macro .cfi_def_cfa val1 val2
+ .endm
+
+ .macro .cfi_def_cfa_offset val
+ .endm
+
+ .macro .cfi_offset val1 val2
+ .endm
+
+ .macro .cfi_restore val
+ .endm
+
+ .macro .cfi_restore_state
+ .endm
+
+ .macro .cfi_endproc
+ .endm
+
+ .macro .cfi_remember_state
+ .endm
+#endif