重启每日废话

天气雨 怎么还在摘樱桃。 发现想要根据报错来解决出现的问题的话就会出现本不该是 gcc 12 特性的 patch 被引入。 于是推倒重来,一个一个标记。 干的时候又很不耐烦,想要掏出脚本。不过还是不要太激进了,等编译的时候看看书。

April 2, 2024 · xyenchi

继续移植gprofng

天气晴。 早上到达武汉非常冷,发现了一个很中二的说法,回笼觉念成回龙决。 偷一个 /usr/include/sys/ucontext.h 出来观测,qemu 里面显示得太异常了。大佬告诉我这是 glibc 的内容。 /* struct ucontext definition, RISC-V version. Copyright (C) 1997-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see <https://www.gnu.org/licenses/>. */ /* Don't rely on this, the interface is currently messed up and may need to be broken to be fixed. */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 #include <features.h> #include <bits/types/sigset_t.h> #include <bits/types/stack_t.h> typedef unsigned long int __riscv_mc_gp_state[32]; #ifdef __USE_MISC # define NGREG 32 # define REG_PC 0 # define REG_RA 1 # define REG_SP 2 # define REG_TP 4 # define REG_S0 8 # define REG_S1 9 # define REG_A0 10 # define REG_S2 18 # define REG_NARGS 8 typedef unsigned long int greg_t; /* Container for all general registers. */ typedef __riscv_mc_gp_state gregset_t; /* Container for floating-point state. */ typedef union __riscv_mc_fp_state fpregset_t; #endif struct __riscv_mc_f_ext_state { unsigned int __f[32]; unsigned int __fcsr; }; struct __riscv_mc_d_ext_state { unsigned long long int __f[32]; unsigned int __fcsr; }; struct __riscv_mc_q_ext_state { unsigned long long int __f[64] __attribute__ ((__aligned__ (16))); unsigned int __fcsr; /* Reserved for expansion of sigcontext structure. Currently zeroed upon signal, and must be zero upon sigreturn. */ unsigned int __glibc_reserved[3]; }; union __riscv_mc_fp_state { struct __riscv_mc_f_ext_state __f; struct __riscv_mc_d_ext_state __d; struct __riscv_mc_q_ext_state __q; }; typedef struct mcontext_t { __riscv_mc_gp_state __gregs; union __riscv_mc_fp_state __fpregs; } mcontext_t; /* Userlevel context. */ typedef struct ucontext_t { unsigned long int __uc_flags; struct ucontext_t *uc_link; stack_t uc_stack; sigset_t uc_sigmask; /* There's some padding here to allow sigset_t to be expanded in the future. Though this is unlikely, other architectures put uc_sigmask at the end of this structure and explicitly state it can be expanded, so we didn't want to box ourselves in here. */ char __glibc_reserved[1024 / 8 - sizeof (sigset_t)]; /* We can't put uc_sigmask at the end of this structure because we need to be able to expand sigcontext in the future. For example, the vector ISA extension will almost certainly add ISA state. We want to ensure all user-visible ISA state can be saved and restored via a ucontext, so we're putting this at the end in order to allow for infinite extensibility. Since we know this will be extended and we assume sigset_t won't be extended an extreme amount, we're prioritizing this. */ mcontext_t uc_mcontext; } ucontext_t; #endif /* sys/ucontext.h */

March 15, 2024 · xyenchi

参加玄铁大会

早上到了深圳,参加玄铁大会。 拎着 sifive 的袋子走出地铁站被尚未面基过的群友观测到了,好好玩。 玄铁大会的会场有好多人参加,玄铁还很贴心地为大家准备了同传,虽然偶尔在听的时候截获到了一些翻译得不太对的地方。觉得同声传译真的很难,因为我对于 自己没有了解过的领域听中文都会觉得困难,他们还要去翻译自己不了解的领域。 中午和很多只在线上水群看到过的群友吃萨利亚,奶油蘑菇汤好喝,芝士焗饭太腻了,吃了几口就吃不下了。 本地热心群友帮助我找到警局办理了港澳通行证签注,万分感谢! 下午参观站台,有真能避障的小车车和人工智障 AI, 还体验了一下 openKylin 运行的小车车游戏的自动模式。 衷心祝愿 RISC-V 能发展地越来越好。耶!

