Skip to content

Commit

Permalink
docs(newsletter): add draft 合订本 2
Browse files Browse the repository at this point in the history
  • Loading branch information
xen0n committed Jan 28, 2025
1 parent 61fa1d8 commit e0dcade
Show file tree
Hide file tree
Showing 3 changed files with 286 additions and 227 deletions.
7 changes: 6 additions & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@ const config: Config = {
from: '/newsletter/this-week-in-loongarch-51',
},

// these months in loongarch 52 is TWiL 52~83
// these months in loongarch 52 is split into multiple volumes
{
to: '/newsletter/these-months-in-loongarch-52',
from: '/newsletter/these-months-in-loongarch-52-vol-1',
},
// these months in loongarch 52 is TWiL 52~83
{
to: '/newsletter/these-months-in-loongarch-52',
from: '/newsletter/this-week-in-loongarch-52',
Expand Down
256 changes: 30 additions & 226 deletions newsletter/2025-01-28-these-months-in-loongarch-52.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
slug: these-months-in-loongarch-52
title: 每半年卅三龙:合订本(第 52~84 期)
title: 每半年卅三龙:合订本(卷一)(第 52~84 期)
authors: [xen0n]
date: 2025-01-28T23:00:00+08:00
date: 2025-01-28T17:00:00+08:00
tags: [每周一龙]
---

每周(尽量)为大家报道 LoongArch 社区最前线的第一手新鲜资讯!
近半年的进展实在太多啦。
详情点进来看!
除夕快乐!每半年(尽量)为大家报道 LoongArch 社区最前线的第一手冷链保鲜资讯 :smirk_cat:
近半年的进展实在太多啦,为了使您阅读更方便~~也为了保证本文能在除夕之夜之前完成~~,本文包含了近半年
LoongArch 在 Linux、ABI 方面的完整技术进展,以及其他工具链话题的部分内容;其余的内容将在接下来的合订本(卷二)继续报道。
《咱龙了吗?》贡献者们向您和您的家人致以节日的问候!

<!-- truncate -->

Expand Down Expand Up @@ -255,7 +256,6 @@ Yanteng Si [改写了](https://lore.kernel.org/loongarch/20241021105139.50087-1-
Binbin Zhou [修复了](https://lore.kernel.org/loongarch/[email protected]/)
`loongson2-apb` 驱动中使用 `GENMASK``unsigned long` 类型)操作高 32 位,导致在 32 位系统上出现未定义行为的问题。


#### 第 72 期 (2024-10-29 ~ 2024-11-04) {#linux-72}

Huacai Chen 为 LoongArch 上的 KASAN
Expand Down Expand Up @@ -505,7 +505,8 @@ LA32 支持是一项[社区英雄帖][la32-call-for-hero]工作。

#### binutils {#binutils}

##### 第 52 期 (2024-06-10 ~ 2024-06-17) {#binutils-52}
以下内容横跨原定第 52 期 (2024-06-10 ~ 2024-06-17) 至第 54 期 (2024-06-25 ~ 2024-07-01)
周报的内容。

[xry111] 参考 [AArch64 实现](https://sourceware.org/pipermail/binutils/2024-May/134367.html),为 Binutils 的 BFD 链接器[增加了](https://sourceware.org/pipermail/binutils/2024-June/135261.html)在 LoongArch ELF 中使用 RELR 格式编码相对重定位 (relative relocation) 记录的功能。随后 Alan Modra [修复了](https://sourceware.org/pipermail/binutils/2024-July/135464.html) [xry111] 写错的一处测试。使用 RELR 格式编码相对重定位能有效缩减一些位置无关可执行文件 (PIE) 和动态链接库的大小,详见 [Maskray 的文章](https://maskray.me/blog/2021-10-31-relative-relocations-and-relr)

Expand All @@ -522,86 +523,33 @@ LA32 支持是一项[社区英雄帖][la32-call-for-hero]工作。
- 链接器松弛 (relaxation) 过程使用的算法渐进复杂度[有改进空间](https://github.com/loongson-community/discussions/issues/56),尚未解决。[xry111] 猜测该问题可能是导致链接 Python 非常缓慢的原因。
- 链接器松弛过程[不必要地保留了 GOT 表项](https://github.com/loongson-community/discussions/issues/58),尚未解决。

##### 第 53 期 (2024-06-18 ~ 2024-06-24) {#binutils-53}

##### 第 54 期 (2024-06-25 ~ 2024-07-01) {#binutils-54}

##### 第 55 期 (2024-07-02 ~ 2024-07-08) {#binutils-55}

##### 第 56 期 (2024-07-09 ~ 2024-07-15) {#binutils-56}

##### 第 57 期 (2024-07-16 ~ 2024-07-22) {#binutils-57}

##### 第 58 期 (2024-07-23 ~ 2024-07-29) {#binutils-58}

##### 第 59 期 (2024-07-30 ~ 2024-08-05) {#binutils-59}

##### 第 60 期 (2024-08-06 ~ 2024-08-12) {#binutils-60}

##### 第 61 期 (2024-08-13 ~ 2024-08-19) {#binutils-61}

##### 第 62 期 (2024-08-20 ~ 2024-08-26) {#binutils-62}

##### 第 63 期 (2024-08-27 ~ 2024-09-02) {#binutils-63}

##### 第 64 期 (2024-09-03 ~ 2024-09-09) {#binutils-64}

##### 第 65 期 (2024-09-10 ~ 2024-09-16) {#binutils-65}

##### 第 66 期 (2024-09-17 ~ 2024-09-23) {#binutils-66}

##### 第 67 期 (2024-09-24 ~ 2024-09-30) {#binutils-67}

##### 第 68 期 (2024-10-01 ~ 2024-10-07) {#binutils-68}

##### 第 69 期 (2024-10-08 ~ 2024-10-14) {#binutils-69}

##### 第 70 期 (2024-10-15 ~ 2024-10-21) {#binutils-70}

##### 第 71 期 (2024-10-22 ~ 2024-10-28) {#binutils-71}

##### 第 72 期 (2024-10-29 ~ 2024-11-04) {#binutils-72}

##### 第 73 期 (2024-11-05 ~ 2024-11-11) {#binutils-73}

##### 第 74 期 (2024-11-12 ~ 2024-11-18) {#binutils-74}

##### 第 75 期 (2024-11-19 ~ 2024-11-25) {#binutils-75}

##### 第 76 期 (2024-11-26 ~ 2024-12-02) {#binutils-76}

##### 第 77 期 (2024-12-03 ~ 2024-12-09) {#binutils-77}

##### 第 78 期 (2024-12-10 ~ 2024-12-16) {#binutils-78}

##### 第 79 期 (2024-12-17 ~ 2024-12-23) {#binutils-79}

##### 第 80 期 (2024-12-24 ~ 2024-12-30) {#binutils-80}

##### 第 81 期 (2024-12-31 ~ 2025-01-06) {#binutils-81}

##### 第 82 期 (2025-01-07 ~ 2025-01-13) {#binutils-82}

##### 第 83 期 (2025-01-14 ~ 2025-01-20) {#binutils-83}

##### 第 84 期 (2025-01-21 ~ 2025-01-27) {#binutils-84}
更多内容仍在整理中,请期待合订本(卷二) :smiling_imp:

#### GCC {#gcc}

第 59 至 84 期内容仍在整理中,请期待合订本(卷二) :smiling_imp:

##### 第 52 期 (2024-06-10 ~ 2024-06-17) {#gcc-52}

[xry111] [使得](https://gcc.gnu.org/r15-1674) GCC 估算 RTL 表达式成本时考虑使用 `bstrins.[wd]` 指令的情况,以在更多情况下使用 `bstrins.[wd]` 指令。

##### 53 期 (2024-06-18 ~ 2024-06-24) {#gcc-53}
##### 55 期 (2024-07-02 ~ 2024-07-08) {#gcc-55}

##### 第 54 期 (2024-06-25 ~ 2024-07-01) {#gcc-54}
Lulu Cheng [修复了](https://gcc.gnu.org/pipermail/gcc-patches/2024-July/656133.html)一些测试用例。

##### 第 55 期 (2024-07-02 ~ 2024-07-08) {#gcc-55}
Lulu Cheng 还[定义了](https://gcc.gnu.org/pipermail/gcc-patches/2024-July/656134.html)
GPR 与浮点条件码寄存器(FCC, CFR)之间搬运操作的成本,也属于修复了测试。

Lulu Cheng 还[防止了]`long double` 塞进 FPR 的行为:塞不下。

Lulu Cheng 还[移除了](https://gcc.gnu.org/pipermail/gcc-patches/2024-July/656379.html)一些无用代码。

##### 第 56 期 (2024-07-09 ~ 2024-07-15) {#gcc-56}

[xry111] 参考 [RISC-V 实现](https://gcc.gnu.org/pipermail/gcc-patches/2024-July/656055.html),使用 `fclass.[sd]` 指令[实现了](https://gcc.gnu.org/pipermail/gcc-patches/2024-July/656972.html) `__builtin_isinf``__builtin_isnormal`,以及 `__builtin_isfinite` 操作。和平台无关的默认实现相比,使用 `fclass.[sd]` 指令需要的指令数更少,且不需要从内存加载常量,还能够规避[在处理 signaling NaN 时触发 IEEE-754 标准不允许的浮点异常](https://gcc.gnu.org/PR66462)。该实现依赖于 [value range 支持](https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657883.html) (否则会在一些情况下劣化代码并引发测试失败)。目前该实现已在 value range 支持[合并](https://gcc.gnu.org/r15-2924)后被[合并](https://gcc.gnu.org/r15-2931)

Lulu Cheng [整理了](https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657195.html)关于拆分数据移动操作的代码,合并了重复的函数。

##### 第 57 期 (2024-07-16 ~ 2024-07-22) {#gcc-57}

在测试上述 `fclass.[sd]` 支持时,[xry111] 注意到在一些情况下 GCC 生成的 LoongArch 代码中有冗余的符号扩展操作,而其生成的 RISC-V 代码却没有这一问题。经排查,这是由于 GCC 会将符号扩展操作提到按位操作之外:这通常能将 3 次操作降为 2 次,但对于 LoongArch 或 RISC-V 这样的架构来说,却会阻碍后续优化工序将加法 (或类似运算) 和符号扩展 (或类似操作) 组合为一条 `add.w` 指令。于是 [xry111] [抄了](https://gcc.gnu.org/r15-2426) RISC-V 对该问题的解法。
Expand All @@ -610,139 +558,22 @@ LA32 支持是一项[社区英雄帖][la32-call-for-hero]工作。

##### 第 58 期 (2024-07-23 ~ 2024-07-29) {#gcc-58}

[xry111] [优化了](https://gcc.gnu.org/r15-2433) GCC 对 `__builtin_bswap32``__builtin_bswap64` 的代码生成,使之使用一条 `revb.2w``revb.d` 指令,而非毫无必要地组合使用 `revb.2h` + `rotri.w``revb.4h` + `revh.d`

##### 第 59 期 (2024-07-30 ~ 2024-08-05) {#gcc-59}

##### 第 60 期 (2024-08-06 ~ 2024-08-12) {#gcc-60}

##### 第 61 期 (2024-08-13 ~ 2024-08-19) {#gcc-61}

##### 第 62 期 (2024-08-20 ~ 2024-08-26) {#gcc-62}

##### 第 63 期 (2024-08-27 ~ 2024-09-02) {#gcc-63}

##### 第 64 期 (2024-09-03 ~ 2024-09-09) {#gcc-64}

##### 第 65 期 (2024-09-10 ~ 2024-09-16) {#gcc-65}

##### 第 66 期 (2024-09-17 ~ 2024-09-23) {#gcc-66}

##### 第 67 期 (2024-09-24 ~ 2024-09-30) {#gcc-67}

##### 第 68 期 (2024-10-01 ~ 2024-10-07) {#gcc-68}

##### 第 69 期 (2024-10-08 ~ 2024-10-14) {#gcc-69}

##### 第 70 期 (2024-10-15 ~ 2024-10-21) {#gcc-70}

##### 第 71 期 (2024-10-22 ~ 2024-10-28) {#gcc-71}

##### 第 72 期 (2024-10-29 ~ 2024-11-04) {#gcc-72}

##### 第 73 期 (2024-11-05 ~ 2024-11-11) {#gcc-73}

##### 第 74 期 (2024-11-12 ~ 2024-11-18) {#gcc-74}

##### 第 75 期 (2024-11-19 ~ 2024-11-25) {#gcc-75}

##### 第 76 期 (2024-11-26 ~ 2024-12-02) {#gcc-76}
Yang Yujie [提升了](https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657973.html)
LoongArch GCC 对 系统 `awk` 种类的兼容性:现在可以在 `awk` 不是 GNU awk 的系统上构建 GCC 了。

##### 第 77 期 (2024-12-03 ~ 2024-12-09) {#gcc-77}

##### 第 78 期 (2024-12-10 ~ 2024-12-16) {#gcc-78}

##### 第 79 期 (2024-12-17 ~ 2024-12-23) {#gcc-79}

##### 第 80 期 (2024-12-24 ~ 2024-12-30) {#gcc-80}

##### 第 81 期 (2024-12-31 ~ 2025-01-06) {#gcc-81}

##### 第 82 期 (2025-01-07 ~ 2025-01-13) {#gcc-82}

##### 第 83 期 (2025-01-14 ~ 2025-01-20) {#gcc-83}
[xry111] [优化了](https://gcc.gnu.org/r15-2433) GCC 对 `__builtin_bswap32``__builtin_bswap64` 的代码生成,使之使用一条 `revb.2w``revb.d` 指令,而非毫无必要地组合使用 `revb.2h` + `rotri.w``revb.4h` + `revh.d`

##### 第 84 期 (2025-01-21 ~ 2025-01-27) {#gcc-84}
Lulu Cheng 将向量类型的「或非」、「与非」两种操作的描述[改用了](https://gcc.gnu.org/pipermail/gcc-patches/2024-July/658454.html)
GCC 标准名称,也对标量类型[这么做了](https://gcc.gnu.org/pipermail/gcc-patches/2024-July/658450.html)

#### LLVM {#llvm}

##### 第 52 期 (2024-06-10 ~ 2024-06-17) {#llvm-52}

TODO: register pressure scheduler https://github.com/llvm/llvm-project/pull/95741 [heiher]

TODO: lld TLSDESC https://github.com/llvm/llvm-project/pull/94451 [wangleiat]

[heiher]: https://github.com/heiher
[wangleiat]: https://github.com/wangleiat

##### 第 53 期 (2024-06-18 ~ 2024-06-24) {#llvm-53}

##### 第 54 期 (2024-06-25 ~ 2024-07-01) {#llvm-54}

##### 第 55 期 (2024-07-02 ~ 2024-07-08) {#llvm-55}

##### 第 56 期 (2024-07-09 ~ 2024-07-15) {#llvm-56}

##### 第 57 期 (2024-07-16 ~ 2024-07-22) {#llvm-57}

##### 第 58 期 (2024-07-23 ~ 2024-07-29) {#llvm-58}

##### 第 59 期 (2024-07-30 ~ 2024-08-05) {#llvm-59}

##### 第 60 期 (2024-08-06 ~ 2024-08-12) {#llvm-60}

##### 第 61 期 (2024-08-13 ~ 2024-08-19) {#llvm-61}

##### 第 62 期 (2024-08-20 ~ 2024-08-26) {#llvm-62}

##### 第 63 期 (2024-08-27 ~ 2024-09-02) {#llvm-63}

##### 第 64 期 (2024-09-03 ~ 2024-09-09) {#llvm-64}

##### 第 65 期 (2024-09-10 ~ 2024-09-16) {#llvm-65}

##### 第 66 期 (2024-09-17 ~ 2024-09-23) {#llvm-66}

##### 第 67 期 (2024-09-24 ~ 2024-09-30) {#llvm-67}

##### 第 68 期 (2024-10-01 ~ 2024-10-07) {#llvm-68}

##### 第 69 期 (2024-10-08 ~ 2024-10-14) {#llvm-69}

##### 第 70 期 (2024-10-15 ~ 2024-10-21) {#llvm-70}

##### 第 71 期 (2024-10-22 ~ 2024-10-28) {#llvm-71}

##### 第 72 期 (2024-10-29 ~ 2024-11-04) {#llvm-72}

##### 第 73 期 (2024-11-05 ~ 2024-11-11) {#llvm-73}

##### 第 74 期 (2024-11-12 ~ 2024-11-18) {#llvm-74}

##### 第 75 期 (2024-11-19 ~ 2024-11-25) {#llvm-75}

##### 第 76 期 (2024-11-26 ~ 2024-12-02) {#llvm-76}

##### 第 77 期 (2024-12-03 ~ 2024-12-09) {#llvm-77}

##### 第 78 期 (2024-12-10 ~ 2024-12-16) {#llvm-78}

##### 第 79 期 (2024-12-17 ~ 2024-12-23) {#llvm-79}

##### 第 80 期 (2024-12-24 ~ 2024-12-30) {#llvm-80}

##### 第 81 期 (2024-12-31 ~ 2025-01-06) {#llvm-81}

##### 第 82 期 (2025-01-07 ~ 2025-01-13) {#llvm-82}

##### 第 83 期 (2025-01-14 ~ 2025-01-20) {#llvm-83}

##### 第 84 期 (2025-01-21 ~ 2025-01-27) {#llvm-84}

该部分内容仍在整理中,请期待合订本(卷二) :smiling_imp:

#### Rust {#rust}

##### 第 52 期 (2024-06-10 ~ 2024-06-17)
以下内容横跨原定第 52 期 (2024-06-10 ~ 2024-06-17) 至第 54 期 (2024-06-25 ~ 2024-07-01)
周报的内容。

第 50 期周报[提到的](./2024-05-30-this-week-in-loongarch-50.md#rust) LoongArch64
musl target 工作已经完成:继提案于 6 月 12 日无异议[通过](https://github.com/rust-lang/compiler-team/issues/753#issuecomment-2162011200)之后,[heiher] 便将
Expand All @@ -765,34 +596,7 @@ targets 的文档内容:由于生态建设迅速,先前的许多信息已经

[xen0n]: https://github.com/xen0n


## 杂闻播报 {#assorted-news}

TODO: memtest86+ [kilaterlee] [MarsDoge]

TODO: edk2 [MarsDoge]

TODO: zig [yxd-ym]

TODO: grub2 case-sensitivity [MingcongBai]

[kilaterlee]: https://github.com/kilaterlee
[MarsDoge]: https://github.com/MarsDoge
[MingcongBai]: https://github.com/MingcongBai
[yxd-ym]: https://github.com/yxd-ym



## 社区整活:儿: {#grins}

本栏目接受任何网友的投稿,只要内容与 LoongArch 有关,并可以为读者带来价值,
无论严肃贡献(整的大活:儿:)或是博君一笑都一概欢迎!

TODO: stable amdgpu on xa61200 with better cooling [LiarOnce]

[xry111] [使用](https://gist.github.com/xry111/88fa001fa0ac0a2e78f2cbf3b9f0839a) LBT 指令实现 GCC 的 `__builtin_add_overflow``__builtin_addc` 等操作。实测表明这样做生成的代码虽然指令数相比默认实现少,但跑得反而更慢。尽管理论上仍可将其用于 `-Os`,但 [xry111] 认为这样做意义不大,放弃了该实现。

[LiarOnce]: https://github.com/LiarOnce
更多内容仍在整理中,请期待合订本(卷二) :smiling_imp:

## 张贴栏 {#bulletin}

Expand Down
Loading

0 comments on commit e0dcade

Please sign in to comment.