Commit Graph

19027 Commits

Author SHA1 Message Date
Jeroen van Rijn
4d3f38d47a Merge pull request #7211 from Yawning/fix/fiat-ensure
core/crypto/_fiat: Fix conditional in ensure
2026-08-04 13:36:19 +02:00
Yawning Angel
e57af19fcd core/crypto/_fiat: Fix coditional in ensure
Callers in core also check so there is no user visible impact.
2026-08-04 20:07:19 +09:00
subotac
d36e9a24b1 fix: remove unused variadic element type 2026-08-04 14:02:06 +03:00
Brody
91e0e6ce47 fix: record resolved entity for proc-typed default values 2026-08-04 19:12:08 +10:00
gingerBill
14007d51d3 Merge pull request #7119 from haferflocken/caller-expression-for-procedures
Allow #caller-expression on constant parameters which are procedures
2026-08-04 10:53:52 +02:00
gingerBill
6c2bb94ceb Merge pull request #7206 from ssenthilnathan3/fix/os-glob-clone
Fix os.glob not cloning pattern when no meta characters present
2026-08-04 10:52:43 +02:00
Senthilnathan
b838b1bf25 fixes os.glob not cloning pattern when no meta characters present 2026-08-04 12:19:03 +05:30
Flāvius
2e8d3b9e10 rexcode/isa: display-side label naming — address order, offset-keyed names
Internal label ids are allocation-order handles: the encoder's creation
order, or the decoder's branch-DISCOVERY order (a loop's latch names the
header before an earlier forward target). Printing labels by raw id leaked
that accident into listings — label numbers appeared out of order down the
page — and the printers' `label_names: ^map[u32]string` keyed the caller's
names by those synthesized ids, which a decode consumer cannot know without
re-deriving them (the practical result: naming "label 0" could caption a
random interior branch target).

Naming is now derived at the presentation seam, shared by every ISA
(`isa.Label_Display` in isa/print.odin):

  - display numbers are assigned in ASCENDING ADDRESS order, so a listing
    reads L0, L1, L2 … top to bottom regardless of id allocation;
  - caller names are keyed by BYTE OFFSET (`isa.Label_Names`, with a
    `distinct` Label_Offset key so an id-keyed map from the old contract
    fails to compile instead of silently mis-naming);
  - a named offset is guaranteed a label row even when no Label_Definition
    points at it — `names[0] = "factorial"` heads a function's listing.

All ten ISA printers (x86, mips, rsp, arm32, arm64, riscv, ppc, ppc_vle,
mos6502, mos65816) drop their per-printer offset_to_label maps and
write_label helpers for the shared display; each arch re-exports
Label_Offset/Label_Names beside Label_Definition. En route this fixes an
arm32/ppc/ppc_vle bug where passing ANY names map suppressed the default
L<n> label rows for unnamed labels. Decode-side id assignment is untouched:
the reloc round-trip contract (encoder ids surviving decode) and the
sparse-id padding it relies on stay exactly as they were.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Riok9vMpkLmo78wsVKJHhz
2026-08-03 20:52:11 -04:00
Flāvius
da15373ee9 rexcode/mips: add the R6 signed mul/div encodings (MUL_R6/DIV_R6/DIVU_R6)
The table had the R6 unsigned mul, both muh, and mod/modu, but not the R6
SIGNED low multiply (SPECIAL funct 0x18, sa=2 → 0x98) or the R6 signed/unsigned
divide (funct 0x1A, sa=2/3 → 0x9A/0x9B). Add MUL_R6, DIV_R6, DIVU_R6 to the
Mnemonic enum + the encoding table (all SPECIAL, RD/RS/RT, mask 0xFC0007FF,
MIPS32_R6) and regenerate the tables. Verified against llvm-mc -mcpu=mips32r6
(mul/div/divu $rd,$rs,$rt). All existing mips tests pass (166/39/65/14).
2026-08-03 20:52:11 -04:00
Flāvius
69c6135b55 rexcode/mips: feature-gate the decoder so shared opcodes resolve per ISA variant
The MIPS decode tables are universal — every variant (MIPS I..64/R6, the PS1
GTE, PS2 MMI/VU, PSP VFPU) shares one table. Some primary opcodes collide
across variants: most visibly 0x37 is `LD` on 64-bit MIPS but `vfim.s` on the
PSP Allegrex VFPU. The decoder took the first table match, so `LD $ra, 0($sp)`
(0xdfbf0000) mis-decoded as `vfim.s $31, 0`.

