public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
From: Johnny Richard <johnny@johnnyrichard.com>
To: Carlos Maniero <carlos@maniero.me>
Cc: ~johnnyrichard/olang-devel@lists.sr.ht
Subject: Re: [PATCH olang v2 4/4] codegen: operate mov instructions based on the symbol's type
Date: Sun, 22 Sep 2024 16:15:04 +0200	[thread overview]
Message-ID: <fp7toxoqnbwzntcueg5dousqfhpwec44rqyr5dzlmqult7mejq@tsggexnvfqhl> (raw)
In-Reply-To: <20240922004619.518310-5-carlos@maniero.me>

Great work! Pretty solid patch!

On Sun, Sep 22, 2024 at 12:46:43AM GMT, Carlos Maniero wrote:
> Signed-off-by: Carlos Maniero <carlos@maniero.me>
> ---
>  src/codegen_linux_x86_64.c                    | 60 ++++++++++++++++---
>  src/type.c                                    | 18 ++++++
>  src/type.h                                    |  5 +-
>  .../tests/0026_primitive_unsigneds.ol         | 27 +++++++++
>  4 files changed, 100 insertions(+), 10 deletions(-)
>  create mode 100644 tests/integration/tests/0026_primitive_unsigneds.ol
> 
> diff --git a/src/codegen_linux_x86_64.c b/src/codegen_linux_x86_64.c
> index 1fa6c58..25cda2d 100644
> --- a/src/codegen_linux_x86_64.c
> +++ b/src/codegen_linux_x86_64.c
> @@ -26,6 +26,10 @@
>  #define SYS_exit (60)
>  #define PTR_HEX_CSTR_SIZE (18 + 1)
>  
> +// The call instruction pushes EIP into stack so the first 8 bytes from stack
> +// must be preserved else the ret instruction will jump to nowere.
> +#define X86_CALL_EIP_STACK_OFFSET (8)

Nice improvement here as well!


  parent reply	other threads:[~2024-09-22 14:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22  0:46 [PATCH olang v2 0/4] extend unsined integers types (u8, u16, u64) Carlos Maniero
2024-09-22  0:46 ` [PATCH olang v2 1/4] parser: replace type enum to a string view Carlos Maniero
2024-09-22  0:46 ` [PATCH olang v2 2/4] checker: scope: populate symbol's type Carlos Maniero
2024-09-22  0:46 ` [PATCH olang v2 3/4] codegen: fix map symbol list type Carlos Maniero
2024-09-22  0:46 ` [PATCH olang v2 4/4] codegen: operate mov instructions based on the symbol's type Carlos Maniero
2024-09-22  0:47   ` [olang/patches/.build.yml] build success builds.sr.ht
2024-09-22 14:15   ` Johnny Richard [this message]
2024-09-22 14:19 ` [PATCH olang v2 0/4] extend unsined integers types (u8, u16, u64) 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=fp7toxoqnbwzntcueg5dousqfhpwec44rqyr5dzlmqult7mejq@tsggexnvfqhl \
    --to=johnny@johnnyrichard.com \
    --cc=carlos@maniero.me \
    --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