Re: [Tinycc-devel] Do not load all referenced libraries, when linking a library

2023-10-10 Thread Michael Matz
Hello, On Tue, 10 Oct 2023, Herman ten Brugge via Tinycc-devel wrote: On 10/5/23 22:55, Detlef Riekenberg wrote: After the comments from grischka and Michael, i prepared a different patch to fix the build break of netbsd-curses and also updated the patch to current mob. `make test`

Re: [Tinycc-devel] "error: invalid displacement" i386 1f 'L..1' does not get resolved

2022-04-20 Thread Michael Matz
Hello, On Sun, 17 Apr 2022, Volodymyr Boyko wrote: Hi I'm trying to assemble the following snippet of code: .global sigsetjmp .global __sigsetjmp .type sigsetjmp,@function .type __sigsetjmp,@function sigsetjmp: __sigsetjmp:         mov 8(%esp),%ecx         jecxz 1f         mov 4(%esp),%eax  

Re: [Tinycc-devel] Disabling memmove optimization

2022-04-26 Thread Michael Matz
Hi, On Tue, 26 Apr 2022, Raul Hernandez wrote: I guess TCC does this as either an optimization (to take advantage of vectorization in the implementation of memmove), or as a way of simplifying the generated code. The latter, plus simplifying the generat_ing_ code (i.e. TCC itself). My

Re: [Tinycc-devel] [patch] adding path resolution to #line directives

2022-05-06 Thread Michael Matz
Hey, On Fri, 6 May 2022, Raul Hernandez wrote: It would seem better to canonicalize during generating this, because the above and this don't look equivalent anyway (they are equivalent only when the above relative path is less that seven levels deep from /). In our case this isn’t an

Re: [Tinycc-devel] [patch] adding path resolution to #line directives

2022-05-05 Thread Michael Matz
Hey, On Thu, 5 May 2022, Raul Hernandez wrote: The code we generate looks something like this:     #line 29 "../../../../../../home/spaceface/git/v/v/vlib/builtin/builtin.c.v" It would seem better to canonicalize during generating this, because the above ...    

Re: [Tinycc-devel] test failures on win32 x86-64

2022-10-19 Thread Michael Matz
Hello, On Fri, 14 Oct 2022, avih via Tinycc-devel wrote: 0x7ff72b42b266 <+50>: repnz scas %es:(%rdi),%al 0x7ff72b42b268 <+52>: dec %edi This is the problem. "dec %edi" truncates the %rdi register to 32bit by zero-extension, so that ... 0x7ff72b42b26a <+54>: mov

Re: [Tinycc-devel] test failures on win32 x86-64

2022-10-19 Thread Michael Matz
ion 1764:58]     __FILE__, __FUNCTION__, dest, src, (unsigned long)n);  [position 1774:58]     __FILE__, __FUNCTION__, dest, src, (unsigned long)n);  [position 1784:58]     __FILE__, __FUNCTION__, s, c, (unsigned long)n); [position 1794:53]     __FILE__, __FUNCTION

Re: [Tinycc-devel] test failures on win32 x86-64

2022-10-20 Thread Michael Matz
Hello, On Thu, 20 Oct 2022, avih wrote: > "dec %edi" truncates the %rdi register to 32bit by zero-extension, > so that ... this is now segfault. That only matters if the stack > (which %rdi points into) is setup such that it's beyond 32bit, > which ... is indeed the case on win10 for you. So,

Re: [Tinycc-devel] VLA support is not detected with autoconf

2022-09-19 Thread Michael Matz
Hey, On Sun, 18 Sep 2022, Detlef Riekenberg wrote: tcc can't compile the attached VLA check (gcc works) and configure adds "#define __STDC_NO_VLA__ 1" to config.h The code was generated using the autoconf macro "AC_C_VARARRAYS". console output: tcc -std=c11 vla_conftest.c -c

Re: [Tinycc-devel] __attribute__((constructor)) not getting called

2022-10-05 Thread Michael Matz
Hello, On Sat, 1 Oct 2022, Liam Wilson wrote: Note __attribute__((constructor)) has been stripped off bar and not foo. Yep, that's the glibc headers defining __attribute__ away ... Digging a bit further, it seems to be due to sys/cdefs.h (which is included by string.h and many other

Re: [Tinycc-devel] miscompilation for code snippet

2022-08-16 Thread Michael Matz
Hey, On Tue, 16 Aug 2022, ntysdd via Tinycc-devel wrote: Sorry, bad format.  #define G(x) _Generic((x),int*:"int*",void*:"void*")  int printf(const char*, ...);  int main()  {          int y = 0;          const char *s = G(1?(void*)(y*0LL):);          printf("%s\n", s);  } Fixed in mob.

Re: [Tinycc-devel] clang 15.0 issue with tcctest.c

2022-11-17 Thread Michael Matz
Hello, On Thu, 17 Nov 2022, Christian Jullien wrote: Test later fails with tcctest.c:2903:17: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'int' [-Wint-conversion]     old_style_f((void *)1, 2, 3.0);     ^ So, this is a

Re: [Tinycc-devel] TCC produced wrong code (yarpgen v1)

2023-03-07 Thread Michael Matz
Hey, On Sat, 18 Feb 2023, wine@web.de wrote: While trying yarpgen (v1 branch of github.com/intel/yarpgen ), various test files compiled with tcc (x86_64@linux) produce a wrong result. I compared the first failed program with gcc and found an "if" section in the example code, where the

Re: [Tinycc-devel] Bug 63816 fixed (yarpgen_v1). Thanks Michael

2023-03-09 Thread Michael Matz
Hey, On Wed, 8 Mar 2023, Detlef Riekenberg wrote: > Your commit c771cb52 fixes a lot of bugs in the yarpgen v1 generated tests. > > For seed values from 1 to 99, only 4 result failures left: 26, 56, 64 and > 84. > For 100 to 200, there are some more result failures (102, 117 and 173) > and some

<    1   2   3   4   5   6