Commit Graph

18536 Commits

Author SHA1 Message Date
gingerBill
cb903df235 #side_effects -> #volatile; Remove dead code 2026-08-13 10:03:00 +01:00
gingerBill
4f82bed1f7 Hide debug printing for LLVM's ASM IR 2026-08-13 01:21:38 +01:00
gingerBill
3453643c11 Improve unquote_string_triple to give better error messages on invalid literals 2026-08-13 00:34:28 +01:00
gingerBill
c085a46185 Move #side_effects and #align_stack to the specification list 2026-08-12 23:40:57 +01:00
gingerBill
08f3be70cf Add helper methods to the asm_tables_amd64.cpp 2026-08-12 21:18:10 +01:00
gingerBill
5768668af9 Add did you mean for registers 2026-08-12 20:52:26 +01:00
gingerBill
39c5e69f82 Move determine_asm_operand_kind upwards 2026-08-12 16:23:31 +01:00
gingerBill
dbe5761bb0 Minor change 2026-08-12 16:19:58 +01:00
gingerBill
8f389578de Revert build.bat 2026-08-12 16:17:49 +01:00
gingerBill
5eb0239474 Utilize triple quote strings within the C++ asm table generation 2026-08-12 16:09:18 +01:00
gingerBill
ae2c7ead48 Support triple backtick strings 2026-08-12 16:08:58 +01:00
gingerBill
5197806f88 Implement triple quote strings to allow for easier templating purposes 2026-08-12 15:42:36 +01:00
gingerBill
43f078aedc Infer asm #side_effects where possible from the mnemonics 2026-08-12 14:52:37 +01:00
gingerBill
ecb4495e81 Clobber manually specified registers 2026-08-12 14:29:59 +01:00
gingerBill
b32846bb35 Minor change to implies_side_effects 2026-08-12 14:16:10 +01:00
gingerBill
2300a48782 Infer #clobber memory and #clobber cc from the mnemonics directly 2026-08-12 12:45:48 +01:00
gingerBill
b9a7ed9942 Add amd64 clobber table to asm_tables_amd64.cpp 2026-08-12 11:33:07 +01:00
gingerBill
6bd2fd7e8b Add clobber table for x86 2026-08-12 11:25:03 +01:00
gingerBill
99a128e78e Remove %any as a concept 2026-08-12 11:08:33 +01:00
gingerBill
bef386b1fb Implement asm view-of parameters pred: i64, predb: u8 = pred 2026-08-12 10:33:53 +01:00
gingerBill
db41921a16 Mock out p0: u64 = %rax, p0b: u8 = p0 2026-08-12 10:20:11 +01:00
gingerBill
a87f5dd5e9 Clean up parsing for AstAsmMemoryOperand 2026-08-12 09:38:55 +01:00
gingerBill
612b25a425 Handle disp parameter correctly 2026-08-12 09:34:16 +01:00
gingerBill
a9df33e482 Virtualize the suffix handling in the llvm_backend_asm.cpp code 2026-08-12 09:31:52 +01:00
gingerBill
658fa54ee4 Support [base]:u8 type interpretations for memory operands; And determine the correct suffix to use 2026-08-12 09:30:55 +01:00
gingerBill
c80fedc070 Support [base + index<<scale] and [base + index>>scale]; Support syntax for [base]:u8 (not implemented yet) 2026-08-12 09:03:31 +01:00
gingerBill
21ad041232 Handle prefixes better 2026-08-11 17:44:55 +01:00
gingerBill
e31bacd664 Check memory operand parameters better 2026-08-11 16:37:55 +01:00
gingerBill
6a20d21358 Add extra checks for asm memory operand scale in frontend and backend 2026-08-11 16:00:03 +01:00
gingerBill
a76664ed2a Improve error messages for immediate values and explain how far out they are in terms of bits too. 2026-08-11 15:12:00 +01:00
gingerBill
5621cbc85a Improve scoring for operand error handling 2026-08-11 15:06:14 +01:00
gingerBill
cd6b8a9ddb Improve error messages when passing an immediate that does not fit the expect range. 2026-08-11 14:59:14 +01:00
gingerBill
ce6346a20f Check immediates if they support the range or are not allowed (e.g. floats) 2026-08-11 14:52:21 +01:00
gingerBill
c70f717211 Correct check_asm_operand_size_class for scalar floats in vector register slots 2026-08-11 14:21:21 +01:00
gingerBill
ed2bc91596 Add some missing vector instructions to the x86 encoding table 2026-08-11 14:18:37 +01:00
gingerBill
ef21ffa285 Templatize the check_asm.cpp code ready for other architectures 2026-08-11 14:00:41 +01:00
gingerBill
813f732759 Remove debug message 2026-08-11 13:09:42 +01:00
gingerBill
c717cb4ae9 Implement check_asm_operand_size_class 2026-08-11 13:08:39 +01:00
gingerBill
72867df848 Fix typos and bugs. 2026-08-11 12:23:26 +01:00
gingerBill
76808ab97f Improve did you mean for asm mnemonics and prefixes 2026-08-11 12:14:31 +01:00
gingerBill
098945c358 Fix some bugs and add "Did you mean" for the mnemonics 2026-08-11 12:10:32 +01:00
gingerBill
b0364d2c60 Improve error message for invalid operand kinds 2026-08-11 11:56:03 +01:00
gingerBill
400203c344 Verify the asm instruction operands against the Encoding.ops 2026-08-11 11:47:48 +01:00
gingerBill
5ca7638bb2 Check asm instruction operand count 2026-08-11 11:11:53 +01:00
gingerBill
70ca5c0936 Validate the names of mnemonics, prefixes, and registers for amd64 2026-08-11 10:44:34 +01:00
gingerBill
d827be77cd Begin work on generating the AMD64 asm tables for C++ 2026-08-11 10:15:41 +01:00
gingerBill
3f3e69897a Check for duplicate register pinning 2026-08-10 15:03:17 +01:00
gingerBill
ebc21aad72 Fix displacement check 2026-08-10 13:50:15 +01:00
gingerBill
6b534a318e Begin abstracting out the platform specific code into a class
I know... a class. If only C++ had a nice way to package different things like Odin itself.
2026-08-10 13:41:58 +01:00
gingerBill
768fedcff4 Minor fixes to labels; restrict to amd64 usage 2026-08-10 13:21:14 +01:00