新的 GCC 文档与旧的文档兼容吗?

发布于 2024-12-23 09:39:03 字数 334 浏览 2 评论 0原文

一个例子: 在“Using and Porting GCC”(2001)中,有一个宏SMALL_REGISTER_CLASSES,它告诉编译器最小化硬寄存器的生命周期。它的定义由一个简单的零/非零表达式组成,通常是一个常量。 在“GCC 内部结构”(2011)中,上面的宏被以下目标钩子替换: bool TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P(枚举模式) 这并不像原来的宏那么简洁。

注意:就移植而言,不确定“使用和移植”和“GCC 内部结构”之间有什么区别(RTL 表示、机器描述和目标描述模式和功能)。我首先彻底阅读了第一个文档,因为那是建议的文档,而忽略了它实际上已有 10 年历史的事实。

An example:
In "Using and Porting GCC" (2001), there is the macro SMALL_REGISTER_CLASSES, which tells the compiler to minimize the lifetime of hard registers. Its definition consists of a simple zero / non-zero expression, usually a constant.
In "GCC internals" (2011), the above macro is replaced by the following target hook:
bool TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P(enum mode)
which is not nearly as neat as the original macro.

Note: Not sure what the difference is between "Using and Porting" and "GCC internals" as far as porting goes (RTL representation, Machine Description and Target Description Modes and Functions). I started by reading the first one thoroughly because that was the suggested documentation, overlooking the fact that it is actually 10 years old.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陪我终i 2024-12-30 09:39:03

简短的回答是“不”。

2001 年初,当前版本为 2.95,尽管 3.0 已经进入开发阶段。当前版本是 4.6,几个月后将发布 4.7。这是两个主要的版本号,意味着对源代码的两次大规模重写,再加上许多其他较小的更改,这些更改加起来会导致大量的代码改动。

当然,您会发现许多细节现在和以前一样,但旧文档不可信。

目前的文档就其本身而言相当不错,但它并不全面,因此如果您想在了解更多内容的同时对其进行改进,我相信我们将不胜感激。 ;)

The short answer is "no".

At the start of 2001, the current release was 2.95, although 3.0 was already well into development. The current release is 4.6, with 4.7 due in a few months. That's two major release numbers which means two large-scale rewrites of the source code, plus many many other smaller changes that add up to a lot of code churn.

Of course, you'll find lots of details that are the same now as ever, but the old documents are not to be trusted.

The current documentation is pretty good, as far as it goes, but it's hardly comprehensive, so if you'd like to improve it as you learn more, I'm sure it'll be appreciated. ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文