!9 同步24.09创新版本分支代码到24.03-LTS-LTS-SP1分支

From: @zhaoshujian 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
This commit is contained in:
openeuler-ci-bot 2024-11-13 14:19:37 +00:00 committed by Gitee
commit c09e0f4af0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 13008 additions and 8 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
diff --git a/gcc/BASE-VER b/gcc/BASE-VER
index 07ea9fa43..dab6a80f4 100644
--- a/gcc/BASE-VER
+++ b/gcc/BASE-VER
@@ -1 +1 @@
-14.2.0
+14.2.1
--
2.43.0

View File

@ -0,0 +1,88 @@
From b4524c4430ba9771265bd9fc31e69a3f35dfe117 Mon Sep 17 00:00:00 2001
From: Haochen Jiang <haochen.jiang@intel.com>
Date: Thu, 25 Jul 2024 16:16:05 +0800
Subject: [PATCH] i386: Add non-optimize prefetchi intrins
Under -O0, with the "newly" introduced intrins, the variable will be
transformed as mem instead of the origin symbol_ref. The compiler will
then treat the operand as invalid and turn the operation into nop, which
is not expected. Use macro for non-optimize to keep the variable as
symbol_ref just as how prefetch intrin does.
gcc/ChangeLog:
* config/i386/prfchiintrin.h
(_m_prefetchit0): Add macro for non-optimized option.
(_m_prefetchit1): Ditto.
gcc/testsuite/ChangeLog:
* gcc.target/i386/prefetchi-1b.c: New test.
---
gcc/config/i386/prfchiintrin.h | 9 +++++++
gcc/testsuite/gcc.target/i386/prefetchi-1b.c | 26 ++++++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/i386/prefetchi-1b.c
diff --git a/gcc/config/i386/prfchiintrin.h b/gcc/config/i386/prfchiintrin.h
index dfca89c7d16..d6580e504c0 100644
--- a/gcc/config/i386/prfchiintrin.h
+++ b/gcc/config/i386/prfchiintrin.h
@@ -37,6 +37,7 @@
#define __DISABLE_PREFETCHI__
#endif /* __PREFETCHI__ */
+#ifdef __OPTIMIZE__
extern __inline void
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_prefetchit0 (void* __P)
@@ -50,6 +51,14 @@ _m_prefetchit1 (void* __P)
{
__builtin_ia32_prefetchi (__P, 2);
}
+#else
+#define _m_prefetchit0(P) \
+ __builtin_ia32_prefetchi(P, 3)
+
+#define _m_prefetchit1(P) \
+ __builtin_ia32_prefetchi(P, 2)
+
+#endif
#ifdef __DISABLE_PREFETCHI__
#undef __DISABLE_PREFETCHI__
diff --git a/gcc/testsuite/gcc.target/i386/prefetchi-1b.c b/gcc/testsuite/gcc.target/i386/prefetchi-1b.c
new file mode 100644
index 00000000000..93139554d3c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/prefetchi-1b.c
@@ -0,0 +1,26 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-mprefetchi -O0" } */
+/* { dg-final { scan-assembler-times "\[ \\t\]+prefetchit0\[ \\t\]+bar\\(%rip\\)" 1 } } */
+/* { dg-final { scan-assembler-times "\[ \\t\]+prefetchit1\[ \\t\]+bar\\(%rip\\)" 1 } } */
+
+#include <x86intrin.h>
+
+int
+bar (int a)
+{
+ return a + 1;
+}
+
+int
+foo1 (int b)
+{
+ _m_prefetchit0 (bar);
+ return bar (b) + 1;
+}
+
+int
+foo2 (int b)
+{
+ _m_prefetchit1 (bar);
+ return bar (b) + 1;
+}
--
2.31.1

View File

@ -1,23 +1,55 @@
# gcc-14 # gcc-14
#### 介绍 #### 介绍
gcc multi-version toolset for openEuler openEuler 24.03 LTS 版本选择 GCC 12.3.1 作为开发基线,确保在整 LTS 周期内,系统版本保持相对稳定。
为满足用户对不同版本编译器的需求,使能多样算力新特性,基于 openEuler 24.09 系统,推出 gcc-toolset-14 副版本编译工具链,形成主版本为 GCC12副版本为 GCC14 的编译器搭配,为用户提供更加灵活且高效的编译选择。
#### 软件架构 #### 软件架构
软件架构说明
```shell
## 默认 GCC12 路径
PATH=/usr/bin/
## 默认动态库路径
LD_LIBRARY_PATH=/usr/lib64/
## gcc-toolset-14 副版本安装路径
PATH=/opt/openEuler/gcc-toolset-14/root/usr/bin/
```
#### 软件约束
| 名称| 版本要求|
| --- | --- |
| 系统版本| openEuler 24.09 以上 |
| 默认GCC | 12.3.1 |
| 架构 | Aarch64 / X86_64|
| Glibc | 2.34 及以上 |
| Binutils | 2.42 及以上|
约束是指本多版本工具链在以上条件的版本中进行了完整的工程验证和兼容性测试,如果使用在其他场景中,不保证完整功能实现。
#### 安装教程 #### 安装教程
1. xxxx 1. `yum install gcc-toolset-14-gcc gcc-toolset-14-g++`
2. xxxx 2. 如果需要搭配 binutils-2.42,则 `yum install gcc-toolset-14-binutils`
3. xxxx
#### 使用说明 #### 使用说明
1. xxxx 1. 安装 scl
2. xxxx > yum install scl-utils
3. xxxx
2. 注册 gcc-toolset-14
> scl register /opt/openEuler/gcc-toolset-14/
使用`scl list-collections`显示 gcc-toolset-14 已经在 scl 中注册成功;
3. 切换 gcc-toolset-14
> scl enable gcc-toolset-14 bash
4. 退出 gcc-toolset-14
> exit
退出bash shell会话此时 GCC 的版本切换成系统默认版本。
#### 参与贡献 #### 参与贡献

BIN
gcc-14.2.0.tar.xz Normal file

Binary file not shown.

2220
gcc-14.spec Normal file

File diff suppressed because it is too large Load Diff