[Tinycc-devel] Re : Lock-free tcc

2023-09-12 Thread david . koch
Thank you. Regards. - Mail d'origine - De: Richard Allen À: tinycc-devel@nongnu.org Envoyé: Tue, 12 Sep 2023 18:45:10 +0200 (CEST) Objet: [Tinycc-devel] Lock-free tcc Hello, It's my first time posting to this list. A bit ago I started playing with the idea of a multi-threaded

[Tinycc-devel] Re : Re: Re : Re: Re : Re: win32: -Wl,-nostdlib: undefined symbol 'memset'

2023-09-12 Thread david . koch
Hi, when using those "bare metal" options, you are not free to presume what the compiler will do. While I understand a simple assignation would be converted to the MOV equivalent, no so for structs. Not all compilers behave the same though, hence have a look on their respective documentation

Re: [Tinycc-devel] Re : Re: Re : Re: win32: -Wl,-nostdlib: undefined symbol 'memset'

2023-09-12 Thread Michael Matz
Hello, On Tue, 12 Sep 2023, avih via Tinycc-devel wrote: > Also, what is "pure machine code"? With neither input nor output it > couldn't do anything but waste instruction cycles. A function implemented in machine code, where the input is the arguments in whatever calling convention the

[Tinycc-devel] Lock-free tcc

2023-09-12 Thread Richard Allen
Hello, It's my first time posting to this list. A bit ago I started playing with the idea of a multi-threaded compiler, and put together a prototype using libtcc. I ran into the code-gen mutex as a bottleneck. It's based on an older commit, but I was able to refactor all global variables into

Re: [Tinycc-devel] Re : Re: Re : Re: win32: -Wl,-nostdlib: undefined symbol 'memset'

2023-09-12 Thread grischka
On 12.09.2023 11:01, avih via Tinycc-devel wrote: Tcc does not guarantee to compile pure C code into pure machine code, and any pure-C implementation which the user provides might end up depending on those functions involuntarily. The user has no control.. How do you define "pure C code"?

Re: [Tinycc-devel] Re : Re: Re : Re: win32: -Wl,-nostdlib: undefined symbol 'memset'

2023-09-12 Thread avih via Tinycc-devel
On Tuesday, September 12, 2023 at 11:46:52 AM GMT+3, wrote: > If the 'memset' function you would provide also call 'memset' (aka itself) > then indeed it goes into full recursion (aka chicken-egg) and you should > reconsider your software architecture. It does not call memset (or memmove

Re: [Tinycc-devel] Re : Re: Re : Re: win32: -Wl,-nostdlib: undefined symbol 'memset'

2023-09-12 Thread avih via Tinycc-devel
On Tuesday, September 12, 2023 at 12:44:45 PM GMT+3, grischka wrote: On 12.09.2023 11:01, avih via Tinycc-devel wrote: >> Tcc does not guarantee to compile pure C code into pure machine code, >> and any pure-C implementation which the user provides might end up >> depending on those functions

Re: [Tinycc-devel] Re : Re: win32: -Wl,-nostdlib: undefined symbol 'memset'

2023-09-12 Thread avih via Tinycc-devel
And actually, there's another potential issue here: even if my suggestion was correct, how can I tell that the implementation of memset which I provide doesn't end up requiring memset? or that tomorrow it still won't require memset? Basically, tcc expects a stand alone implementation of memset