Commit Graph
6917 Commits
Author SHA1 Message Date
gingerBill 48daf8e511 Merge pull request #7431 from kalsprite/asm_named_register_slot
Reject asm operands in slots only a named hardware register can fill
2026-08-24 09:30:20 +01:00
kalsprite f5873e2e84 remove dead inline asm check, now unreachable 2026-08-24 00:40:00 -07:00
kalsprite 40fd892cf5 Reject a named asm template used as a value instead of aborting the compiler 2026-08-24 00:27:26 -07:00
kalsprite deb45f3e6a asm named slots 2026-08-23 21:34:31 -07:00
gingerBill 965970af71 Merge branch 'master' of https://github.com/odin-lang/Odin 2026-08-23 11:48:34 +01:00
gingerBill 2508a29376 Correctly check constant value indexing on constants 2026-08-23 11:48:24 +01:00
gingerBill fff69510b9 Merge pull request #7412 from mocompute/fix-7008
fix incorrect offset_of and size_of for unions with cyclic pointers
2026-08-23 10:52:14 +01:00
gingerBill 4247507dd5 - to / 2026-08-22 19:39:10 +01:00
gingerBill 7bd1c9d160 Improve implicit register printing for read-writes, writes, reads 2026-08-22 19:36:47 +01:00
gingerBill a2013cfccd Trim trailing whitespace on pretty printed forms 2026-08-22 19:00:00 +01:00
gingerBill 89cbcf958d For forms which only take immediates or nothing at all, add a comment stating what they implicitly read and write from 2026-08-22 18:59:14 +01:00
gingerBill 0ba2328c32 Remove debug code 2026-08-22 18:48:13 +01:00
gingerBill 0427b18d70 Simplify error block logic for printing mnemonic forms 2026-08-22 18:44:33 +01:00
gingerBill f3cbeb909c Add some capitalization 2026-08-22 18:40:48 +01:00
gingerBill eb380fc4fa Give good error messages for possible forms for the mnemonics 2026-08-22 18:39:18 +01:00
gingerBill 11e41860d9 Fix #7414 2026-08-22 18:17:41 +01:00
gingerBill e83dc03b39 Fix #7420 2026-08-22 17:46:35 +01:00
gingerBill be84e737d8 Fix #7413 2026-08-22 17:43:13 +01:00
gingerBill cbbb84cd2b Begin work on printing all of the forms of a specific mnemonic 2026-08-22 17:41:25 +01:00
Jeroen van Rijn 2370de888c Merge branch 'master' into type_call_null_arg 2026-08-22 03:12:01 +02:00
Jeroen van Rijn 830f41e280 Merge pull request #7417 from kalsprite/foreign_sig_named_struct
Fix segfault comparing two foreign declarations of the same symbol
2026-08-22 03:11:27 +02:00
kalsprite ef1c5fe675 Fix compiler segfault on a bare in a type position call 2026-08-21 17:54:13 -07:00
kalsprite f8bdfa0857 Fix segfault comparing two foreign declarations of the same symbol 2026-08-21 17:31:42 -07:00
Jeroen van Rijn 082017cd2a Merge pull request #7416 from kalsprite/distinct_alias_cycle
Fix compiler segfault on `distinct` of a type alias that cycles back
2026-08-22 02:10:53 +02:00
kalsprite a1b56d7679 Fix compiler segfault on of a type alias that cycles back 2026-08-21 17:00:44 -07:00
kalsprite 7fe49fbffb Fix compiler panic on a selector into 2026-08-21 16:38:56 -07:00
Jeroen van Rijn 580b3f15cd Merge pull request #7409 from michtesar/fix/literal_compound_comparison
Fix reordered compound literal comparison
2026-08-22 01:07:55 +02:00
gingerBill 629f7b5098 Support all pointer-like types not just actual pointers 2026-08-21 16:27:46 +01:00
gingerBill f2d9b10fdc Merge pull request #7406 from odin-lang/bill/rexcode-riscv-clobber
Inline `asm` RISC-V Support
2026-08-21 17:25:30 +02:00
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
mo 23bd3cd927 detect invalid block size caused by a void type
Fixes #7008

When a union variant includes a pointer to a forward type, `lb_sizeof`
returns 0 for the size of the block. This causes an extra padding word
to be added to the llvm type, causing a size_of and type_of mismatch.

The fix detects the 0 size and falls back to using `type_size_of` on
the first variant.
2026-08-21 21:58:21 +12: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
Michael Tesar 7d02788257 Fix reordered compound literal comparison 2026-08-21 00:46:47 +02: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
Jeroen van Rijn ec04cee25e Merge pull request #7407 from karl-zylinski/feat/zero-value-suggestion
Better hints when assigning or comparing to `0` when it is not allowed
2026-08-20 16:26:59 +02:00
Karl ZylinskiandClaude Opus 5 107f7ba313 Give better hints for what to write instead of 0 when you do x = 0 or x == 0 where 0 is not valid. Here are the rules for how it hints:
string -> ""
bool -> false
bit_set -> {}
anything with a nil -> nil
everything else -> {}

This adds a hint for structs, arrays, matrices, bit_fields, `#no_nil` unions, `rawptr`, `typeid`, the four string types and `bool`. A `bit_set` now suggests `{}` rather than `nil`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 16:13:08 +02: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