[#Compiler] Day 1 of #AoCO2025 Study Notes

While the original uses #CompilerExplorer, I wanted to replicate the analysis locally.

In this post, I have used #gcc, #clang, llvm-objdump and #LLDB to analyze.

Read more here: https://gapry.github.io/2026/01/01/Advent-of-Compiler-Optimisations-Study-Notes-01.html

Study Notes: Why xor eax, eax?

Study Notes: Why xor eax, eax?

Gapry's Blog
#gcc supporting both [[gnu::tailcall]] and [[clang::tailcall]] but clang only supporting [[clang::tailcall]] (and its implication about which compiler gets to set de-facto standards) makes me feel a way

`error: cannot tail-call: return value used after call` is a bad error message when the real cause is "return type is too large" (on x86-64 bigger than 16B; on arm bigger than 4B).

(Also, I can guess at what code it wants to generate that it can't tail-call such things, but also that's silly code.)

I don't imagine that the fixes for such things are easy.

#gcc

I wish #GCC had a way for me to specify a function-scoped cleanup function; for use with my alloca()-allocated variables.

block-scoped: alloc=VLA, cleanup=[[gnu::cleanup()]]
function-scoped: alloc=alloca(), cleanup=???

@mrmasterkeyboard @hexaheximal In terms of architectures I'm mostly limited by time, hardware that I have access to and toolchain support.

#OS1337 on #Xenon is quite low on the list but still not on the bottom because I have systems in my possession. Unlike "normal" #32bit #PowerPC systems.

  • Mind you I have exactly 0 "#PowerSaving" or other energy optimizations in _OS/1337 (or even multithreading) support built-in, which on most modern systems results in dogshit performance below rated base clock because modern CPUs and Chipsets expect the OS to communicate with them and if it doesn't they gonna assume the OS is fubar and drop into failsafe modes. With some luck they may even prevent the CPU from frying itself and turn on the fan on their own.

I don't have much hands-on aside from mainstream #ix86 / #x86 / #amd64 Systems and #ARMv5r11 / #ARM64 SBCs.

OS1337/docu/ideas/architectures.tsv at main · OS-1337/OS1337

OS/1337 Project . Contribute to OS-1337/OS1337 development by creating an account on GitHub.

GitHub
النموذج الأولي الأول من Kosmera سيعرض عالميًا في CES 2026، مع إعادة تعريف سيارة السوبر الكهربائية الذكية
https://zurl.co/VTqDw #GCC #KOSMERA #UAE #KSA #pressreleasedistribution

Somali, Mİsİr, Cibuti ve KİK, İsrailın Somalilandı tanıma kararına kınama dilekçesi sundu. Bu hamle, ulusátığı hukuk ve bölgesel bağımılık önceçeği tür siçmenin önce kınma oldu
Detaylı daçılar. Detaylar sizin işi

🚩 #Somaliland #GCC #KİskütHaklılar #Ulusalışiş #Bağgım

[Перевод] Когда компиляторы удивляют

Компиляторы то и дело удивляют меня очень хитрыми трюками. Когда я впервые увидел эту оптимизацию, то едва смог поверить в её реальность. Я изучал оптимизацию циклов и написал простую функцию, суммирующую все числа до заданного значения...

https://habr.com/ru/articles/980702/

#godbolt #gcc #clang #оптимизация_кода

Когда компиляторы удивляют

Компиляторы то и дело удивляют меня очень хитрыми трюками. Когда я впервые увидел эту оптимизацию, то едва смог поверить в её реальность. Я изучал оптимизацию циклов и написал вот такую простую...

Хабр
🌘 使用 Nix 自定義交叉編譯器:為 Risc OS 打造現代開發環境
➤ 跨越時空的編譯橋樑:從現代 Mac 到復古 Risc OS 的 Nix 實踐
https://www.hobson.space/posts/nixcross/
這篇文章記錄了作者如何克服 Nix 生態系統中文件不足的挑戰,成功為復古作業系統 Risc OS 建構一套自定義的交叉編譯工具鏈。儘管作者已擁有針對 Risc OS 修改過的舊版 GCC 4.7.4,但在現代 Arm Mac 環境下直接編譯近乎不可能。透過 Nix 的 Flake 與強大的隔離機制,作者深入解析了 Nix 內部對 `buildPlatform`、`hostPlatform` 與 `targetPlatform` 的定義邏輯。他揭示瞭如何利用 `wrapCCWith` 封裝編譯器,並透過覆寫 `stdenv` 的巧妙技巧,讓 Nix 能自動處理工具前綴(如 `arm-unknown-riscos-gcc`),最終打造出一個如同原生 `pkgsCross` 般流暢的開
##NixOS #交叉編譯 #GCC #開源軟體 #RiscOS
Custom Cross Compiler with Nix

How to use a custom cross compiler with nix

Hobson Space

Announcement: COBOLworx would be happy to support anyone working on moving COBOL applications from IBM's z/OS COBOL or Rocket Software COBOL to GnuCOBOL or GCC COBOL. Free until it becomes a "project".

#cobol #gnucobol #gcc-cobol #gcobol #gcc #cobolworx #symas