1 Star 0 Fork 139

luofeng14/gcc

forked from src-openEuler/gcc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
LoongArch-define-preprocessing-macros-__loongarch_-a.patch 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
ticat_fp 提交于 2024-03-26 09:26 . LoongArch: update from gcc upstream
From 41b01fb34126d8b40635af1847b21716f62e5388 Mon Sep 17 00:00:00 2001
From: Yang Yujie <yangyujie@loongson.cn>
Date: Mon, 28 Aug 2023 09:32:16 +0800
Subject: [PATCH 059/124] LoongArch: define preprocessing macros
"__loongarch_{arch,tune}"
These are exported according to the LoongArch Toolchain Conventions[1]
as a replacement of the obsolete "_LOONGARCH_{ARCH,TUNE}" macros,
which are expanded to strings representing the actual architecture
and microarchitecture of the target.
[1] currently relased at https://github.com/loongson/LoongArch-Documentation
/blob/main/docs/LoongArch-toolchain-conventions-EN.adoc
gcc/ChangeLog:
* config/loongarch/loongarch-c.cc: Export macros
"__loongarch_{arch,tune}" in the preprocessor.
Signed-off-by: Peng Fan <fanpeng@loongson.cn>
Signed-off-by: ticat_fp <fanpeng@loongson.cn>
---
gcc/config/loongarch/loongarch-c.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/config/loongarch/loongarch-c.cc b/gcc/config/loongarch/loongarch-c.cc
index 2cf84eec7..c9b11a042 100644
--- a/gcc/config/loongarch/loongarch-c.cc
+++ b/gcc/config/loongarch/loongarch-c.cc
@@ -64,6 +64,9 @@ loongarch_cpu_cpp_builtins (cpp_reader *pfile)
LARCH_CPP_SET_PROCESSOR ("_LOONGARCH_ARCH", la_target.cpu_arch);
LARCH_CPP_SET_PROCESSOR ("_LOONGARCH_TUNE", la_target.cpu_tune);
+ LARCH_CPP_SET_PROCESSOR ("__loongarch_arch", la_target.cpu_arch);
+ LARCH_CPP_SET_PROCESSOR ("__loongarch_tune", la_target.cpu_tune);
+
/* Base architecture / ABI. */
if (TARGET_64BIT)
{
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/luofeng14/gcc.git
git@gitee.com:luofeng14/gcc.git
luofeng14
gcc
gcc
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385