Commit Graph

202 Commits

Author SHA1 Message Date
gingerBill
fafac1bc77 Fix auto_cast matrix bug 2024-12-01 11:54:52 +11:00
bobsayshilol
b10538da7a Fix invalid union access
UBSan spotted that |src->Basic.kind| had a value outside the range of
|BasicKind| due to it actually being a |Type_Pointer|. Since these are
stored in a union there could be cases where the value of |kind| just
so happens to be |Basic_string|, in which case the branch would have
been taken when it shouldn't have been.

To fix this simply check that it's a |Type_Basic| before treating it as
a |Basic|.
2024-12-01 11:54:51 +11:00
Laytan Laats
6e534c0e24 check packed load and set alignment on all loads, not just lb_emit_load 2024-12-01 11:54:50 +11:00
Laytan Laats
5d4fd09ff0 fix quaternion64 arith
Fixes #4282
2024-10-02 23:28:09 +02:00
gingerBill
225ffdec36 Fix union comparison bug 2024-09-30 11:10:16 +01:00
Karl Zylinski
007730bfbc Fix for crash when emitting a comparison between a constant array and a non-constant value. 2024-09-25 23:42:35 +02:00
gingerBill
9b06ea5bfd Fix #4229 for edge case os.Error/os.Errno legacy bodge 2024-09-11 12:01:01 +01:00
gingerBill
0a08a65202 Simplify #row_major matrix and matrix_flatten behaviour 2024-09-07 12:21:29 +01:00
gingerBill
9197a126fc Use XOR directly rather than (~x) & mask 2024-08-30 10:52:11 +01:00
gingerBill
38ea276231 Make ~some_bit_set work on only the possible bits by doing a mask with the full set 2024-08-30 10:48:21 +01:00
gingerBill
f49ebae956 Correct lbAddr_SoaVariable logic 2024-08-18 12:37:15 +01:00
gingerBill
0e82a46047 Fix #3999 2024-08-18 12:35:25 +01:00
gingerBill
22a82e73d6 Fix #3976 2024-08-18 11:45:27 +01:00
Laytan Laats
e3f375afd8 fix c_vararg bit_set
Fixes #4051
2024-08-11 17:00:49 +02:00
gingerBill
eeb92e2644 Allow cast between #simd[N]rawptr <-> #simd[N]uintptr 2024-08-05 13:06:55 +01:00
gingerBill
fd06be2243 Allow swizzle to take more arguments than the original array length 2024-08-05 12:33:02 +01:00
gingerBill
7e0fa795e4 Just compare against nil directly if the comparator is known to be nil too 2024-08-04 21:17:58 +01:00
gingerBill
65c91b7dde Fix code gen issue with bit_set 2024-07-15 15:16:23 +01:00
gingerBill
1e37eaf54d Begin work for bit_set[...; [N]T] (not working) 2024-07-15 14:49:20 +01:00
gingerBill
52aa7085e4 Use f32 as the immediate type for addition and subtraction for complex32/quaternion64 2024-06-29 11:09:54 +01:00
gingerBill
5a9698e8cb Properly fix #3820 2024-06-28 09:08:57 +01:00
gingerBill
06ff08b9cf Fix #3820 2024-06-28 08:53:05 +01:00
gingerBill
8fcfd8c506 Fix sign flag 2024-06-09 13:21:22 +01:00
gingerBill
e0d0dc704c Make f32(u8) etc do an immediate cast to f32(u32(u8)) in code generation 2024-06-09 13:20:48 +01:00
gingerBill
971229fe66 Fix #3686 2024-06-06 13:27:55 +01:00
gingerBill
cbabcb0907 Fix #3682 2024-06-05 15:43:15 +01:00
gingerBill
575b268e88 Fix more #soa changes 2024-05-16 17:15:38 +01:00
gingerBill
32245e93a1 Fix #3514 along with soa.a[i] bounds checking 2024-05-16 16:18:21 +01:00
gingerBill
4bdc8548bd Fix #3554 2024-05-13 12:55:49 +01:00
gingerBill
3fb0d52a74 Fix #3585 2024-05-13 11:57:04 +01:00
gingerBill
f8581537e4 Fix >= for strings
How did this not get noticed?!?!
2024-05-12 20:25:13 +01:00
gingerBill
97e9c50d11 Fix #3556 2024-05-09 10:44:06 +01:00
gingerBill
214537b420 Improve codegen for bit_field [N]T compound literals 2024-04-24 17:01:09 +01:00
gingerBill
c330e5b5c1 Improve codegen for bit_field compound literals with an integer backing 2024-04-24 14:46:34 +01:00
gingerBill
ece78d22d2 Add -no-type-assert and ODIN_NO_TYPE_ASSERT 2024-04-18 11:22:31 +01:00
gingerBill
4240e0025e Improve scalar -> array assignment when the scalar is constant in LLVM 2024-04-12 14:20:46 +01:00
gingerBill
caa344c88d Simplify scalar -> array conversions in LLVM to use a loop after a certain size 2024-04-12 14:05:36 +01:00
gingerBill
13e459980b Fix ptr_to_bit_field.field 2024-04-10 16:18:44 +01:00
Laytan Laats
5339e1e1b6 fix objc proc group edge case
Fixes #2648
2024-04-03 21:21:46 +02:00
gingerBill
b862691d75 Support for in with bit_set 2024-04-01 13:08:07 +01:00
gingerBill
553a244fec Fix bounds checking 2024-03-20 10:24:39 +00:00
gingerBill
3bff922b6f m[i] on #row_major matrices will reduce the i-th row-vector 2024-03-20 10:23:57 +00:00
gingerBill
a750fc0ba6 Add #row_major matrix[R, C]T
As well as `#column_major matrix[R, C]T` as an alias for just `matrix[R, C]T`.
This is because some libraries require a row_major internal layout but still want to be used with row or major oriented vectors.
2024-03-19 21:05:23 +00:00
gingerBill
c7c6852057 Support swizzle selector syntax .xyzw for #simd vectors 2024-03-12 12:11:48 +00:00
gingerBill
3f193d7446 Format change 2024-02-22 19:27:13 +00:00
gingerBill
e127d21fed Check for pseudo-fields before bit fields 2024-02-22 19:24:50 +00:00
gingerBill
3060225f46 Simplify usage code 2024-02-22 19:24:16 +00:00
gingerBill
c14b9d461a Support using of a bit_field within a struct 2024-02-22 19:14:16 +00:00
gingerBill
afcc2889ec Support compound literals for bit_field 2024-02-22 18:41:15 +00:00
gingerBill
5f001f6d51 Allow casting between a bit_field and its backing type 2024-02-22 18:15:13 +00:00