public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
* [PATCH olang v1 0/3] implement assembly linux x86_64 compiler
@ 2024-03-04 19:23 Johnny Richard
  2024-03-04 19:23 ` [PATCH olang v1 1/3] be: create linux-x86_64 gas asm codegen Johnny Richard
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Johnny Richard @ 2024-03-04 19:23 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Johnny Richard

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-03-05  7:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-04 19:23 [PATCH olang v1 0/3] implement assembly linux x86_64 compiler Johnny Richard
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

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