March 14, 2024 · xyenchi

总结摘樱桃

天气晴。 近日被摘樱桃此等琐事缠身无法日更。 起因是为 ruyisdk 的 gcc 12 支持 RISC-V。 经过非常曲折,大概重新摘了 3 遍。 第一遍简单在邮件列表根据关键词 RISC-V 按照时间来筛选 patch。 第一个问题是有作者commit tittle里面写riscv无法筛选出来。 第二个问题是邮件列表 patch 显示的时间不是按照 commit 生成时间而是根据 commit apply 时间。 第二遍根据关键词 riscv 来筛选 patch。 导致vector部分大量报错。 第三遍写了一个脚本: https://github.com/XYenChi/EasyCherryPick README写了用法和原理,日记中不再赘述。 虽然操作过程有重名问题导致误删了 patch ,但也还有一些和 Makefile、中端相关的问题。好在最后根据关键词搜 patch 都能解决。

March 11, 2024 · xyenchi

找到漏摘的樱桃

天气雨 终于找到了摘樱桃出的问题,如果早一点切分支搜,很快就能找出来,不知道自己脑子里每天装的是什么水。 翻译推文的时候也是,命名觉得不对劲但是却不会去发现并修改。大脑不用可能真的会生锈,太恐怖了。

February 19, 2024 · xyenchi

2024开工大吉

天气雨 虽然不管究竟是否开工大吉,肯定要嘴硬说一下开工大吉的。 继续解决 RVV machine mode 报错没有声明的问题。 研究了 Makefile.in genmodes.cc gengtype 等一系列文件没能发现什么问题。 现在开始怀疑 riscv 写的相关文件有问题了。

February 18, 2024 · xyenchi

给摘樱桃偷懒想办法

天气雨 昨日和今日在想办法解决gcc自动构建的问题。 在 github CI上写首先面临着只能选择 gcc 仓库,因为 riscv-gnu-toolgitchain 的 gcc 是 submodule ,push commit 之后无法检测到 submodule 的更新自动跑。 其次面临的问题是拉取 riscv-gnu-toolchain 的 submodule 所有分支的时间消耗需要将近二十分钟。git cherry-pick commit 可能只需要二十秒。虽然可以用 git clone –depth=1 来解决,但是无法切换到我想要的release。 最重大的问题就是无法找到 gcc 12.3.0 的 ref 了,在尝试解决的途中发现了 ci 的每一次 step 都会回到初始的仓库路径。 发现只要我把自己仓库的 master 改成需要测试的代码就行。诶? 最近每天都三四点睡,十一二点起。大脑开始刷cache,无端回忆起很多以前的事情。

February 2, 2024 · xyenchi

继续摘樱桃

天气雨 今日想找commit history的蛛丝马迹发现gcc12 release之前也有很多 riscv 相关patch不是打在gcc12上的。 翻车车。

January 31, 2024 · xyenchi

摘樱桃

天气阴转雨 近日埋下了好多坑,比如刷路由器,比如给daily nonsense倒序排列。 Pick 了 gcc/gcc/Makefile.in 的一个 patch 之后昨天的问题解决了,但是又出现了 machine mode 找不到的问题。 晚上吃完麦当劳会办公室发现大家带上了嗷呜一楼避难了,发生火灾56楼确实很可怕。不过生死有命,富贵在天了。

January 30, 2024 · xyenchi

研究 Makefile

天气阴转阵雨 近日埋下了好多坑,比如刷路由器,比如给daily nonsense倒序排列。 今天突然发现了闭源运维与凶恶财务仓库具有并肩的性价比。世间万物果然都是有它的道理在。 因为到处搜 no rule to make riscv.(具体啥我忘了).gen.def 成 riscv.o ,发现了 gcc/gcc/ 下其实还有一个 Makefile.in。 于是在摘与之相关的樱桃,但是不敢乱刷了,算算时间如果解决不了问题可能过年都得在家干活的= =。

January 29, 2024 · xyenchi