In this blog post, I will describe my recent work on improving and optimizing the handling of x87 code in FEX. This work landed on July 22, 2024, through commit https://github.com/FEX-Emu/FEX/commit/a1378f94ce8e7843d5a3cd27bc72847973f8e7ec (tests and updates to size benchmarks landed separately). FEX is an ARM64 emulator of Intel assembly and, as such, needs to be able to handle things as old as…
WebAssembly Reference Types in LLVM Introduction This post is an overview of the implementation of the WebAssembly Reference Types proposal in Clang/LLVM. It is a follow-up to two presentations: "A walk on the weird side: Opaque WebAssembly values and LLVM" (2021 LLVM Dev Mtg) by Andy Wingo, and "Clang, Clang: Who's there? WebAssembly!" (2022 LLVM Dev Mtg) by myself. This is the culmination of a…
Context On April 18, 2020, Keith Miller from Apple committed a change titled Redesign how we do for-of iteration for JSArrays . This patch adds an intrinsic for the for-of javascript construct when they are being iterated with the built-in Symbol.iterator . However, the implementation is only for 64 bit architectures. At Igalia , we maintain and support javascriptCore 32bits so on July 29, 2020, I…
Compilers tend to be large pieces of software that provide an enormous amount of options. We take a quick look at how to find what JavaScriptCore (JSC) provides. If you grab a copy of the WebKit source, you can easily build jsc with Tools/Scripts/build-jsc --release --jsc-only (from the WebKit root directory). As usual, running the resulting binary will get you into a JavaScript REPL. For example…
When I started compiler work delta was all the rage. It would turn a testcase with thousands of lines into a single small one with perhaps no more than 15 crashing your compiler in exactly the same way as the original testcase. I have used and abused this tool but it turns out it could be improved. John Regehr and his team did so with C-Reduce (who by he way also developed C-Smith , but that's…
Introduction Part of my work for Igalia is on the 32bit support on MIPS (little endian) and ARM for JSC (JavaScriptCore - the JavaScript compiler in WebKit) and one of the problems we face is that of reproducibility of failures. We have boards to test these, namely Raspberry Pi 3 Model B+ boards, running a 32bits ARM kernel and Imagination CI20 boards running a mipsel kernel - all built with…
Since I joined Igalia back in May, I have been working on WebKit. After more than a decade working on GCC and LLVM, moving codebases, workflows, and compilation techniques and optimizations meant I was in very unfamiliar territory. One of the main things to understand is the contribution process and each project has their own rules and methodology, so lets start straight into how to contribute to…