On 1/4/26 06:44, Anon wrote:
I noticed in some places o() was being broken
into multiple calls because of int's 4 byte limit
so I extended the size to uint64_t.

I added and refactored some comments where needed as well.

The repo link is https://github.com/usesc/tinycc

---
  tcc.h        |   2 +-
  x86_64-gen.c | 159 ++++++++++++++++++++++++++++-----------------------
  2 files changed, 90 insertions(+), 71 deletions(-)

diff --git a/tcc.h b/tcc.h
index 1c2f6949..87c6f4ec 100644
--- a/tcc.h
+++ b/tcc.h
@@ -1637,7 +1637,7 @@ ST_FUNC void gen_cvt_itof(int t);
  ST_FUNC void gen_cvt_ftof(int t);
  ST_FUNC void ggoto(void);
  #ifndef TCC_TARGET_C67
-ST_FUNC void o(unsigned int c);
+ST_FUNC void o(uint64_t c);
  #endif
  ST_FUNC void gen_vla_sp_save(int addr);
  ST_FUNC void gen_vla_sp_restore(int addr);
diff --git a/x86_64-gen.c b/x86_64-gen.c
index 0e63e685..f853a40f 100644
--- a/x86_64-gen.c
+++ b/x86_64-gen.c
@@ -122,7 +122,7 @@ ST_DATA const char * const target_machine_defs =
      "__x86_64__\0"
      "__x86_64\0"
      "__amd64__\0"
-    ;
+;
...

The change to tcc.h looks incorrect. The o() function is used in more files.
You probably did not use make test. This fails for cross compiling.
Also you created an aow() function which is only used once?
The 64 bits assembly code is only used 2 times.
I do not see how this helps.

    Herman

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to