diff options
| author | Lam Wei Lun <weilun.lam@gmail.com> | 2026-02-01 20:23:54 +0800 |
|---|---|---|
| committer | Lam Wei Lun <weilun.lam@gmail.com> | 2026-02-01 20:23:54 +0800 |
| commit | c4b73a1e99bda3cdfabe7ff3b64066b310ee7292 (patch) | |
| tree | a9ac8db385f82865e1bed5798ceaf63920587b2d /README.md | |
| parent | fcc9210aa32d671e16b392cf48546c4e2001ff8f (diff) | |
| parent | eafd8c67012ea253436b79f703dc0702046703f8 (diff) | |
Merge with main
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -997,12 +997,13 @@ Zen C simplifies the complex GCC constraint syntax with named bindings. // Syntax: : out(variable) : in(variable) : clobber(reg) // Uses {variable} placeholder syntax for readability -fn add(a: int, b: int) -> int { +fn add_five(x: int) -> int { let result: int; asm { - "add {result}, {a}, {b}" + "mov {x}, {result}" + "add $5, {result}" : out(result) - : in(a), in(b) + : in(x) : clobber("cc") } return result; |
