Commit Graph

297 Commits

Author SHA1 Message Date
gingerBill
9b8771b475 Handle missing procedures better 2025-09-19 16:15:04 +01:00
gingerBill
6bca1475ed Convert procedures_to_generate to a queue 2025-09-19 14:15:25 +01:00
gingerBill
6ce889f4eb Entity * to std::atomic<Entity *> to remove the need for a PtrMap+Mutex 2025-09-19 11:01:41 +01:00
gingerBill
738a72943b Try moving parapoly procs into a separate module when doing weak monomorphization 2025-09-18 15:04:16 +01:00
gingerBill
1e0902677f Multithread min dep set by removing the set itself 2025-09-10 17:29:11 +01:00
gingerBill
8c1eda3e3a Handle fixed_point_div and fixed_point_div_sat 2025-08-08 11:10:01 +01:00
Sunagatov Denis
c22da490b9 Print the name of missing runtime procedure
This continues the fix made at 46b7abee9f,
by asserting on missing entity early and printing it's name if its not
found.
2025-08-08 04:56:59 +11:00
Harold Brenes
9d8e15b3af Implementes the block ABI.2010.3.16 natively via the objc_block intrinsic and the Objc_Block builtin type.
See: https://clang.llvm.org/docs/Block-ABI-Apple.html
2025-08-06 20:27:31 -04:00
gingerBill
2561427dd3 Add string16 and cstring16 (UTF-16 based strings) 2025-08-02 11:00:15 +01:00
Laytan
861fa4ab68 Merge pull request #4140 from colrdavidson/macharena
Mach Process control
2025-07-29 22:37:42 +02:00
Colin Davidson
4d9fdf5bd3 move to checker error, rather than panic 2025-07-29 13:09:05 -07:00
Colin Davidson
9a2e6fff48 switch to read_cycle_counter_frequency from arm64_read_cycle_counter_freq, trap on invalid arch 2025-07-29 12:21:46 -07:00
Laytan
c966e63520 fix ignored args in multi return handling
Fixes #5483
2025-07-29 19:04:49 +02:00
Colin Davidson
1848e0df05 use the correct frequency for the arm tsc timer 2025-07-28 15:10:42 -07:00
gingerBill
19a075211f Merge pull request #5442 from jon-lipstate/table_lookup
table lookup simd intrinsic
2025-07-22 11:14:54 +01:00
Jon Lipstate
6c81df82a6 cleanup langauge / errors about table vs swizzle 2025-07-16 23:43:41 -07:00
Jon Lipstate
ecd41b155d rename table_lookup to runtime_swizzle 2025-07-16 21:54:24 -07:00
Jeroen van Rijn
090cac62f9 lb_const_string -> lb_const_value 2025-07-07 20:47:49 +02:00
Jon Lipstate
fc78f6e83b x86 sse 2025-07-05 16:26:07 -07:00
Jon Lipstate
33c6a979e9 fix explicit cast 2025-07-05 14:11:29 -07:00
Jon Lipstate
019084a17f table lookup intrinsic 2025-07-05 13:55:14 -07:00
Feoramund
5b1113acb4 Ensure volatile status for all atomic operations
Fixes #2410
2025-06-20 19:43:41 -04:00
Feoramund
378e72b211 Push context onto stack before evaluating procedure parameters
Fixes #4711
2025-06-20 16:11:08 -04:00
Feoramund
9c5640886d Add @(no_sanitize_memory) proc attribute with MSan additions to base:sanitizer 2025-06-05 16:06:40 -04:00
gingerBill
d2d4ac8120 Add compress_values 2025-05-12 15:29:43 +01:00
gingerBill
23aff08556 Merge pull request #5117 from bogwi/bug/5024
Bug/5024
2025-05-09 08:35:16 +01:00
gingerBill
92df892f25 Merge pull request #5064 from harold-b/hb/objc-classes
Add support for Objective-C class implementation
2025-05-08 12:58:33 +01:00
Laytan Laats
ad4866653a fix disposing builder when not created
Fixes #5128

p->builder is created in lb_begin_procedure_body, but that isn't called
if there is no body, and we were still calling dispose at that point.

