You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/02/24 14:13:56 UTC

[incubator-nuttx] 01/02: xtensa: fix `XTHAL_REL_LE` not find

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 7d350204f0f9c212df5a413c886bfbb05da47355
Author: zhuyanlin <zh...@xiaomi.com>
AuthorDate: Wed Feb 16 18:24:52 2022 +0800

    xtensa: fix `XTHAL_REL_LE` not find
    
    fix `XTHAL_REL_LE` not find build break
    
    Signed-off-by: zhuyanlin <zh...@xiaomi.com>
---
 arch/xtensa/include/xtensa/core.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/xtensa/include/xtensa/core.h b/arch/xtensa/include/xtensa/core.h
index 01112b9..6efab57 100644
--- a/arch/xtensa/include/xtensa/core.h
+++ b/arch/xtensa/include/xtensa/core.h
@@ -1393,6 +1393,18 @@
 
 #define XTHAL_INST_ILL            0x000000    /* 3-byte illegal instruction */
 
+/*  Version comparison operators (among major/minor pairs):  */
+
+#define XTHAL_REL_GE(maja,mina, majb,minb)  ((maja) > (majb) || \
+             ((maja) == (majb) && (mina) >= (minb)))
+#define XTHAL_REL_GT(maja,mina, majb,minb)  ((maja) > (majb) || \
+             ((maja) == (majb) && (mina) > (minb)))
+#define XTHAL_REL_LE(maja,mina, majb,minb)  ((maja) < (majb) || \
+             ((maja) == (majb) && (mina) <= (minb)))
+#define XTHAL_REL_LT(maja,mina, majb,minb)  ((maja) < (majb) || \
+             ((maja) == (majb) && (mina) < (minb)))
+#define XTHAL_REL_EQ(maja,mina, majb,minb)  ((maja) == (majb) && (mina) == (minb))
+
 /* Because information as to exactly which hardware version is targeted
  * by a given software build is not always available, compile-time HAL
  * Hardware-Release "_AT" macros are fuzzy (return 0, 1, or XCHAL_MAYBE):