diff options
| author | Mustafa Quraish <[email protected]> | 2022-02-07 03:02:39 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-02-07 03:18:08 -0500 |
| commit | 3817688851fae07b1d6a13ba2ce1906fc9811f8f (patch) | |
| tree | bb936b224cada39dc7ede856d9f15a4000950526 /src/builtins.c | |
| parent | Add missing files to self-hosted directory (diff) | |
| download | cup-3817688851fae07b1d6a13ba2ce1906fc9811f8f.tar.xz cup-3817688851fae07b1d6a13ba2ce1906fc9811f8f.zip | |
[cup] Self-hosting is now possible! Make some tweaks to match C output
A bit of a chonky commit, but this ports over the remaining (well,
almost) everything from the C implementation to the self-hosted
compiler.
The only things that really remain right now are (1) defer support
and (2) support for constants in local scopes. There were used barely
enough so for now their uses have been removed, but I'll implement
them back later. Not sure how useful (2) is though.
Diffstat (limited to 'src/builtins.c')
| -rw-r--r-- | src/builtins.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/builtins.c b/src/builtins.c index 58e907e..3caf753 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -102,7 +102,7 @@ static void generate_custom_builtins(FILE *out) " mov rdi, [rsp+8]\n" " mov r9, -3689348814741910323\n" " sub rsp, 40\n" - " mov BYTE [rsp+31], 10\n" + " mov byte [rsp+31], 10\n" " lea rcx, [rsp+30]\n" " mov qword rbx, 0\n" ".L2:\n" @@ -116,7 +116,7 @@ static void generate_custom_builtins(FILE *out) " add rsi, rsi\n" " sub rax, rsi\n" " add eax, 48\n" - " mov BYTE [rcx], al\n" + " mov byte [rcx], al\n" " mov rax, rdi\n" " mov rdi, rdx\n" " mov rdx, rcx\n" |