Moved it into lb_end_procedure_body to match.
2025-05-07 14:39:51 +02:00
gingerBill
90a30a145a Merge pull request #5122 from Lperlind/asan-allocators
Add asan support for various allocators and stack unpoisoning
2025-05-07 10:21:16 +01:00
Lucas Perlind
83bc2d3c4a Add asan support for various allocators 2025-05-06 14:55:50 +10:00
Barinzaya
dd5b7852ce Added alternate reduce-add/reduce-mul intrinsics.
The new reduce_add/reduce_mul procs perform the corresponding arithmetic
reduction in different orders than sequential order. These alternative
orders can often offer better SIMD hardware utilization.

Two different orders are added: pair-wise (operating on pairs of
adjacent elements) or bisection-wise (operating element-wise on the
first and last N/2 elements of the vector).
2025-05-05 16:38:45 -04:00
gingerBill
36945079f8 Add intrinsics.simd_indices 2025-05-05 11:41:54 +01:00
bogwi
ee8aeea381 CHECK 1 done
Fix panic in LLVM backend when using generic procedure with default arguments

- Fixed panic in `llvm_backend_proc.cpp` when using unspecialized polymorphic procedures as defaults.
- Ensured correct type inference when generic procedures are used as default parameters.
2025-05-05 16:50:40 +09:00
gingerBill
19fe75f020 Merge pull request #5098 from laytan/fix-nan-comparisons
fix variable NaN comparisons
2025-05-02 13:00:42 +01:00
Lucas Perlind
5c73b4ef58 Add attribute @(no_sanitize_address)
The purposes of this attribute is to let procedures opt-out of being
instrumented with asan. Typically an allocator that includes 'in-band'
meta-data will be accessing poisoned values (such as tlsf).

Making asan work with these allocators becomes very challenging so
just being to ignore asan within specific allocator procedures
makes it easier to reason and removes the need to temporarily
poison and unpoison allocator data.
2025-05-01 20:42:21 +10:00
Laytan Laats
396a18efce fix variable NaN comparisons 2025-04-30 20:04:24 +02:00
Harold Brenes
f3923ed666 Fix indentations
Fix Objective-C wrapper procs not forwarding return value
2025-04-27 22:55:53 -04:00
Harold Brenes
a3de9c8de4 Add initial support for Objective-C class implementation 2025-04-20 21:53:46 -04:00
Feoramund
e13b05168c Fix syscall_bsd on NetBSD ARM64 2025-04-06 19:58:23 -04:00
gingerBill
729b6a4337 Merge pull request #4974 from harold-b/hb.fix-syscall-memory-dep
Add `~{memory}` clobber to syscall intrinsics for platforms where it was missing
2025-03-27 09:09:18 +00:00
Harold Brenes
6fda041e17 Add ~{memory} clobber to syscall intrinsics for platforms where it was not yet added.
This fixes #4972 and #4588.

As laytan asserts, there is no guarantee that a syscall will not modify memory that it just obtained from the user, or held onto via a previous syscall. Therefore this constraint should be required for all syscalls.
2025-03-26 19:25:06 -04:00
gingerBill
f3210eccaf Fix #4866 2025-03-07 09:44:18 +00:00
gingerBill
400348c925 Improve global array index to be on a per module basis 2025-02-25 15:06:13 +00:00
gingerBill
f9d85a7311 Try to make globally generated variables deterministic in name 2025-02-25 14:29:14 +00:00
gingerBill
533f82da24 Fix #4822 2025-02-24 14:11:47 +00:00
Barinzaya
4afedbc051 Added simd_extract_lsbs intrinsic as well.
Equivalent to the simd_extract_msbs intrinsic, except it extracts the
least significant bit of each element instead.
2025-02-24 08:49:57 -05:00
Barinzaya
33a3aab791 Added simd_extract_msbs intrinsic. 2025-02-24 08:39:32 -05:00
Laytan Laats
5defddffd0 reorganize tests and handle endian 2025-02-06 21:44:34 +01:00
Laytan Laats
de83ad2a25 apply abs fix to constant system too 2025-02-06 21:19:54 +01:00
Laytan Laats
b1068c7f2e improve abs() on floats for more correct and faster results 2025-02-05 21:17:48 +01:00