gingerBill
2a48d1f3be
asm: Support add x, y, z<<1 style syntax for the arm64 target
2026-09-08 09:16:45 +01:00
gingerBill
654b3a8895
asm: Generalize memory operand syntax to a flat term list
...
Parse `[...]` as `term { (+|-) term }` where each term is `operand [ (*|<<|>>) operand ]`.
This allows for constant-only terms to be folded in-place, especially for things like displacement.
e.g. `[p + 8*32]` means `[p + 256]`.
Term order is also free: `[8 + p]` == `[p + 8]`
2026-09-07 18:39:59 +01:00
gingerBill
bea8fc68af
Fix label printing for amd64
2026-09-07 12:53:48 +01:00
gingerBill
6455ea5535
Correctly handle dealing with in and out mnemonics which have loads of implicit operands
2026-09-07 12:50:20 +01:00
gingerBill
3f873d656c
Check for non allocateable registers and disallow them to be pinned to output parameters
2026-09-07 12:26:38 +01:00
gingerBill
7dd33b5e48
Implement #pre/#post` memory operand forms
2026-08-31 18:31:37 +01:00
gingerBill
4f8a91092b
Add more MOV forms; fix liveness check for lanes
2026-08-31 17:51:24 +01:00
gingerBill
07b5c2ee0f
Support enable_target_feature and require_target_feature for asm templates
2026-08-31 16:39:17 +01:00
gingerBill
df3b988db8
asm: add new operand kind for lanes (arm64)
2026-08-31 15:45:44 +01:00
gingerBill
af0842343d
Work on trying to get the arm64 asm backend working
2026-08-31 11:02:06 +01:00
gingerBill
3d8437d152
Get the ARM64 frontend working
2026-08-31 10:23:09 +01:00
gingerBill
a0bfd7da55
Mock out llvm_backend_asm.cpp for arm64
2026-08-30 18:16:04 +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
a848739cf2
Fix indirect call printing for asm amd64
2026-08-21 15:52:40 +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
7a7bfea0bd
Begin work on pseudo mnemonics in the checker
2026-08-20 19:12:44 +01:00
gingerBill
6defecf436
Merge pull request #7392 from kalsprite/asm_extend_mnemonics
...
amd64 asm: extend family emits mnemonic that doesnt exist
2026-08-19 23:54:37 +02:00
kalsprite
26ae28dfb7
asm: multi-instruction template computed with one operand twice
2026-08-19 14:32:03 -07:00
kalsprite
b9983105bd
amd64 asm: extend family emits mnemonic that doesnt exist
2026-08-19 14:03:56 -07:00
David Linus Briemann
6e1ae963a6
fix asm template generator lifetime
2026-08-19 09:46:10 +02:00
gingerBill
27d00c3c1c
LLVM asm backend: %gs:disp() -> %gs:disp
2026-08-18 17:18:38 +01:00
gingerBill
fd9ccd7b10
Support segment overrides on asm memory operands
2026-08-18 14:44:24 +01:00
gingerBill
12c89ee2bf
Allow for [base - disp]
2026-08-18 14:11:01 +01:00
gingerBill
e0d8300399
Keep compiler happy
2026-08-18 11:58:49 +01:00
gingerBill
582ff64bee
General clean up of llvm_backend_asm.cpp code
2026-08-17 22:58:51 +01:00
gingerBill
77bedf9947
Fix scratch register pinning
2026-08-17 21:37:03 +01:00
gingerBill
a2bcf3177a
Improve error messages for register class printing
2026-08-17 21:10:24 +01:00
gingerBill
ad1ef6328d
Remove debug print
2026-08-17 19:58:00 +01:00
gingerBill
52ea617143
Minor fixes
2026-08-17 19:20:32 +01:00
gingerBill
d0c3b78ece
Allow (parent scope) constants within asm templates
2026-08-17 18:56:47 +01:00
gingerBill
d71c25dd9b
asm: add #skip N and #nop N
2026-08-17 13:36:59 +01:00
gingerBill
bd95d2ae66
Add asm directive #align N
2026-08-17 13:32:28 +01:00
gingerBill
55377f71ef
Support #byte directive for asm templates
2026-08-17 13:21:40 +01:00
gingerBill
c2dfcb3c28
Remove debug printing
2026-08-17 13:10:28 +01:00
gingerBill
5fe724bff3
Remove f suffix e.g. %flags.z rather than %flags.zf
2026-08-17 13:00:18 +01:00
gingerBill
d1f561ec88
Correct instruction_size_suffix so that the correct suffix can be selected for the instruction to adhere to AT&T syntax
2026-08-17 12:59:23 +01:00
gingerBill
db94c5a6cb
Begin work in %flags.zf et al
2026-08-17 12:25:17 +01:00
gingerBill
344e8afa36
#clobber cc -> #clobber flags
2026-08-17 12:10:08 +01:00
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
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
2300a48782
Infer #clobber memory and #clobber cc from the mnemonics directly
2026-08-12 12:45:48 +01:00
gingerBill
bef386b1fb
Implement asm view-of parameters pred: i64, predb: u8 = pred
2026-08-12 10:33:53 +01:00
gingerBill
a9df33e482
Virtualize the suffix handling in the llvm_backend_asm.cpp code
2026-08-12 09:31:52 +01:00