gingerBill
c26aa48ca5
Support + - and ~ unary operators for asm operands
2026-08-21 16:01:49 +01:00
gingerBill
c6a4dd08fc
Add typename to keep clang happy
2026-08-21 15:57:45 +01:00
gingerBill
a848739cf2
Fix indirect call printing for asm amd64
2026-08-21 15:52:40 +01:00
gingerBill
83f5cd8767
Add extra check for scratch parameters with no other parameters
2026-08-21 15:45:23 +01:00
gingerBill
2ba79e2f17
Remove dead code
2026-08-21 15:34:27 +01:00
gingerBill
51467b41ba
Unify even more logic in llvm_backend_asm.cpp
2026-08-21 15:28:06 +01:00
gingerBill
0e101db3a4
Clean up llvm_backend_asm.cpp to reuse some of the same printing code
2026-08-21 15:00:21 +01:00
gingerBill
648c418fc4
Restrict riscv to only allow [base + disp] (i.e. disallow index*scale style things)
2026-08-21 14:31:58 +01:00
gingerBill
4a4a5045f8
Check for float register width exactly for risc-v frontend
2026-08-21 12:19:02 +01:00
gingerBill
a604ddceb1
Support pseudo macro mnemonics (for RISC-V) in the frontend
2026-08-21 11:47:41 +01:00
gingerBill
d0fb380c20
Support riscv _aq _rl _aqrl suffixes for mnemonics
2026-08-21 01:05:47 +01:00
gingerBill
acb6c1408f
Remove unneeded typename usage
2026-08-21 00:39:26 +01:00
gingerBill
de8c0dc4fe
Fix register width test for risc-v, and improve operand slot type inference for risc-v
2026-08-21 00:38:34 +01:00
gingerBill
09204e8982
Correct risc-v aliases
2026-08-20 19:48:30 +01:00
gingerBill
7a7bfea0bd
Begin work on pseudo mnemonics in the checker
2026-08-20 19:12:44 +01:00
gingerBill
cfb8a109b6
Begin work on pseudo-aliases
2026-08-20 17:51:47 +01:00
gingerBill
43ff42bf33
Add asm_tables_riscv.cpp
2026-08-20 14:44:10 +01:00
gingerBill
84f9bc76f9
Mockout inline asm for riscv
2026-08-20 14:42:42 +01:00
gingerBill
1009ab0c62
Add riscv.clobber_forms.bin
2026-08-20 11:45:50 +01:00
gingerBill
f3899c1825
rexcode: riscv INSTRUCTION_TABLE which includes the clobber information
2026-08-20 11:43:26 +01:00
gingerBill
21f48c9a9b
Merge branch 'master' of https://github.com/odin-lang/Odin
2026-08-20 11:08:18 +01:00
gingerBill
2ebc25001d
Add missing risc-v instructions to rexcode
2026-08-20 11:08:03 +01:00
Jeroen van Rijn
366107c852
Merge pull request #7403 from karl-zylinski/fix/os-error-zero-comparison
...
Remove the `os.Error == 0` compatibility hack
2026-08-20 12:07:59 +02:00
Karl Zylinski
a1fb44f4d1
Remove the os.Error == 0 compatibility hack
...
The hack made `0` legal against `os.Error` by blanking the constant's
`ExactValue` via `update_untyped_expr_value`, which is a silent no-op when
the expression has not been registered as an untyped expression yet. Since
#7087 , `check_expr_base` calls `convert_to_typed` before `add_untyped` runs,
so the blanking is lost and the backend receives a constant typed `os.Error`
still holding integer `0` with no variant type, tripping
`GB_ASSERT_MSG(value_type != nullptr)` in `lb_const_value`.
Also drop the redundant `operand->mode = Addressing_Invalid;` before the
union `convert_untyped_error` call, which revives the `Did you want 'nil'?`
hint, and guard that hint on `type_has_nil` and an Integer/Float zero.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
2026-08-20 11:45:50 +02:00
gingerBill
b82fa18cb3
Fix typo
2026-08-20 10:16:34 +01:00
gingerBill
5d873a4b8c
Update assert
2026-08-20 09:58:32 +01:00
gingerBill
63918fe1fe
Remove debug code
2026-08-20 09:54:50 +01:00
gingerBill
ce6ad239bf
Merge pull request #7362 from odin-lang/bill/rexcode
...
`core:rexcode` improvements
2026-08-20 10:54:07 +02:00
gingerBill
baae2636b8
Add support for x86 mnenomics in and out
2026-08-20 09:53:28 +01:00
gingerBill
4e0fe5cf4f
Allow parsing of asm instructions being a keyword
2026-08-20 09:37:34 +01:00
gingerBill
73bb97ceb4
Merge pull request #7394 from mfbulut/fix/or-else-diverging-single
...
Fix or_else diverging with single return value
2026-08-20 10:30:59 +02:00
Jeroen van Rijn
00a03e72b5
Merge pull request #7400 from kalsprite/union_slice_assert
...
backend: only reuse a compound literal's storage for a variable of its type
2026-08-20 03:38:09 +02:00
Jeroen van Rijn
6695ca537d
Merge pull request #7087 from korvahkh/const-union-fixes
...
Implement fixes for constant unions
2026-08-20 03:35:36 +02:00
Jeroen van Rijn
e551ef5f15
Merge pull request #7397 from kalsprite/union_ternary_phi
...
backend: a union constant in a ternary or builds an ill-typed phi
2026-08-20 03:24:04 +02:00
Jeroen van Rijn
9e493d4958
Merge pull request #7399 from kalsprite/complex_type_hint
...
check_builtin: `complex` and `quaternion` take their type from their arguments
2026-08-20 03:21:59 +02:00
korvahkh
feb008ab6e
Add tests for constant unions
2026-08-19 20:16:51 -05:00
korvahkh
f97274fd0a
Fix #7135
...
We have to handle unpacked structs in
llvm_const_named_struct
2026-08-19 20:13:00 -05:00
korvahkh
92ec71fa75
Prevent underflow of union padding
2026-08-19 20:13:00 -05:00
korvahkh
02246ac6fd
Implement fixes for constant unions
...
Note that with this commit, casting through
multiply-nested unions is forbidden, e.g.
```
U :: union {int, V}
V :: union {bool}
x: U = true
```
does not compile.
(Previously the compiler would simply crash)
This is to avoid situations where adding variants
can lead to unexpected changes in the value.
For example if `U` is changed to have a `bool`
variant of its own:
```
U :: union {int, bool, V}
```
Then `x: U = true` would equal
`U(true)` instead of `U(V(true))`.
Single-variant unions are exempt, primarily to
improve the ergonomics of `Maybe` in cases like:
```
x: Maybe(union{int, bool}) = 1
```
Fix #6100
Fix #6699
Fix #6895
Fix #6896
Fix #6897
Fix #7036
Fix #7083
Fix #7091
2026-08-19 20:12:56 -05:00
kalsprite
8d890cc705
fix typo
2026-08-19 18:04:34 -07:00
kalsprite
bc2649bacd
backend: only reuse a compound literal's storage for a variable of its type
2026-08-19 17:53:34 -07:00
kalsprite
f360a37ccd
cmplx & quat take type from args
2026-08-19 17:36:50 -07:00
Jeroen van Rijn
7f80c7093a
Merge pull request #7396 from kalsprite/union_const_backend
...
peel union constant to its variant
2026-08-20 01:51:05 +02:00
kalsprite
a13a4b418d
backend: a union constant in a ternary or builds an ill-typed phi
2026-08-19 16:45:58 -07:00
kalsprite
cf5f181228
peel union constant to its variant
2026-08-19 16:30:37 -07:00
Jeroen van Rijn
97b5078ad5
Merge pull request #7395 from kalsprite/diagnostic_format_checking
...
diagnostics: let compiler check error() fmt strings + fixes
2026-08-20 01:14:41 +02:00
kalsprite
f84735af42
missed site
2026-08-19 15:50:55 -07:00
kalsprite
f17c86d936
diagnostics: let compiler check error() fmt strings + fixes
2026-08-19 15:39:39 -07:00
Mustafa Furkan Bulut
8f111671e6
Merge branch 'odin-lang:master' into fix/or-else-diverging-single
2026-08-20 00:58:05 +03:00
Mustafa Furkan Bulut
581d20c606
Allow 'or_else' in diverging single-return
2026-08-20 00:57:10 +03:00