aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-01-21Sema: fix `is_non_null_ptr` handling for runtime-known pointersmlugg
We can still often determine a comptime result based on the type, even if the pointer is runtime-known. Also, we previously used load -> is non null instead of AIR `is_non_null_ptr` if the pointer is comptime-known, but that's a bad heuristic. Instead, we should check for the pointer to be comptime-known, *and* for the load to be comptime-known, and only in that case should we call `Sema.analyzeIsNonNull`. Resolves: #22556
2025-01-20x86_64: rewrite `@abs`Jacob Young
2025-01-20Merge pull request #22530 from alexrp/omit-unwind-tablesAlex Rønne Petersen
Fix building the standard library without CFI directives
2025-01-19llvm: convert `@divFloor` and `@mod` to forms llvm will recognizeJacob Young
On x86_64, the `@divFloor` change is a strict improvement, and the `@mod` change adds one zero latency instruction. In return, once we upgrade to LLVM 20, when the optimizer discovers one of these operations has a power-of-two constant rhs, it will be able to optimize the entire operation into an `ashr` or `and`, respectively. #I CPL CPT old `@divFloor` | 8 | 15 | .143 | new `@divFloor` | 7 | 15 | .148 | old `@mod` | 9 | 17 | .134 | (rip llvm new `@mod` | 10 | 17 | .138 | scheduler)
2025-01-19Merge pull request #22524 from alexrp/libunwind-exceptionsAlex Rønne Petersen
`libunwind`: Build C files with `-fexceptions`.
2025-01-18x86_64: add a bunch of instruction encodingsJacob Young
Closes #19773
2025-01-19Merge pull request #22531 from mlugg/various-fixesMatthew Lugg
incremental, Sema: minor fixes
2025-01-18x86_64: enable struct field reorderingJacob Young
The blocker for enabling this feature was my need to debug the emitted assembly without debug info and having to manually inspect memory to determine struct contents. However, we now have debug info! (lldb) v -L foo bar 0x00007fffffffda20: (repro.repro.Foo) foo = { 0x00007fffffffda24: .x = 12 0x00007fffffffda20: .y = 34 } 0x00007fffffffda28: (repro.repro.Bar) bar = { 0x00007fffffffda28: .x = 56 0x00007fffffffda2c: .y = 78 } Updates #21530
2025-01-18Sema: don't try to initialize global union pointer at comptimemlugg
Resolves: #19832
2025-01-18incremental: fix enum resolution bugsmlugg
2025-01-18compiler: Fix @import("builtin").unwind_tables logic.Alex Rønne Petersen
2025-01-18libunwind: Build C files with -fexceptions.Alex Rønne Petersen
See: https://github.com/llvm/llvm-project/pull/121819 This fixes LTO for libunwind, so also re-enable support for that. Closes #12828.
2025-01-17macho linker: adjust symbol priorityAndrew Kelley
strong symbols always take precedence over weak symbols.
2025-01-17remove memcpy and memmove from bundled libcsAndrew Kelley
These are provided instead by compiler_rt. Part of #2879
2025-01-16x86_64: fix crashes compiling the compiler and testsJacob Young
2025-01-16x86_64: pass more behavior testsJacob Young
2025-01-16x86_64: implement load and storeJacob Young
2025-01-16x86_64: implement aggregate accessJacob Young
2025-01-16x86_64: implement union accessJacob Young
2025-01-16x86_64: remove pointless jump to epilogueJacob Young
2025-01-16x86_64: implement pointer addition and subtractionJacob Young
2025-01-16x86_64: implement element accessJacob Young
2025-01-16x86_64: implement passing undefined as a call arg with the new ccJacob Young
2025-01-16x86_64: fix f16 miscomp exposed by new calling conventionJacob Young
2025-01-16x86_64: fix hazards exposed by new calling conventionJacob Young
2025-01-16x86_64: implement a custom calling convention for the Zig languageJacob Young
2025-01-16x86_64: fix unnecessary register savingJacob Young
2025-01-16x86_64: add some ReleaseSmall supportJacob Young
2025-01-16x86_64: optimize value copying slightlyJacob Young
2025-01-16x86_64: implement switch jump tablesJacob Young
2025-01-16x86_64: implement clz and notJacob Young
2025-01-16x86_64: the previous loop abstraction was too confusingJacob Young
The temp usage was non-obvious, and implicit instructions hard to reason about.
2025-01-16x86_64: demolish the oldJacob Young
2025-01-16x86_64: 2 means betterJacob Young
2025-01-16x86_64: implement fallback for pcmpeqqJacob Young
2025-01-16x86_64: testingJacob Young
2025-01-16x86_64: looped instructionsJacob Young
2025-01-16x86_64: rewrite arithmeticJacob Young
2025-01-16x86_64: rewriteJacob Young
2025-01-16all: update to `std.builtin.Type.{Pointer,Array,StructField}` field renamesmlugg
2025-01-16Sema: prepare for `sentinel` -> `sentinel_ptr` field renamemlugg
The commit 2 after this will explain this diff.
2025-01-16compiler: make it easier to apply breaking changes to `std.builtin`mlugg
Documentation for this will be on the wiki shortly. Resolves: #21842
2025-01-16all: update to `std.builtin.Type.Pointer.Size` field renamesmlugg
This was done by regex substitution with `sed`. I then manually went over the entire diff and fixed any incorrect changes. This diff also changes a lot of `callconv(.C)` to `callconv(.c)`, since my regex happened to also trigger here. I opted to leave these changes in, since they *are* a correct migration, even if they're not the one I was trying to do!
2025-01-15link.MachO: fix error reporting in flushModuleAndrew Kelley
2025-01-15link.Elf: fix error reporting for failed hot swapAndrew Kelley
2025-01-15Compilation: windows doesn't prelink yetAndrew Kelley
2025-01-15wasm linker: omit data count section when value is zeroAndrew Kelley
2025-01-15wasm linker: change rules about symbol visibilityAndrew Kelley
export by default means export, as expected. if you want hidden visibility then use hidden visibility.
2025-01-15wasm linker: delete commented out codeAndrew Kelley
this logic has not yet been ported to the new design, but the logic is safe and sound in the git history and does not need to also live as commented out code
2025-01-15wasm linker: fix TLS data segmentsAndrew Kelley
fix calculation of alignment and size include __tls_align and __tls_size globals along with __tls_base include them only if the TLS segment is emitted add missing reloc logic for memory_addr_tls_sleb fix name of data segments to include only the prefix