Each Decode_Entry already carries a `feature`; the decoder just ignored it.
`decode` now takes a `features: Feature_Set` (a bit_set over `Feature`),
defaulting to `FEATURES_ALL` so existing callers are unchanged, and skips an
entry whose feature isn't enabled — the first ENABLED match wins, preserving
the most-specific-mask-first order. Added `FEATURES_MIPS_III` (MIPS I/II/III +
COP0 + FPU — the VR4300 / classic 64-bit baseline) for N64/MIPS-III consumers.

decode_smoke: opcode 0x37 decodes as LD under FEATURES_MIPS_III and (still)
as the PSP VFPU entry under FEATURES_ALL. 65 decoder checks pass.
2026-08-03 20:52:11 -04:00
Jeroen van Rijn
77af2cbba1 Merge pull request #7204 from corleypc/soa-comments-fix
Cleans up obsolete comments in _append_soa_elems
2026-08-04 01:03:07 +02:00
Jeroen van Rijn
7175d3d6c5 Merge pull request #7205 from alexthed1rk/fix-simd-arm-sha-arch
Impl fix simd arm sha arch
2026-08-03 23:38:22 +02:00
Alexander Zhura
cc71be2a5b Impl fix simd arm sha arch 2026-08-04 00:19:32 +03:00
corley
478ecf130f another useless comment removed 2026-08-03 23:45:44 +03:00
corley
c720ee5353 cleans up obsolete comments 2026-08-03 23:26:44 +03:00
Max Rabin
e9cb1e7019 Fix grammar in simd.odin doc comment 2026-08-03 22:26:18 +03:00
Laytan
014408297b Merge pull request #7200 from A1029384756/trace-tracking-allocator-improvements
[debug/trace] sync allocator with `core:mem`
2026-08-03 16:18:37 +02:00
A1029384756
1ac0b9bcdc [debug/trace] sync allocator with core:mem 2026-08-03 10:09:39 -04:00
gingerBill
dd796f5574 Merge pull request #7139 from bingis-khan/fix_nil_type_mismatch
Fix LLVM codegen for matching on `nil` for `union{}`
2026-08-03 16:06:55 +02:00
gingerBill
39e5d78aba Improve error handling on set in set comparisons to suggest using <= instead 2026-08-03 15:01:51 +01:00
gingerBill
23b45391d2 Merge pull request #7149 from corleypc/no-alias-dyn-arrays
Annotates the array parameter of dynamic array builtins with #no_alias
2026-08-03 15:43:03 +02:00
gingerBill
319143e4b7 Minor style cleanup 2026-08-03 14:42:44 +01:00
gingerBill
9914a57fc7 Add intrinsics.soa_copy_from_slice and use it within _append_soa_elems replacing the old handwritten unrolled approach 2026-08-03 14:41:04 +01:00
Brody
87b514890c fix: instantiated procs keep their own scope
Was this check here for a reason? Investigate
2026-08-03 22:07:18 +10:00
Brody
cce1bdd8c7 fix: return true for already specialised poly proc 2026-08-03 21:42:39 +10:00
Jeroen van Rijn
a38d3abbcb Merge pull request #7144 from Yawning/fixes/riscv
RISC-V fixes/improvements
2026-08-03 13:37:43 +02:00
gingerBill
100877d312 Merge pull request #7196 from corleypc/make-soa-go-vroom
Make soa builtins go vroom
2026-08-03 13:26:17 +02:00
gingerBill
40c7fabeb9 Merge pull request #7195 from thePHTest/master
zero tracking_allocator.allocation_map and tracking_allocator.bad_free_array in destroy
2026-08-03 12:57:32 +02:00
Brody
6888e84386 fix: Added null check before setting operand type to invalid 2026-08-03 18:34:53 +10:00
Brody
df6719cb89 fix: remove broken special case for poly proc as default value 2026-08-03 18:13:12 +10:00
corley
439edc5fa8 make soa builtins go vroom 2026-08-03 02:32:09 +03:00
Phil
3e24e2601c zero tracking_allocator.allocation_map and tracking_allocator.bad_free_array in destroy. Allows for re-using the struct again after an init. Otherwise, there would be dangling references. e.g. to tracking_allocator.allocation_map.data 2026-08-02 14:26:19 -07:00
Yawning Angel
711d385794 src: Add SpacemiT X-100 and A-100 microarchitectures
Generated featuregen against the vendor supplied (Bianbu) LLVM 21.1.8
package.
2026-08-02 22:09:22 +09:00
Yawning Angel
cd08f535c8 src: Use llvm.readsteadycounter on Linux RISC-V
Why `rdcycle` is kernel only while `rdtime` is not is a mystery to me.
2026-08-02 22:09:22 +09:00
Jeroen van Rijn
280f02f4ef Remove unused import 2026-08-02 15:08:08 +02:00
gingerBill
541563d472 Merge pull request #7187 from Riyyi/master
Update stale os.flags file doc
2026-08-02 14:53:10 +02:00
Jeroen van Rijn
447d880586 Add tests/core/text/scanner to CI 2026-08-02 13:19:15 +02:00
Jeroen van Rijn
7c4dd2ea53 Merge pull request #7176 from GPotoshin/scanner_octal_escape
Fix octal escape parsing by core:text/scanner
2026-08-02 13:17:27 +02:00
George Potoshin
bfd93d3e89 tests for scanner 2026-08-02 10:57:23 +02:00
Riyyi
47de593690 Update stale os.flags file doc 2026-08-02 03:15:30 +02:00
subotac
a4091c5d37 fix: pack tuple results into variadic arguments 2026-08-01 19:48:54 +03:00
gingerBill
fa706198ba Merge pull request #7180 from BradLewis/fix/parser-field-specialization-end
Correct end position for fields with a specialization
2026-08-01 16:16:51 +02:00
Jeroen van Rijn
b2e7f25186 Merge pull request #7184 from alexthed1rk/impl-simd-arm-pmull
Impl simd arm pmull
2026-08-01 15:46:14 +02:00
Alexander Zhura
659ba07cf3 Impl simd arm pmull 2026-08-01 16:22:15 +03:00
George Potoshin
8f3418c914 support every quote 2026-08-01 15:05:45 +02:00
Jeroen van Rijn
f62bafdc07 Merge pull request #7183 from odin-lang/revert-7181-impl-simd-arm-pmull
Revert "Impl simd arm pmull"
2026-08-01 14:13:05 +02:00
Jeroen van Rijn
cfd0c4dc69 Revert "Impl simd arm pmull" 2026-08-01 14:04:22 +02:00
Jeroen van Rijn
f1f7c98a84 Merge pull request #7182 from BigBoyBarney/shrink
Follow up fix of `shrink_map`
2026-08-01 13:51:37 +02:00
Jeroen van Rijn
15a45897ab Merge pull request #7181 from alexthed1rk/impl-simd-arm-pmull
Impl simd arm pmull
2026-08-01 13:50:24 +02:00
Sylphrena
64f27153cc Follow up fix of map shrink 2026-08-01 13:30:34 +02:00