public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
From: Johnny Richard <johnny@johnnyrichard.com>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Johnny Richard <johnny@johnnyrichard.com>
Subject: [PATCH olang v1 0/3] implement assembly linux x86_64 compiler
Date: Mon,  4 Mar 2024 20:23:09 +0100	[thread overview]
Message-ID: <20240304193313.961286-1-johnny@johnnyrichard.com> (raw)

This patchset marks the completion of the compiler pipeline by
introducing the crucial code generation component. With this addition,
we achieve a fully operational compiler pipeline capable of compiling to
x86_64 Linux assembly.

To validate this implementation, follow these steps:
    
    $ make
    $ ./0c examples/main_exit.0 -o main_exit --save-temps
    $ ./main_exit
    $ echo $? # should return 0

You might notice that we are missing tests.  Let's engage in discussions
regarding the design of our compiler tests for future iterations.

Your feedback and suggestions on this patchset are highly appreciated.

Johnny Richard (3):
  be: create linux-x86_64 gas asm codegen
  string_view: add function to create from cstr
  cli: add compilation -o option with --save-temps

 docs/manpages/0c.md        |  13 ++-
 src/codegen_linux_x86_64.c |  81 +++++++++++++++++
 src/codegen_linux_x86_64.h |  25 ++++++
 src/main.c                 | 180 ++++++++++++++++++++++++++++++-------
 src/string_view.c          |   6 ++
 src/string_view.h          |   3 +
 6 files changed, 272 insertions(+), 36 deletions(-)
 create mode 100644 src/codegen_linux_x86_64.c
 create mode 100644 src/codegen_linux_x86_64.h


base-commit: 18ade2ac3dd60c13150828ecb4cfea6ca327bdd8
-- 
2.44.0


             reply	other threads:[~2024-03-04 18:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 19:23 Johnny Richard [this message]
2024-03-04 19:23 ` [PATCH olang v1 1/3] be: create linux-x86_64 gas asm codegen Johnny Richard
2024-03-04 19:23 ` [PATCH olang v1 2/3] string_view: add function to create from cstr Johnny Richard
2024-03-04 19:23 ` [PATCH olang v1 3/3] cli: add compilation -o option with --save-temps Johnny Richard
2024-03-04 18:33   ` [olang/patches/.build.yml] build failed builds.sr.ht
2024-03-04 19:39     ` Johnny Richard
2024-03-05  2:05       ` Carlos Maniero
2024-03-05  2:02   ` [PATCH olang v1 3/3] cli: add compilation -o option with --save-temps Carlos Maniero
2024-03-05  8:27     ` Johnny Richard
2024-03-05  8:53 ` [PATCH olang v1 0/3] implement assembly linux x86_64 compiler Johnny Richard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240304193313.961286-1-johnny@johnnyrichard.com \
    --to=johnny@johnnyrichard.com \
    --cc=~johnnyrichard/olang-devel@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox